[lazarus] TBitmap: Loading and drawing

Marc Weustink Marc.Weustink at cuperus.nl
Thu Mar 16 10:30:36 EST 2000

+ From: Shane Miller [mailto:SMiller1 at stvgb.org]

+ I attempted to add a function to TBitmap called
+ LoadFromXPMFile to see if I could load an XPM file and use
+ the Speedbutton's canvas to draw it to the button.  I failed..  :-(
+ Can someone look at the code in gtkobject and tell me what
+ the problem is?  I am getting a gtk error when I try to load
+ the XPM saying that the assert width != 0 and height !=0
+ failed.  Why are they zero?!!!

Yesterday I was struggeling with this also. Somehow it returned a null
Finally I got something but is to alpha to commit. I didn't use a
LoadFromXPMFile but created a new component TPixmap = class(TBitmap). This
way we can use TBitmap for .bmp and TPixmap for .xpm and both can load
through streams (etc)
More tonight.


More information about the Lazarus mailing list