API Documentation > CorelDRAW > 2025-v26 > Transparency > IVGTransparency
Transparency.ApplyPatternTransparency method
Applies a pattern fill transparency to the object
Syntax:
Function ApplyPatternTransparency(ByVal Type As cdrPatternFillType, Optional ByVal FileName As String, Optional ByVal PatternCanvasIndex As Long = 1, Optional ByVal Front As Long = 0, Optional ByVal Back As Long = 100, Optional ByVal TransformWithShape As Boolean = False) As PatternFill
Parameters:
Name Type Description
Type
FileName
String
PatternCanvasIndex
Long
Specifies the pattern canvas in the pattern-fill transparency.
Front
Long
Back
Long
TransformWithShape
Boolean
Specifies whether to transform the pattern-fill transparency along with any changes made to the shape. A value of True changes the pattern-fill transparency along with its shape.
Remarks:
The ApplyPatternTransparency method applies a pattern-fill transparency to a shape.
Examples:
The following VBA example applies a two-color pattern-fill transparency to a rectangle.
Sub Test()
Dim s As Shape
Set s = ActiveLayer.CreateRectangle(0, 0, 2, 2)
s.Fill.UniformColor.RGBAssign 0, 0, 255
s.Transparency.ApplyPatternTransparency cdrTwoColorPattern, , 6 
End Sub