ImageEn, unit imageenview

TImageEnView.PrepareTransition

TImageEnView.PrepareTransition


Declaration

procedure PrepareTransition();


Description

PrepareTransition must be called prior to running a transition effect.
It copies the currently displayed image to an internal buffer, which allows you to change current image (load, update, etc.) before starting the transition with RunTransition.


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

- RunTransition
- TransitionRunning
- AbortTransition