Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: henrikes on Sat 14/07/2018 12:27:05

Title: How to use transparency in info.Surface.DrawRectangle
Post by: henrikes on Sat 14/07/2018 12:27:05
Hi,

Im using the info.Surface.DrawRectangle, but I dont see how to had transparency to it, is it possible?
Title: Re: How to use tranaparency in info.Surface.DrawRectangle
Post by: Snarky on Sat 14/07/2018 13:57:18
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.
Title: Re: How to use transparency in info.Surface.DrawRectangle
Post by: henrikes on Sat 14/07/2018 16:54:36
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?
Title: Re: How to use transparency in info.Surface.DrawRectangle
Post by: morganw on Sat 14/07/2018 18:57:13
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).