Reference for the Mosaic class Resources::Bitmap

Resources::Bitmap
Animated
FrameDelay
FrameSize
Mutable
NoOfFrames
Core::Resource

SEE ALSO

Project member to define constant, localized bitmap resource data.

The class Resources::Bitmap provides the base functionality to handle bitmaps. A bitmap consists of at least one frame (an image). If there are more than one frame stored within the bitmap, the bitmap is called 'multi-frame'. Such multi-frame bitmaps are very useful e.g. to run short video sequences.

This class implements a set of properties to query or change bitmap attributes. For example, the property FrameSize stores the size of a single bitmap frame in pixel. The property NoOfFrames determines how many frames are available in the bitmap.

Usually, bitmaps are created at the design time by drag-and-drop them from the Embedded Wizard Gallery into the Composer window where you are editing your GUI project. The bitmap attributes will be determined in the Embedded Wizard Inspector.

property bool Animated = false;

The property 'IsAnimated' determines whether the content of the bitmap can be animated similarly to a short video. The bitmap can be animated if it contains more than one frame and if it has a valid animation delay. See the properties NoOfFrames and FrameDelay.

property int32 FrameDelay = 0;

The property 'FrameDelay' determines the interval in milliseconds between two consecutive frames within an animated bitmap. If it is zero, the bitmap is not animated.

property point FrameSize = <0,0>;

The property 'FrameSize' determines the size in pixel of a single frame within the bitmap. In case of multi-frame bitmaps, all frames have the same size.

property bool Mutable = false;

The property 'Mutable' determines whether the content of the bitmap can change at the runtime or not. If the bitmap was loaded from a resource, the bitmap can't be modified and thus it is not mutable.

property int32 NoOfFrames = 1;

The property 'NoOfFrames' determines how many frames belong to the bitmap. A frame is an image within the bitmap. Multi-frame bitmaps thus contain several images. At the runtime the frames can be selected or the entire set of frames can be animated similarly to a video sequence. A bitmap consists of at least one frame.