Previous Document Next Document
SubPath.GetPosition

Sub GetPosition(PositionX As Double, PositionY As Double)

Member of SubPath

The GetPosition method returns the horizontal and vertical position of a subpaths’ head, as if the subpath were a separate shape object.

Parameters
Description
PositionX
Returns the x-, or horizontal, coordinate of a subpath’s starting point, measured in document units
PositionY
Returns the y-, or vertical, coordinate of a subpath’s starting point, measured in document units

The following code example draws a bounding rectangle around each subpath in the selected curve:

Sub Test() 
 Dim sp As SubPath 
 Dim x As Double, y As Double 
 ActiveDocument.ReferencePoint = cdrBottomLeft 
 For Each sp In ActiveShape.Curve.Subpaths 
  sp.GetPosition x, y 
  ActiveLayer.CreateRectangle2 x, y, sp.SizeWidth, sp.SizeHeight 
 Next sp 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.