Images
Images are the basic graphical unit of PlayBasic. Think of them as plain, ordinary images that are there for decoration only. Mostly images are used for interfaces such as HUD elements.
Image Index
PlayBasic stores images in what can be thought of as numbered slots. The number which refers to a slot is known as the image index.
When you load an image, you must tell it which slot to store the image in or use a function which selects an available slot and returns it's number.
Vs. Sprites
There is no built-in collision detection for images. If you want to use collision detection, you should create sprites from your loaded images.
Image Functions
Creating Images
- NewImage() - creates a new, blank image
- NewFXImage() - creates a new, blank image that can have special effects applied to it.
Loading Images
- LoadImage - load an image
- LoadNewImage() - load an image, automatically return image index
Image Size
Image Transparency
Background / Mask Transparency
The color of an image that appears transparent is called the mask color. By default, the mask color is black.
- GetImageMaskColour - get the current mask color of a sprite.
- ImageMaskColour - set a color to be transparent.
Related Pages
How To's
Tutorials
| Categories: Graphics : Images |