|
CreateFxImage | |
CreateFxImage ImageIndex, Width, Height | |
Parameters: ImageIndex = The Index of the image that you wish to create. Width = The width of the image in pixels Height = The Height of the image in pixels |
|
Returns: NONE | |
CreateFxImage creates a blank FX image in memory ready for use. While FX images can be drawn and drawn onto like regular images, their primary use is for Real Time effects like rotation. You can think of an Image as a picture. You might use them to storing the individual frames of your game characters, game logos, maps enviroments, backdrops etc etc. You can also perform a host of drawing operations upon Images. including rotation, shading, texture mapping and many more using the various provided image commands. All media including images in PlayBASIC are stored and referred to via their media index. Valid indexes will range between 1 and the maximum number allowed of this particular media type (ie. images/sprites/shapes/maps etc - See GetImageQuantity() for the actual amount). So if you think about it, images are really just stored in a list, where the index we use refers to the particular image within the list. FACTS: * CreateFxImage does not change PlayBASIC current graphics output. So if you want to redirect all drawing operations to a newly created image, you'll have to do this manually via RenderToImage. * CreateFxImage is an alternative to using the CreateImage with the optional format parameter. So we create FX images either way, but some people prefer not to use optional / format parameters with CreateImage in their code as they feel it's help with code readability. Mini Tutorial: This example creates FX Image #1 in system memory. Next it renders some graphics to it, then it draws this image to the screen.
|
Related Info: | CreateImage | DeleteImage | DrawImage | GetFreeImage | LoadImage | NewImage | PrepareFXimage | RenderToImage : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |