CwSetViewZoom

Syntax:

call CwSetViewZoom nX, nY, nWidth, nHeight

        nX      (numeric) Horizontal coordinate of the top-left corner
                of the zoom rectangle

        nY      (numeric) Vertical coordinate of the top-left corner
                of the zoom rectangle

        nWidth  (numeric) Width of the zoom rectangle

        nHeight (numeric) Height of the zoom rectangle

Description:

This procedure zooms the current view to the area denoted by the rectangle described by nX, nY, nWidth and nHeight. The point nX, nY is actually the location of the center of the rectangle in the current unit. nWidth and nHeight are the width and height of the rectangle, also in the current unit. (See CwSetUnit and CwGetUnit for an explanation of units.)

Example:

/* This example zooms to the current selection rectangle.  Running it does the same
   thing as using the "Zoom in" menu option. */

call CwGetSelectionRectangle rect
call CwSetViewZoom rect.x, rect.y, rect.width, rect.height

Remarks:

The actual zoom rectangle may be larger than the specified rectangle. This is because the zoom rectangle must have the same aspect ratio of the current view. As such, either the width or height will be enlarged to fit the view. This is why CwGetView may not return exactly the same rectangle as set with CwGetView.

Functions by NAME

Index

Functions by PURPOSE