Object Model Reference : Classes : E : Ellipse : Methods : Ellipse.GetRadius |
Sub GetRadius(HRadius As Double, VRadius As Double)
Member of Ellipse
The GetRadius method retrieves the horizontal and vertical radii of an ellipse.
Using GetRadius is equivalent to getting the values of both the HRadius and VRadius properties at the same time.
Parameter
|
Description
|
HRadius
|
Specifies the horizontal radius of an ellipse, measured in document units
|
VRadius
|
Specifies the vertical radius of an ellipse, measured in document units
|
The following VBA example increases the radius of the ellipse both horizontally and vertically by 2". Changing the radius of an ellipse causes its center to move. To preserve the center position of the ellipse, the GetCenterPosition and SetCenterPosition methods are used.
Sub Test() |
Dim x As Double, y As Double |
Dim rx As Double, ry As Double |
With ActiveShape.Ellipse |
.GetCenterPosition x, y |
.GetRadius rx, ry |
.SetRadius rx + 2, ry + 2 |
.SetCenterPosition x, y |
End With |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.