|
DrawImage | |
DrawImage ImageNumber, Xpos, Ypos, TransparentFlag | |
Parameters: ImageNumber = The identifier of this image Xpos = The X coordinate to draw the image at Ypos = The Y coordinate to draw the image at TransparentFlag = This flag toggles if the image is rendered solid or transparent. (0=Solid, 1 for transparent) |
|
Returns: NONE | |
The DrawImage commands will render an image to the current surface. Generally the current surface will be the screen, but you can also draw images directly onto other images also. The command gives us two basic display options for rendering the image. Those being Solid or Transparent. Setting the TransparentFlag parameter to false (Zero) tells the rendering engine to draw every pixel in the image over the output surface. Once drawn this image will then cover whatever was on the surface previously. Alternatively we can choose to draw the image in transparent mode by setting the TransparentFlag parameter to True (value of one). In those modes the rendering engine only renders pixels to the output surface when the pixel doesn't match the Images Mask Colour (See ImageMaskColour ) or value of the alpha channel if the image is stored in AFX format. FACTS: * DrawImage renders an image to current surface, except when the user either CaptureToScene, or CaptureToWorld are activated. In either situation the render request will be add to the scene or world queues. * DrawImage let's the user control the basic transparency when rendering, however how the transparency is defined actually comes from the type of image your rendering. So when you render an AFX image, each pixels alpha level is used, where as FX & Video images the Images Mask Colour. See Images GetImageType * You can DrawImages to create your own sprites, or using the built in the sprite system. For more on those see the Sprites tutorial. Mini Tutorial: This small example shows how to create an image, draw random dots to it and then draw it at the mouses position.
|
Related Info: | DrawAlphaImage | DrawRotatedImage | GridImage | Images | RenderToImage | Sprites | TileImage : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |