> I am trying to do a simple single layer map editor like this one :
> 
> http://www.choosetheforce.com/files/nov13_05/smee14.png
> 
> How would you do a single layer map editor? Can you give me 
> some piece of advice? 

I'd probably render the whole lot in an fl_offscreen, to be honest, then
in the display widget's draw method, I'd use 

fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen osrc, int
srcx, int srcy)

 to copy the interesting parts of the offscreen onto the display.


> I planned to cut the tileset into 
> several images and then put them into buttons. But how do we 
> cut a rectangle in a Fl_Image? Is there some kind of 
> 'Fl_Image* subRectangle(int x, int y, int w, int h) const' 
> methods in the Fl_Image class?

I'm not sure I'd bother with Fl_Image, though it can probably work for
you:

Here are a couple of howtos that might help you manipulate the image
data.

http://www.fltk.org/articles.php?L466

http://www.fltk.org/articles.php?L468 




SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to