ImageEn, unit imageenview

TImageEnView.AutoShrink

TImageEnView.AutoShrink


Declaration


property AutoShrink: Boolean;


Description


When enabled the following display rules are used:
- If an image is bigger than TImageEnView window it is shrunk to fit;
- If an image is smaller than TImageEnView window it is displayed 100%

Note: Changes will not take effect until you call Update (or update the display by zooming or loading an image, for example). To make it automatically update, add iedoDisableAutoFitWhenZoom to DisplayOptions


Example


procedure TForm1.chkAutoShrinkClick(Sender: TObject);
begin
  ImageEnView1.AutoShrink := chkAutoShrink.Checked;
  if not chkAutoShrink.Checked then
    ImageEnView1.Zoom := 100
  else
    ImageEnView1.Fit();
end;


See Also


- AutoStretch
- loFitToLayersWhenZooming
- iedoDisableAutoFitWhenZoom