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

Tint (dynamic sprite)

DynamicSprite.Tint(int red, int green, int blue, int saturation, int luminance)
Tints the dynamic sprite to (RED, GREEN, BLUE) with SATURATION percent saturation. For the meaning of all the parameters, see SetAmbientTint.

The tint set by this function is permanent for the dynamic sprite -- after the tint has been set, it is not possible to remove it. If you call Tint again with different parameters, it will apply the new tint to the already tinted sprite from the first call.

NOTE: This function only works with hi-colour sprites.

Example:

DynamicSprite* sprite = DynamicSprite.CreateFromExistingSprite(object[0].Graphic);
sprite.Tint(255, 0, 0, 100, 100);
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
surface.DrawImage(100, 80, sprite.Graphic);
surface.Release();
sprite.Delete();
creates a copy of object 0's sprite, tints it red, and draws it onto the room background.

See Also: DynamicSprite.Flip, DynamicSprite.Height, DynamicSprite.Width, SetAmbientTint


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