Previous Document Next Document

Object Model Reference : Classes : C : Curve : Properties : Curve.Closed


Curve.Closed

Property Closed As Boolean

Description

Member of Curve

The Closed property returns or specifies the value of a curve object’s closed status. Curves are closed if all of its subpaths are closed. Assigning a value to this property opens or closes the curve (all subpaths).

VBA example

The following VBA example selects an object in the active document and determines if the object is a curve object. If the selection is a curve, it changes its Closed status to True, joining all of the segments in the shape to make a self-contained object. A color fountain fill is then applied to the new closed curve object using the Application.CreateColorEx method.

Sub CurveClosed()
 Dim s As Shape
 Set s = ActiveSelection.Shapes(1)
 If s.Type = cdrCurveShape Then
  s.Curve.Closed = True
 End If
 s.Fill.ApplyFountainFill CreateColorEx(5005, 255, 0, 0), _
 CreateColorEx(5005, 0, 0, 0), 1
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.