SRL Archive - Help and Support

Transparent bitmaps on forms


mixster

2008-03-29 21:09:01

I'm currently trying to port my Delphi map editor & displayer into Scar and overall it's going well. However, I've got it all working, but the bitmaps aren't transparent so it only shows 1 layer (mainly the top layer) so I was wondering if there were any way to make bitmaps transparent when using TImage's via SafeCopyCanvas. I really would keep searching, but after checking here and Freddy1990.com for the last hour or so, I'm ready to give up. The fact that it's 2am and I'm half asleep isn't helping, but what ya gonna do :p
Thanks in advance,
~ mixster

Santa_Clause

2008-03-30 00:53:51

You can set a certain colour transparent on the form…

SetColorTransparent.

mixster

2008-03-30 05:58:45

I tried doing that with the bitmaps before copying them onto TImage, but it wasn't working. I'll try playing with it some more anyway.

nielsie95

2008-03-30 06:06:33

SetTransparentColor only works if you use FastDrawTransparent.

mixster

2008-03-30 16:41:21

Thanks - the problem was that I was trying to draw straight onto the form rather than using a buffer. With that done, I've now finished my basic map displayer and it works pretty well with a quite short generation time (in my opinion) so I'm happy :)