Alpha blending parameters for TDrawableImage.DrawFrom

Good day!
I’m a little confused trying Alpha blending with TDrawableImage.

For now alpha blending is off. And my textures seems like:


I think you see that trees borders are transparent. So, background sea and sky is visible through the forest.

As I understand, property TDrawableImage.Alpha works when texture is render. But I need it in texture construction process: every tree is TDrawableImage. And I draw they on texture - another TDrawableImage.

TDrawableImage.Alpha affects rendering of the given image, indeed.

If you want the trees to be opaque, set TDrawableImage.Alpha (on the source image that is drawn, not destination; i.e. on the tree, not on background) to acNone during drawing. This affects rendering the texture to the screen, or to another texture.

I hope I guessed the issue right – if this doesn’t help, please attach a testcase to reproduce the problem. I would have to see what do you mean by “For now alpha blending is off.”, and what did you expect to see instead :slight_smile:

I tried to make example application, but transparency works without problems :upside_down_face:
Maybe I just draw my tiles borders more accurate and it will help.

1 Like