Previous Document Next Document

Object Model Reference : Classes : D : Document : Properties : Document.ReferencePoint


Document.ReferencePoint

Property ReferencePoint As cdrReferencePoint

Description

Member of Document

The ReferencePoint property specifies the reference point whose coordinates are set or retrieved. It controls how the Shape.PositionX and Shape.PositionY properties function.

The reference point defines a central point in the document for the positioning of objects in the document.

VBA example

The following VBA example creates ellipses at four corners of the bounding box of the first selected object and in the center of the object.

Private Sub DrawEllipse(s As Shape)
 ActiveDocument.ActiveLayer.CreateEllipse2 s.PositionX, s.PositionY, 0.1
End Sub
Sub Test()
 Dim s As Shape
 Set s = ActiveShape
 ActiveDocument.ReferencePoint = cdrTopLeft
 DrawEllipse s
 ActiveDocument.ReferencePoint = cdrTopRight
 DrawEllipse s
 ActiveDocument.ReferencePoint = cdrBottomLeft
 DrawEllipse s
 ActiveDocument.ReferencePoint = cdrBottomRight
 DrawEllipse s
 ActiveDocument.ReferencePoint = cdrCenter
 DrawEllipse s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.