ImageEn, unit iexTransitions

GetPanZoomEffectStartEndRects

GetPanZoomEffectStartEndRects

Declaration

procedure GetPanZoomEffectStartEndRects(IEClientWidth, IEClientHeight: Integer;
                                        BitmapWidth, BitmapHeight: Integer;
                                        PanZoomEffect: TIEPanZoomType;
                                        MaxZoom: Integer;
                                        out StartRect: TRect;
                                        out EndRect: TRect;
                                        MaintainAspectRatio: Boolean = False);

Description

Calculate the starting and ending positions for a Pan/Zoom effect.
Parameter Description
IEClientWidth, IEClientHeight Size of of the display window, e.g. a TImageEnView
BitmapWidth, BitmapHeight Dimensions of the bitmap
PanZoomEffect Pan/Zoom effect to use
MaxZoom For zoom effects, how much should we zoom in/out, e.g. 20 for 20%
StartRect Will be filled with the first display position
EndRect Will be filled with the last display position
MaintainAspectRatio Set to true to ensure the image always maintains the image's original ratio when stretching

Demos

Demo  Demos\Display\PanZoomEffects\PanZoom.dpr
Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr