ImgArea_SetAutoZoom¶
→ | areaRef |
Longint | The plug-in area reference. |
→ | autoZoom |
Longint | The auto-zoom mode. |
Set the plug-in area’s auto-zoom mode
The plug-in area is specified by imageRef
.
The plug-in area’s auto-zoom mode is specified by autoZoom
. The auto-zoom mode
is an instruction to set the plug-in area’s zooming so that the image fits
horizontally, vertically, or both. The constants in the Image Area Auto Zoom
group can be used to set the auto-zoom mode:
Combining kImgAreaAutoZoomSticky
with any of kImgAreaAutoZoomToFitHorz
, kImgAreaAutoZoomToFitVert
,
and kImgAreaAutoZoomToFit
makes the auto-zoom sticky: when the plug-in area is resized, the
zoom factor is re-calculated so that the zoom mode is applied to the new area dimensions.
The sticky auto-zoom mode is cancelled when the zoom factor is set explicitly by calling
ImgArea_SetZoomFactor
, or when ImgArea_SetAutoZoom
is called
with a non-sticky auto-zoom mode. While the area is in auto-zoom mode,
ImgArea_GetZoomFactor
returns the area’s current zoom factor.