ImageEn, unit iemview




procedure InsertTransitionFramesEx(Idx : Integer; iFrameCount : Integer; Effect : TIETransitionType;
                                   StartRect, EndRect : TRect; RectMaintainAspectRatio : boolean = True;
                                   iWidth : Integer = -1; iHeight : Integer = -1; bStretchSmall : Boolean = False;
                                   BackgroundColor : TColor = -1; ResamplingFilter : TResampleFilter;
                                   Smoothing: Integer = 96; Timing : TIETransitionTiming = iettLinear);


This is an extended version of InsertTransitionFrames that includes more parameters and is primarily used when you need to create a series of frames that show a Pan Zoom from StartRect to EndRect for the image specified at Idx - 1.

Parameter Description
Idx The insertion position
iFrameCount The number of frames to insert
Effect The desired transition effect
StartRect When using an iettPanZoom effect this is the portion of the image that is shown at the start
EndRect When using an iettPanZoom effect this is the portion of the image that is shown at the end
RectMaintainAspectRatio ImageEn will ensure that the starting and ending rects are automatically adjusted to ensure the resultant image has the correct aspect ratio (iettPanZoom only)
iWidth, iHeight The size to create the transition bitmaps. If either of these are -1 then the size will be the larger of the two images in each dimension. Aspect Ratios will be maintained and any non-image area will be filled with BackgroundColor.
bStretchSmall If the images are smaller than the transition bitmap size (iWidth x iHeight) should they be stretched to fit (which can lead to distortion).
BackgroundColor The color that will be used for blank frames or non-image area (if -1 then Background is used)
ResamplingFilter The algorithm that is used to improve quality when resizing images
Timing The rate at which the transition progresses
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

- Does not call OnCreateImage
- Cannot be used if a TIEDBMultiBitmap is attached to the control


// Create ten Pan Zoom frames for the image at index 5

// Top Left corner of image
StartingRect := Rect(0, 0, ImageEnMView1.ImageWidth[5] div 4, ImageEnMView1.ImageHeight[5] div 4);

// Bottom right corner of image
EndingRect := Rect(MulDiv(ImageEnMView1.ImageWidth[5], 3, 4), MulDiv(ImageEnMView1.ImageHeight[5], 3, 4), ImageEnMView1.ImageWidth[5], ImageEnMView1.ImageHeight[5]);

// Create frames
ImageEnMView1.InsertTransitionFramesEx(5, 10, iettPanZoom, StartRect, EndRect);

See Also

- InsertTransitionFrames