[Lazarus] Help with bitmaps, glyph, etc...

José Mejuto joshyfun at gmail.com
Fri Mar 3 19:10:56 CET 2017


Hello,

I need help with bitmaps as my tests results in unexpected/random behavior.

I need to get current glyph from a BitBtn, clone it to another bitmap 
(to be stored in memory), then process the image content and finally 
write the result to the BitBtn.

In my tests I clone the bitmap using TBitmap.RawImage and everything 
looks to work fine but after setting BitBtn.Glyph to this new created 
bitmap sometimes the operation works fine (when mouse is over the 
BitBtn), other times it simply disappear and other times it is partially 
painted blending new content with old one.

Just for the test I was using .ico file with transparency (32 bits), 
other formats will be supported later, but now I need at least one 
format that works fine.

Platform is Win32 running Windows 7. I hope to handle it in a cross 
platform way, or even specific code for each platform.

Is there any recommended operations sequence ? Forget about TBitmap and 
use TLazIntfImage ?

Thank you.

-- 



More information about the Lazarus mailing list