API Documentation > CorelDRAW > 2025-v26 > PatternCanvas > IVGPatternCanvas
PatternCanvas.FlipArea method
Flips the Area
Syntax:
Sub FlipArea(ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long, ByVal Axes As cdrFlipAxes)
Parameters:
Name Type Description
x1
Long
y1
Long
x2
Long
y2
Long
Axes
Remarks:
The FlipArea method repositions an area of a pattern canvas, as defined by two coordinates. You can flip the area horizontally or vertically, or both.
Examples:
The following VBA example creates a pattern that uses the Mandelbrot set. The set is built only in the upper half of the complex plane, while the other half is a flipped duplicate.
Sub Test()
Dim c As New PatternCanvas
Dim nx As Long, ny As Long
Dim cx As Double, cy As Double
Dim zx As Double, zy As Double, zz As Double
Dim n As Long
c.Height = 256
c.Width = 256
For nx = 0 To 255
  cx = nx / 100 - 2
  For ny = 0 To 127

 cy = 1.27 - ny / 100

 zx = 0: zy = 0: n = 0

 While n < 10 And zx * zx + zy * zx < 4


zz = zx * zx - zy * zy + cx


zy = 2 * zx * zy + cy


zx = zz


n = n + 1

 Wend

 c.PSet (nx, ny), (n < 10)
  Next ny
Next nx
c.CopyArea 0, 0, 255, 127, 0, 128
' Since the axes are mixed up,
' as a workaround, the following
' command should be called with
' cdrFlipVertical as the last parameter:
c.FlipArea 0, 128, 255, 255, cdrFlipHorizontal
With ActiveLayer.CreateRectangle(0, 0, 2, 2)
  .Fill.ApplyPatternFill cdrTwoColorPattern
  .Fill.Pattern.Canvas = c
End With 
End Sub