Previous Document Next Document

Object Model Reference : Classes : C : CrossPoint : Properties : CrossPoint.PositionX


CrossPoint.PositionX

Property PositionX As Double

Description

Member of CrossPoint

The PositionX property returns the x-coordinate of the point of intersection of curve segments.

The PositionX property returns a read-only value.

VBA example

The following VBA example creates two intersecting ellipses and combines them into a single curve. At the intersections of the ellipses (now subpaths), small circles are created.

Sub XPosition()
 Dim s1 As Shape, sr As New ShapeRange
 Dim s As Shape
 Dim cps As CrossPoints
 Dim cp As CrossPoint
 sr.Add ActiveLayer.CreateEllipse2(4, 4, 3)
 sr.Add ActiveLayer.CreateEllipse2(5, 3, 2)
 Set s = sr.Combine
 Set cps = s.Curve.Subpaths(1).GetIntersections(s.Curve.Subpaths(2))
 For Each cp In cps
  ActiveLayer.CreateEllipse2 cp.PositionX, cp.PositionY, 0.1
 Next cp
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.