QPx_SetAreaZoomFactor

QPx_SetAreaZoomFactor(areaRef; areaRef):error
areaRef Longint QPix area reference
zoomFactor Real Zoom factor
error Longint Error result

Set the zoom factor of a scrollable QPix plug-in area

The QPix plug-in area is specified by areaRef. If areaRef is not a valid QPix plug-in area reference, qpx_paramErr is returned.

Parameter zoomFactor specifies the zoom factor. It must be in the range of <sup>1</sup>&frasl;<sub>16</sub> to 16. Passing 1 as the zoom factor displays the area content in normal size (100%).

In addition to the normal zoom values, zoomFactor can be set to one of the following constants. These will cause auto-zooming to fit the image within the plug-in area as described below:

qpx_ZoomToFitHorz -1 Adjust zooming so that the image fits within the plug-in area horizontally. The result zooming will not be greater than 100% (normal size).
qpx_ZoomToFitVert -2 Adjust zooming so that the image fits within the plug-in area vertically. The result zooming will not be greater than 100% (normal size).
qpx_ZoomToFit -3 Adjust zooming so that the image fits within the plug-in area both horizontally and vertically. The result zooming will not be greater than 100% (normal size).
qpx_ZoomToFill -4 Adjust zooming so that the image fills the plug-in area horizontally and vertically. The result zooming will not be greater than 100% (normal size).

To allow auto-zooming above 100%, add qpx_ZoomCanStretch.

qpx_ZoomCanStretch -8 When added to the other zooming constants, allows zooming to be greater than 100%.

Related commands

QPx_GetAreaZoomFactor Get the zoom factor of a scrollable QPix plug-in area