Previous Document Next Document
Document.ReferencePoint

Property ReferencePoint As cdrReferencePoint

Member of Document

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

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

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