Previous Document Next Document
PatternFill.TileOffset

Property TileOffset As Long

Member of PatternFill

The TileOffset property returns or sets the offset of pattern tiles in a pattern fill. The value is a percentage of the actual tile size in the pattern fill.

You can use the TileOffsetType property to set the type of offset. A pattern can be offset by row or by column.

The following code example applies a two-color bitmap pattern to a rectangle and offsets rows by 50% relative to each other:

Sub Test() 
 Dim s As Shape 
 Dim pf As PatternFill 
 Set s = ActiveLayer.CreateRectangle(0, 0, 4, 4) 
 Set pf = s.Fill.ApplyPatternFill(cdrTwoColorPattern, , 8) 
 pf.TileWidth = 1 
 pf.TileHeight = 1 
 pf.TileOffsetType = cdrTileOffsetRow 
 pf.TileOffset = 50 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.