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

UseHighResCoordinates property

bool DrawingSurface.UseHighResCoordinates
Gets/sets whether you want to use high-resolution co-ordinates with this surface.

By default, this property will be set such that drawing surface co-ordinates use the same co-ordinate system as the rest of the game, as per the "Use low-res co-ordinates in script" game setting. However, if your game is 640x400 or higher you can customize whether this drawing surface uses native co-ordinates or the low-res 320x200 co-ordinates by changing this property.

Setting this property affects ALL other commands performed on this drawing surface, including the Width and Height properties.

Example:

DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.UseHighResCoordinates = true;
surface.DrawingColor = 14;
surface.DrawLine(0, 0, 320, 200);
surface.Release();
draws a yellow line from the top left of the screen to the middle of the screen. If we hadn't set UseHighResCoordinates to true, this would draw a line from the top left to the bottom right of the screen.

See Also: DrawingSurface.DrawCircle, DrawingSurface.DrawLine, DrawingSurface.DrawRectangle, DrawingSurface.DrawTriangle


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