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
    * DynamicSprite functions and properties

Flip (dynamic sprite)

DynamicSprite.Flip(eFlipDirection);
Flips the dynamic sprite according to the parameter:

eFlipLeftToRight flips the image from left to right
eFlipUpsideDown flips the image from top to bottom
eFlipBoth flips the image from top to bottom and left to right

Example:

DynamicSprite* sprite = DynamicSprite.CreateFromFile("CustomAvatar.bmp");
sprite.Flip(eFlipUpsideDown);
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawImage(100, 100, sprite.Graphic);
surface.Release();
sprite.Delete();
will load the CustomAvatar.bmp image, flip it upside down, and then draw it onto the room background at (100,100).

See Also: DynamicSprite.Crop, DynamicSprite.Resize, DynamicSprite.Rotate


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