|
SpriteTransparent | ||
SpriteTransparent SpriteIndex, TransparentFlag | ||
Parameters: SpriteIndex = The index of the sprite you wish to alter TransparentFlag = The transparent state (0= solid, 1= transparent) |
||
Returns: NONE | ||
SpriteTransparent sets the transparent state of a sprite. Sprites can be drawn in two basic modes, Solid (0) or Transparent (1). When drawing a sprite in Solid mode, every pixel within the sprite images will be drawn. However, when transparent mode is enabled, only pixels that do not match the images Mask Colour are drawn. FACTS: * Sprites drawn in transparent mode uses the mask color of their associated image (Video + Fx Images). To change an images mask colour see ImageMaskColour. However, when transparent mode is enabled and the sprite is using an AFX formatted image, the sprite rendering engine will use the images Alpha Channel for transparency rather than it's mask colour. Read Images Tutorial for do's and don't Mini Tutorial: This example has is really three parts. Part #1 creates an image. Part #2 then creates 10 sprites, and assigns each sprite our previously created image from part #1. Then last part, renders the sprites to the screen.
This example would output.
|
Related Info: | DrawSprite | GetSpriteTransparent | ImageMaskColour | Images | SpriteDrawMode | Sprites : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |