DrawOval 方法 (Visio)Page.DrawOval method (Visio)

将一个椭圆 (椭圆形) 添加到页面的Shapes集合中。Adds an oval (ellipse) to the Shapes collection of a page.

语法Syntax

expressionexpression. DrawOval( _x1_ , _y1_ , _x2_ , _y2_ )

_表达式_一个代表**Page** 对象的变量。expression A variable that represents a Page object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
x1x1 必需Required DoubleDouble 椭圆的宽度-高度框的一个角的 x 轴坐标值。The x-coordinate of one corner of the ellipse's width-height box.
y1y1 必需Required DoubleDouble 椭圆的宽度-高度框的一个角的 y 轴坐标值。The y-coordinate of one corner of the ellipse's width-height box.
x2x2 必需Required DoubleDouble 椭圆的宽度-高度框的另一个角的 x 轴坐标值。The x-coordinate of the other corner of the ellipse's width-height box.
y2y2 必需Required DoubleDouble 椭圆的宽度-高度框的另一个角的 y 轴坐标值。The y-coordinate of the other corner of the ellipse's width-height box.

返回值Return value

ShapeShape

说明Remarks

使用DrawOval方法等效于在应用程序中使用椭圆工具。Using the DrawOval method is equivalent to using the Ellipse tool in the application. 参数以放置椭圆的页面、主控形状或组的坐标空间的内部绘图单位表示。The arguments are in internal drawing units with respect to the coordinate space of the page, master, or group where the ellipse is being placed.

示例Example

以下示例显示如何在活动页上绘制一个椭圆。The following example shows how to draw an oval (ellipse) on the active page.

 
Public Sub DrawOval_Example() 
 
 Dim vsoShape As Visio.Shape 
 
 Set vsoShape = ActivePage.DrawOval(1.5, 10.5, 7.5, 6.5) 
 
End Sub

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.