Previous Document Next Document

Object Model Reference : Classes : P : PatternFill : Properties : PatternFill.OriginX


PatternFill.OriginX

Property OriginX As Double

Description

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.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.