spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * DrawingSurface functions and properties

DrawingColor property

(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


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.