Object Model Reference : Classes : P : PatternCanvas : Methods : PatternCanvas.RotateArea |
Sub RotateArea(x1 As Long, y1 As Long, x2 As Long, y2 As Long, Angle As Double)
Member of PatternCanvas
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°).
|
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 |
Copyright 2013 Corel Corporation. All rights reserved.