Object Model Reference : Classes : P : PatternFill : Properties : PatternFill.OriginX |
Property OriginX As Double
Member of PatternFill
The OriginX property returns or specifies the x-coordinate of the point of origin for a pattern.
The OriginX property is measured in document units.
The following VBA 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 |
Copyright 2013 Corel Corporation. All rights reserved.