Sets the image zoom (i.e. by setting Zoom), but does so with smooth zoom (image will slowly zoom to the new value).
If ZoomX and ZoomY are not -1 then the zoom will be centered at a specified position (specified in client coordinates). This is like calling ZoomAt.
// Zoom into the current mouse position var mc: TPoint; begin mc := ImageEnView1.ScreenToClient( Mouse.CursorPos ); ImageEnView1.SetZoomSmooth( 300, 8, mc.x, mc.y ); end;
// Following code is same as using ImageEnView1.MouseInteractGeneral := miSmoothZoom; procedure TForm1.ImageEnView1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Button = mbLeft then ImageEnView1.SetZoomSmooth( ImageEnView1.Zoom * 2 ) else if Button = mbRight then ImageEnView1.SetZoomSmooth( ImageEnView1.Zoom / 2 ); end;