Reference for the Mosaic class Views::WarpImage

Views::WarpImage
Animated
Bitmap
Color
Color1
Color2
Color3
Color4
Endless
FrameNumber
OnFinished
Opacity
StartAnimation
StopAnimation
Views::WarpView
AlphaBlended
Clipping
Embedded
LightingEffect
Quality
Shininess
SourceAnchor
SourceArea
Visible
RotateAndScale()
Warp3D()
Core::QuadView
Point1
Point2
Point3
Point4
HasRectShape()
IsPointInside()
Core::View
Layout
Owner
StackingPriority
ArrangeView()
ChangeViewState()
CursorHitTest()
Draw()
GetExtent()
GetRoot()
HandleEvent()
MoveView()

SEE ALSO

Using the Warp Image view to display a bitmap stretched, scaled and rotated in the 3D space.

The class Views::WarpImage provides a kind of view able to show a bitmap scaled and rotated in the 2D/3D space. The bitmap is determined by the property Bitmap. In case of a multi-frame bitmap the desired frame can be selected by the property FrameNumber. The animation of bitmaps containing short video sequences is controlled by the properties Animated and Endless. Alternatively, the animation can be controlled by sending signals to the slot methods StartAnimation and StopAnimation.

First of all, Embedded Wizard is not a 3D GUI development tool! Its lightweight 3D functionality is limited to the perspectively correct projection of an image onto a quad (four corners polygon). Depending on this polygon's shape, different kinds of transformations are possible, e.g. scaling, rotation or mirroring. The polygon is determined by the four corners Point1, Point2, Point3 and Point4. Moving these corners is thus sufficient to determine the desired transformation.

More sophisticated way to control the transformations is provided by the methods RotateAndScale() and Warp3D(). These methods derive the polygon coordinates automatically from the given parameters.

The properties Color, Color1, Color2, Color3 and Color4 can be used to tint the bitmap or to modulate its transparency. For each polygon corner different color can be set, so the bitmap can be shown with fancy color or opacity gradients. The particular effect of the colors depends on the type of the bitmap:

The visibility of the view is controlled by the properties Visible, AlphaBlended, Opacity and Embedded. In particular the property Embedded can determine whether the corresponding view is limited (== embedded) to the boundary of a sibling Core::Outline view or not. The embedding of views within a Core::Outline allows a kind of sub-groups within the GUI component itself. Very useful for any kind of scrollable lists, menus, etc.

property bool Animated = false;

The property 'Animated' determines whether the view may play animated bitmaps. Assigning the value 'true' to this property can cause the view to re-start the animated bitmap with the frame specified in the property FrameNumber. The value 'false' in contrast stops the running animated bitmap at its current position. The animation can also be controlled by sending signals to the slot methods StartAnimation and StopAnimation. Animated bitmaps are a special kind of bitmaps containing short video sequences. The animation can work with an animated bitmap only. See Resources::Bitmap.

property Resources::Bitmap Bitmap = null;

The property 'Bitmap' refers to the bitmap object to display in this view. If the bitmap consists of more than one frame, the desired frame number can be determined by the property FrameNumber. If the bitmap is animated, the animation will start if the property Animated is 'true'.

Depending on the property SourceArea the entire bitmap or only its section is shown.

property color Color = #FFFFFFFF;

The property 'Color' controls the color of the entire view. Thus this property is useful if no gradients are desired. The resulting colors can additionally be modulated by the values specified in the properties Color1, Color2, Color3 and Color4.

The effect of this color value depends on the type of the bitmap displayed in this view:

property color Color1 = #FFFFFFFF;

The property 'Color1' stores the color at the corner Point1. This color value can additionally be modulated by the common color value stored in the property Color.

The effect of this color value depends on the type of the bitmap displayed in the view:

property color Color2 = #FFFFFFFF;

The property 'Color2' stores the color at the corner Point2. This color value can additionally be modulated by the common color value stored in the property Color.

The effect of this color value depends on the type of the bitmap displayed in the view:

property color Color3 = #FFFFFFFF;

The property 'Color3' stores the color at the corner Point3. This color value can additionally be modulated by the common color value stored in the property Color.

The effect of this color value depends on the type of the bitmap displayed in the view:

property color Color4 = #FFFFFFFF;

The property 'Color4' stores the color at the corner Point4. This color value can additionally be modulated by the common color value stored in the property Color.

The effect of this color value depends on the type of the bitmap displayed in the view:

property bool Endless = true;

The property 'Endless' determines whether the view should play the animated bitmap endlessly. If this property is 'false', the animation will run only once after it has been started. If it is 'true' the animated bitmap will re-start automatically with the frame specified in the property FrameNumber.

property int32 FrameNumber = 0;

The property 'FrameNumber' determines the bitmap frame to display in this view. Each bitmap consists of either one or more frames (images). The first frame has the number 0, the second frame has the number 1, and so far. Bitmaps containing more than one frame are called multi-frame bitmaps. See Resources::Bitmap.

Changes of this property cause the view to switch the shown frame. If the desired frame is not available in the bitmap, no bitmap is shown. Additionally, the value stored in this property determines the frame to start an animation of an animated bitmap. The animation is controlled by the property Animated.

property slot OnFinished = null;

The property 'OnFinished' can refer to a slot method, which should be invoked when the animation is done. It's up to you to provide the slot method and to fill it with the desired behavior. It makes possible to chain animations together, so the finish of one animation can trigger another animation. To do this simply assign the StartAnimation slot method of the one view to the OnFinished property of the other view.

property int32 Opacity = 255;

The property 'Opacity' controls the translucence of the view. This property can take values in range of 0 .. 255. If the value is 255, the view will appear with its full opacity. The value equal to zero results in a fully transparent view. Other values in the range 1 .. 254 show a semitransparent views.

slot StartAnimation;

The slot method 'StartAnimation' re-starts the animated bitmap if a signal is sent to this slot method. The animation will start with the frame specified in the property FrameNumber. Animated bitmaps are a special kind of bitmaps containing short video sequences. The method has no effect if the bitmap can't be animated. See Resources::Bitmap.

slot StopAnimation;

The slot method 'StopAnimation' stops the running animated bitmap if a signal is sent to this slot method. This causes the animation to pause at its current position. Animated bitmaps are a special kind of bitmaps containing short video sequences. See Resources::Bitmap.