API Documentation > CorelDRAW > 2025-v26 > PatternFill > IVGPatternFill
PatternFill.OriginX property
Gets or sets the horizontal Origin
Syntax:
Property Get OriginX() As Double
Property Let OriginX(ByVal Value As Double)
Remarks:
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.
Examples:
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
Set s = ActiveLayer.CreateRectangle(0, 0, 4, 4)
s.Style.Fill.LoadFill ("C:\Users\Public\Documents\Corel\Content X7\Fills\30 Vector Pattern 277.fill")
s.Fill.Pattern.MirrorFill = True
s.Fill.Pattern.OriginX = -0.2
s.Fill.Pattern.OriginY = -0.2 
End Sub