ImageEn, unit imageenview |
|
TImageEnView.FitCropping
Declaration
property FitCropping: Double;
Description
Specifies the amount of image that can be hidden (top/left of portrait images, or left/right side of landscape images) to better fill the control.
This value is a percentage of the difference between the min and max zooms, so 0.0 means no cropping, whereas 1.0 would completely fill the control.
Note:
◼Changes will not take effect until you call
Update. To make it automatically update, add
iedoDisableAutoFitWhenZoom to
DisplayOptions◼If FitCropping > 0, then when first loading an image it will be
centeredDefault: 0.0
// Fill the control with the image (top and bottom of portrait images may not be visible, as with left and right sides of landscape images)
Cropping Examples
// 0% cropping (resulting in 17.9% zoom)
ImageEnView1.FitCropping := 0.0;
ImageEnView1.AutoShrink := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();
// 33% cropping (resulting in 19.4% zoom)
ImageEnView1.FitCropping := 0.33;
ImageEnView1.AutoShrink := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();
// 66% cropping (resulting in 21.8% zoom)
ImageEnView1.FitCropping := 0.66;
ImageEnView1.AutoShrink := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();
// Full cropping (resulting in 24.3% zoom)
ImageEnView1.FitCropping := 1.0;
ImageEnView1.AutoShrink := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();
// Full cropping without scrollbars (resulting in 25.9% zoom)
ImageEnView1.FitCropping := 1.0;
ImageEnView1.ScrollBars := ssNone;
ImageEnView1.AutoShrink := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();
// 200% cropping (resulting in 31.6% zoom)
ImageEnView1.FitCropping := 1.0;
ImageEnView1.AutoShrink := True;
ImageEnView1.AutoStretch := True;
ImageEnView1.Update();
See Also
◼AutoShrink◼AutoStretch◼Fit◼FitMode