Table of contents
TOC
折叠目录
展开目录

Viewer.ZoomToRect 方法 (Visio Viewer)Viewer.ZoomToRect Method (Visio Viewer)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

缩放以显示 rectanglular 部分中,指定的参数,请在 Microsoft Visio Viewer 中打开的绘图。Zooms to display a rectanglular section, specified by the parameters, of the drawing that is open in Microsoft Visio Viewer.

语法Syntax

表达式ZoomToRectexpression. ZoomToRect( Left, Top, Right, Bottom)

_expression_An 表达式,该表达式返回一个查看器_expression_An expression that returns a Viewer object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
向左Left必需RequiredLongLong要缩放到的矩形的左上角的 x 坐标。The x-coordinate of the top left corner of the rectangle to zoom to.
页首Top必需RequiredLongLong要缩放到的矩形的左上角的 y 坐标。The y-coordinate of the top left corner of the rectangle to zoom to.
向右Right必需RequiredLongLong要缩放到的矩形的右下角的 x 坐标。The x-coordinate of the bottom right corner of the rectangle to zoom to.
靠下Bottom必需RequiredLongLong要缩放到的矩形的右下角的 y 坐标。The y-coordinate of the bottom right corner of the rectangle to zoom to.

返回值Return Value

Nothing

注解Remarks

坐标系统的ZoomToRect方法有其原点在 Visio Viewer 窗口的左上角。正方向是向右 (x) 和 (y) 下。度量单位是像素。The coordinate system for the ZoomToRect method has its origin at the top left corner of the Visio Viewer window. Positive directions are to the right (x) and down (y). The units of measurement are pixels.

ZoomToRect方法中,实际上,裁剪绘图的矩形截面、 指定的参数,然后在整个 Visio Viewer 窗口显示该节。参数是一组坐标、 指定左上角的部分的第一对和两对右下角的两对。The ZoomToRect method, in effect, crops a rectangular section of the drawing, specified by the parameters, and then displays that section in the entire Visio Viewer window. The parameters are a set of two pairs of coordinates, the first pair specifying the upper left corner of the section, and the second pair the lower right corner.

示例Example

下面的代码将缩小以显示在 Visio Viewer 中打开该绘图的矩形截面。左上角的显示部分对应于最初显示 Visio Viewer 窗口的左上角。右下角对应于向下的点 300 像素,左上角原始显示在右侧的 300 像素。The following code zooms to display a rectangular section of the drawing that is open in Visio Viewer. The upper left corner of the displayed section corresponds to the upper left corner of the Visio Viewer window as originally displayed. The lower right corner corresponds to a point 300 pixels down and 300 pixels to the right of the upper left corner in that original display.

vsoViewer.ZoomToRect 0, 0, 300, 300
© 2018 Microsoft