Previous Document Next Document

Object Model Reference : Classes : S : SubPath : Methods : SubPath.GetPosition


SubPath.GetPosition

Sub GetPosition(PositionX As Double, PositionY As Double)

Description

Member of SubPath

The GetPosition method returns the horizontal and vertical positions of a subpath head, treating the subpath a separate object.

Parameter
Description
PositionX
Specifies, in document units, the x-coordinate of the subpath’s starting point
PositionY
Specifies, in document units, the y-coordinate of the subpath’s starting point

VBA example

The following VBA 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 2013 Corel Corporation. All rights reserved.