![]() |
![]() |
Segment.StartingControlPointAngle
Property StartingControlPointAngle As Double
Member of Segment
The StartingControlPointAngle property returns or sets the angle, in degrees, of the control-point vector of the beginning of a segment.
The following code example constrains control point angles to increments of 45 degrees. Each control-point vector is rotated to the closest angle that is a multiple of 45 degrees.
Sub Test() Dim s As Shape Dim seg As Segment Set s = ActiveShape If s.Type = cdrCurveShape Then For Each seg In s.Curve.Segments If seg.Type = cdrCurveSegment Then seg.StartingControlPointAngle = Constrain(seg.StartingControlPointAngle) seg.EndingControlPointAngle = Constrain(seg.EndingControlPointAngle) End If Next seg End If End Sub Private Function Constrain(a As Double) As Double Constrain = Fix(a / 45 + 0.5) * 45 End Function
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.