Previous Document Next Document

Object Model Reference : Classes : F : Fill : Methods : Fill.ApplyPatternFill


Fill.ApplyPatternFill

Function ApplyPatternFill(Type As cdrPatternFillType, [FileName As String], [PatternCanvasIndex As Long = 1], [FrontColor As Color], [EndColor As Color], [TransformWithShape As Boolean = False]) As PatternFill

Description

Member of Fill

The ApplyPatternFill method applies a pattern fill to a shape. There are three types of pattern fills: two-color, full-color vector, and bitmapped.

Parameter
Description
Type
Specifies the type of the pattern fill and returns cdrPatternFillType
FileName
Specifies the full path and filename of the graphic that is imported as a pattern fill. This parameter is optional.
PatternCanvasIndex
Specifies the pattern canvas by its index number. This parameter is optional, and its default value is 1.
FrontColor
Specifies the foreground color for the pattern fill. This parameter is optional, and its default value is Nothing.
EndColor
Specifies the background color for the pattern fill. This parameter is optional, and its default value is Nothing.
TransformWithShape
Specifies whether to transform the pattern fill with the shape. This parameter is optional, and its default value is False.

VBA example

The following VBA example creates a rectangle and applies a bitmapped pattern fill to it.

Sub Test()
 Dim s As Shape
 Set s = ActiveLayer.CreateRectangle(0, 0, 5, 5)
 s.Fill.ApplyPatternFill cdrBitmapPattern, Application.Path + "Custom Data\Canvas\breadc.pcx"
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.