API Documentation > CorelDRAW > 2025-v26 > PatternCanvas > IVGPatternCanvas
PatternCanvas.RotateArea method
Rotates the Area
Syntax:
Sub RotateArea(ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long, ByVal Angle As Double)
Parameters:
Name Type Description
x1
Long
y1
Long
x2
Long
y2
Long
Angle
Double
Remarks:
The RotateArea method rotates an area, as defined by two coordinates, of a pattern canvas. The rotation is measured in degrees. Currently, only integer angle values divisible by 90 can be used (for example, 0°, 90°, 180°, and 270°).
Examples:
The following VBA example creates a new fill by rotating the default brick pattern by 90°.
Sub Test()
Dim c As New PatternCanvas
c.PutCopy PatternCanvases(4)
c.RotateArea 0, 0, c.Width - 1, c.Height - 1, 90
With ActiveLayer.CreateRectangle(0, 0, 2, 2)
  .Fill.ApplyPatternFill cdrTwoColorPattern
  .Fill.Pattern.Canvas = c
End With 
End Sub