ImageEn, unit imageenview

TImageEnView.Zoom

TImageEnView.Zoom


Declaration

property Zoom: double;


Description

Use the Zoom property to zoom in or out of the image. The image itself is not modified, only its display size changes.
Zoom is expressed as a percentage of its native size, i.e. 100 is normal size, values less than 100 decrease the display size and values greater than 100 increase the display size.

Note:
Zoom will only have a temporary effect if AutoShrink or AutoStretch is enabled, unless you add iedoDisableAutoFitWhenZoom to DisplayOptions
Use ZoomFilter to improve the quality when zooming
By default, scrolling the mouse wheel will zoom the view. You can limit the bounds of the zoom using OnZoomIn and OnZoomOut


See Also

ZoomX
ZoomY
ZoomIn
ZoomOut
OnZoomIn
OnZoomOut


Examples

// Half size: a 200x200 pixel image is displayed at a size of 100x100
ImageEnView.Zoom := 50;

// Double size: a 200x200 pixel image is displayed at a size of 400x400
ImageEnView.Zoom := 200;

// floating point zoom
ImageEnView.Zoom := 30.25;

// Show image zoom based on its DPI
// Note: More accurately you should get the PPI for the display monitor (e.g. Form.CurrentPPI)
Caption := IntToStr( Round( ImageEnView1.Zoom / ImageEnView1.IO.Params.Dpi * Screen.PixelsPerInch )) + '%';

// Display image at 100% based on its DPI
// Note: More accurately you should get the PPI for the display monitor (e.g. Form.CurrentPPI)
ImageEnView1.Zoom := ImageEnView1.IO.Params.Dpi / Screen.PixelsPerInch * 100;