How to use transparency in info.Surface.DrawRectangle

Started by henrikes, Sat 14/07/2018 12:27:05

Previous topic - Next topic

henrikes

Hi,

Im using the info.Surface.DrawRectangle, but I dont see how to had transparency to it, is it possible?

Snarky

To get transparency with things you draw, what you usually have to do is to draw it to a separate sprite, then copy that sprite onto your surface using DrawingSurface.DrawImage(), which takes a transparency argument.

henrikes

Quote from: Snarky on Sat 14/07/2018 13:57:18
...what you usually have to do is to draw it to a separate sprite...

You mean use a image ceated outside ags?

morganw

You can use a dynamic sprite, then get a reference to its surface, then use DrawingSurface.DrawSurface to draw it onto another surface (this also takes transparency as a parameter).

SMF spam blocked by CleanTalk