Object Model Reference : Classes : C : CrossPoint : Properties : CrossPoint.Offset |
Property Offset As Double
Member of CrossPoint
The Offset property returns the offset distance from the intersection point to the beginning of the subpath (segment). The value depends on the OffsetType parameter in the call to GetIntersections.
The default value of the offset distance in CorelDRAW is 0.5 document units.
The Offset property returns a read-only value.
The following VBA example creates two intersecting line segments and determines where they intersect. The first segment is then broken apart at that point.
Sub CrossPointOffset() |
Dim s As Shape |
Dim spath As SubPath |
Dim cps As CrossPoints |
Set s = ActiveLayer.CreateLineSegment(0, 0, 4, 4) |
Set spath = s.Curve.CreateSubPath(0, 4) |
spath.AppendLineSegment 4, 0, False |
Set cps = s.Curve.Segments(1).GetIntersections(s.Curve.Segments(2)) |
s.Curve.Subpaths(1).BreakApartAt cps(1).Offset |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.