Previous Document Next Document
Ellipse.SetRadius

Sub SetRadius(HRadius As Double, [VRadius As Double])

Member of Ellipse

The SetRadius method specifies both the horizontal and the vertical radii of an ellipse.

Using SetRadius is equivalent to setting the values of both the HRadius and VRadius properties at the same time.

Parameters
Description
HRadius
Sets the horizontal radius of an ellipse and is measured in document units
VRadius
Sets the vertical radius of an ellipse and is measured in document units. If this value is not specified, it is assigned the same value as the HRadius parameter.
This parameter is optional, and its default value is 0.

The following code example increases the radius of the ellipse both horizontally and vertically by 2". Changing the radius of an ellipse causes its center to move. In order to preserve the center position of the ellipse, GetCenterPosition and SetCenterPosition 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.