> yassine wrote: > > > Hi, > > You can find a simple test case here : > > http://yostane.idoo.com/files/fltk_icon_test.zip > > This file is not readable for me (neither downladed with firefox nor > with wget). Did you upload it in binary mode? > > Meanwhile I did my own test with a modified test/menubar.cxx, and here > are the results: > > The image is always drawn at absoulute coordinates of the relevant > window. In case of a symbol in a label, this is the parent window, > in case of a menu, this is the menu window. > > fl_rectf() doesn't honor the transformation matrix (at least on > Windows - the behavior is "undefined" according to the docs), and > thus fl_rectf() also draws relative to the current window (I do > only mention this here because I proposed this for testing). > > The only drawing functions that can be used in symbol drawing > are those mentioned in the chapter "Drawing Things in FLTK" > under "Drawing Complex Shapes": > > http://www.fltk.org/doc-1.3/drawing.html#ssect_Complex > > That's not very helpful for drawing images, although it can probably > be done by drawing single points :-( > > OTOH, getting the relative coordinates of a menu item seems to be > impossible, because the menu drawing code uses a complex algorithm > and measuring of menu items during the menu's draw() method, and > the menu window can be scrolled so that parts are outside the window > boundaries. For me there seems to be no way to do something like you > want to do with symbol drawing functions (other than those mentioned > above). > > Albrecht
It is re-uploaded correctly now, sorry for the problem :p. So there is no "simple" way to insert png icons on menus? The same problem with tabs...etc _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

