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 WithEnd Sub