ImageEn, unit imageenview

TImageEnView.RunTransition

TImageEnView.RunTransition


Declaration

procedure RunTransition(Effect : TIETransitionType; Duration : integer); overload;
procedure RunTransition(Effect : TIETransitionType; Duration : integer; StartRect, EndRect : TRect; MaintainAspectRatio : Boolean; Smoothing: Integer = 96); overload;
procedure RunTransition(Effect : TIETransitionType; Duration : integer; PanZoomEffect : TIEPanZoomType; iZoomLevel : Integer; Smoothing: Integer = 96); overload;


Description

RunTransition starts the transition using Effect and Duration parameters.

Effect specifies the effect. Duration specifies the display time of the transition in milliseconds.

If effect is iettPanZoom then use one of the overloaded versions.

Pan-Zoom Overload 1:
Value Description
StartRect The starting rectangle of an iettPanZoom transition (specified in bitmap points)
EndRect The ending rectangle of an iettPanZoom transition (specified in bitmap points)
MaintainAspectRatio StartRect and EndRect will be automatically adjusted to ensure the image appears with the correct aspect ratio
Smoothing In order to reduce the "jumpiness" of pan-zoom effects, transition frames are alpha blended. A low value will improve smoothness, but increase blurriness. A high value will improve clarity, but increase jumpiness. Typical range is 64 - 196. 255 means no alpha blending
            
Pan-Zoom Overload 2:
Value Description
PanZoomEffect One of ImageEn's built-in Pan-Zoom effects
iZoomLevel If the specified PanZoomEffect is a "Zoom" type, then this specifies the maximum amount to zoom in, e.g. 20%
Smoothing In order to reduce the "jumpiness" of pan-zoom effects, transition frames are alpha blended. A low value will improve smoothness, but increase blurriness. A high value will improve clarity, but increase jumpiness. Typical range is 64 - 196. 255 means no alpha blending


iettCubeRotateFromLeft2




iettShreddedFromLeft




iettRandomBoxesWithWord




Demos

Demo  Demos\Display\Transitions\Transitions.dpr
Demo  Demos\Display\PanZoomEffects\PanZoomEffects.dpr


Examples

// Transition from Image1.jpg to Image2.jpg with "Randon Points" transition
ImageEnView1.IO.LoadFromFile('D:\image1.jpg'); // Load initial image
ImageEnView1.PrepareTransition; // Prepare the transition
ImageEnView1.IO.LoadFromFile('D:\image2.jpg'); // Load the next image (but does not display it)
ImageEnView1.RunTransition(iettRandompoints, 500); // Execute the transition


// Pan from the top-left corner of the image to the bottom-right (Image is 600 x 800)
ImageEnView1.PrepareTransition;
ImageEnView1.IO.LoadFromFile('D:\image.jpg');
ImageEnView1.RunTransition(iettPanZoom,
                           2000, // 2 second transition
                           Rect(0, 0, 300, 400), // Top-left quarter
                           Rect(300, 400, 600, 800), // Bottom-right quarter
                           True); // Automatically adjust starting and ending rect to ensure the transition does not distort the image

// Pan from the top-left corner of the image to the bottom-right
ImageEnView1.PrepareTransition;
ImageEnView1.IO.LoadFromFile('D:\image.jpg');
ImageEnView1.RunTransition(iettPanZoom,
                           2000, // 2 second transition
                           iepzPanTopLeftToBottomRight,
                           20);


// Set properties for Word transition
IEGlobalSettings().WordTransitionParams.Word := 'BLAM';
IEGlobalSettings().WordTransitionParams.FontName := 'Arial';
IEGlobalSettings().WordTransitionParams.Style := [fsBold];

// Prepare ImageEnView1 for a transition (e.g. so loading the image will not immediately update the display)
ImageEnView1.PrepareTransition;

// Load the next image
ImageEnView1.io.LoadFromFile( GetNextImage() );

// Run the transition
ImageEnView1.RunTransition( iettRandomBoxesWithWord, 1000 );





See Also

- PrepareTransition
- TransitionRunning
- AbortTransition