Previous Document Next Document

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


CrossPoint.PositionY

Property PositionY As Double

Description

Member of CrossPoint

The PositionY property returns the y-coordinate of the point of intersection of curve segments.

The PositionY 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 YPosition()
 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.