Previous Document Next Document

Object Model Reference : Classes : C : Curve : Methods : Curve.BindToDocument


Curve.BindToDocument

Sub BindToDocument(Document As Document)

Description

Member of Curve

The BindToDocument method attaches a curve in memory to a document so that the document’s system of measurement can be referenced.

Parameter
Description
Document
Specifies the name of the document

VBA example

The following VBA example creates a shape similar to a snowman. It then creates a curve similar to the shape and fills the curve with green.

Sub Test()
 Dim s1 As Shape, s2 As Shape, sCurve As Shape
 Dim c As Curve
 Set s1 = ActiveDocument.ActiveLayer.CreateEllipse2(4, 6.5, 0.5)
 Set s2 = ActiveDocument.ActiveLayer.CreateEllipse2(4, 5, 1)
 s1.Fill.ApplyUniformFill CreateRGBColor(255, 0, 0)
 s2.Fill.ApplyUniformFill CreateRGBColor(0, 0, 255)
 Set c = New Curve
 c.BindToDocument ActiveDocument
 c.AppendCurve s1.DisplayCurve
 c.AppendCurve s2.DisplayCurve
 Set sCurve = ActiveLayer.CreateCurve(c)
 sCurve.Move 1, 1
 sCurve.Fill.ApplyUniformFill CreateRGBColor(0, 255, 0)
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.