Object Model Reference : Classes : R : Rectangle : Properties : Rectangle.EqualCorners |
Property EqualCorners As Boolean
Member of Rectangle
The EqualCorners property returns True if all four corners of a rectangle have the same corner radius (if any at all).
The EqualCorners property returns a read-only value.
The following VBA example checks whether each rectangle on the current page has equal corners. The radius of the smallest corner is applied to each rectangle with unequal corners.
Sub Test() |
Dim s As Shape |
Dim r As Rectangle |
Dim d As Long |
For Each s In ActivePage.FindShapes(Type:=cdrRectangleShape) |
Set r = s.Rectangle |
If Not r.EqualCorners Then |
d = r.CornerLowerLeft |
If d > r.CornerLowerRight Then d = r.CornerLowerRight |
If d > r.CornerUpperLeft Then d = r.CornerUpperLeft |
If d > r.CornerUpperRight Then d = r.CornerUpperRight |
r.SetRoundness d |
End If |
Next s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.