Previous Document Next Document

Object Model Reference : Classes : S : Shape : Properties : Shape.DisplayCurve


Shape.DisplayCurve

Property DisplayCurve As Curve

Description

Member of Shape

The DisplayCurve property returns a curve representing the current shape, letting you get a curve from a shape (such as a rectangle, ellipse, or polygon) without having to first convert the shape to a curve.

 
The curve returned by this property is read-only, so you cannot modify it. However, you can retrieve a copy in memory by using the Curve.GetCopy method, after which you can modify the curve.

The DisplayCurve property returns a read-only value.

VBA example

The following VBA example creates a large circle and places 50 small circles along its path.

Sub Test()
 Const Steps As Long = 50
 Dim s As Shape, sp As SubPath
 Dim x As Double, y As Double
 Dim t As Double
 Set s = ActiveLayer.CreateEllipse(0, 0, 5, 5)
 For Each sp In s.DisplayCurve.Subpaths
  For t = 0 To Steps - 1
   sp.GetPointPositionAt x, y, t / Steps
   ActiveLayer.CreateEllipse2 x, y, 0.05
  Next t
 Next sp
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.