Previous Document Next Document
PatternFill.OriginX

Property OriginX As Double

Member of PatternFill

The OriginX property returns or sets the x-coordinate of the point of origin for a pattern.

The OriginX property is measured in document units.

The following code example applies a full-color pattern to a rectangle and offsets the first tile by 1" to the right and 1.5" upwards, relative to the lower-left corner of the rectangle:

Sub Test() 
 Dim s As Shape 
 Dim pf As PatternFill 
 Dim FileName As String 
 FileName = Application.SetupPath & "Custom\Patterns\drwx0835.pat" 
 Set s = ActiveLayer.CreateRectangle(0, 0, 4, 4) 
 Set pf = s.Fill.ApplyPatternFill(cdrFullColorPattern, FileName) 
 pf.OriginX = 1 
 pf.OriginY = 1.5 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.