ImageEn, unit imageenview

TImageEnView.Fit

TImageEnView.Fit


Declaration


procedure Fit(StretchSmall : Boolean = True);


Description


Adjusts Zoom so that the image fits within the client area of the component (while respecting the aspect ratio).
If StretchSmall is false, then images that are smaller than the window are shown 1:1 (i.e. are not zoomed more than 100%).

Note: Fit will only have a temporary effect if AutoShrink or AutoStretch is enabled, unless you add iedoDisableAutoFitWhenZoom to DisplayOptions


Example


// Display the entire image (including outlying layers) within the view
ImageEnView1.LayerOptions := ImageEnView1.LayerOptions + [ loFitToLayersWhenZooming ];
ImageEnView1.Fit( False );


See Also


- FitToHeight
- FitToWidth
- loFitToLayersWhenZooming
- Stretch