> Olly wrote: > > Hi there > > > > I get a segmentation fault whenever I try to use the method > > FL_image::draw(int,int). > > See: > http://fltk.org/documentation.php/doc-1.1/drawing.html#drawing > > You can't call draw() directly from main() this way. > For your program to work (show the image), replace > "jpg.draw(10,10);" with "box.image(jpg);" instead. > > The image will be drawn at the box's x/y/w/h coordinates, > based on the box's align() properties, eg: > > [..] > box.image(jpg); > box.align(FL_ALIGN_TOP|FL_ALIGN_INSIDE); > [..] >
Thanks I'm having a bit of trouble understanding: "The most common place is inside the virtual method Fl_Widget::draw(). To write code here, you must subclass one of the existing Fl_Widget classes and implement your own version of draw()." Do you know of any example code that uses this method that I could look at? _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

