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

Shape.Offset 方法 (Visio)Shape.Offset Method (Visio)

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

将形状偏移一段指定距离。Offsets a shape a specified amount.

语法Syntax

表达式偏移量距离expression . Offset( Distance )

表达式_一个表示一个Shape对象的变量。_expression A variable that represents a Shape object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
距离Distance必需RequiredDoubleDouble指定形状要偏移的距离。Specifies the distance to offset the shape.

返回值Return Value

Nothing

注解Remarks

调用的偏移方法等效于单击 Microsoft Visio 用户界面中的偏移量(在开发人员选项卡上的形状设计组中单击操作)。Calling the Offset method is equivalent to clicking Offset in the Microsoft Visio user interface (click Operations in the Shape Design group on theDeveloper tab).

指定的直线或曲线,偏移量作为一对线条或曲线的等距原始线条或曲线的实现。偏移的形状继承原始形状中的线条图案。它们不继承任何填充图案或文字原始形状中。For a specified line or curve, the offset is implemented as a pair of lines or curves that are equidistant from the original line or curve. Offset shapes inherit line patterns from the original shapes. They do not inherit any fill patterns or text from the original shapes.

示例Example

(VBA) 宏此 Microsoft Visual Basic for Applications 演示如何偏移方法用于按指定量偏移线形状。This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Offset method to offset a line shape by a specified amount.

Public Sub Offset_Example() 

 Dim vsoShape As Visio.Shape 

 Set vsoShape = Application.ActiveWindow.Page.DrawLine(3, 3, 6, 6) 

 ActiveWindow.DeselectAll 
 ActiveWindow.Select vsoShape, visSelect 
 vsoShape.Offset(2) 

End Sub
© 2018 Microsoft