(Formerly known as RawSetColor, which is now obsolete)
int DrawingSurface.DrawingColor
Gets/sets the current drawing colour on this surface. Set this before using commands
like DrawLine, which use this colour for
their drawing.
You can set this either to an AGS Colour Number (as you'd get from the Colours pane
in the editor) or to the special constant COLOR_TRANSPARENT, which allows you
to draw transparent areas onto the surface.
Example:
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawingColor = 14;
surface.DrawLine(0, 0, 160, 100);
surface.DrawingColor = Game.GetColorFromRGB(255, 255, 255);
surface.DrawLine(0, 199, 160, 100);
surface.Release();
will draw a yellow line from the left top of the screen (0,0) to the middle of the screen (160,100),
and a white line from the bottom left to the middle.
See Also: DrawingSurface.DrawCircle,
DrawingSurface.DrawLine,
DrawingSurface.DrawRectangle,
Game.GetColorFromRGB
|