CGpPen.RotateTransformmethod
Updates the world transformation matrix of this **Pen** object with the product of itself and a rotation matrix.
Syntax
FUNCTION RotateTransform (BYVAL angle AS SINGLE, BYVAL order AS MatrixOrder = MatrixOrderPrepend) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
angle | The angle, in degrees, of rotation. | |
order | Optional. Element of the MatrixOrder enumeration that specifies the order of multiplication. MatrixOrderPrepend specifies that the passed matrix is on the left, and MatrixOrderAppend specifies that the passed matrix is on the right. The default value is MatrixOrderPrepend. |
Return value
If the function succeeds, it returns Ok, which is an element of the GpStatus enumeration.
If the function fails, it returns one of the other elements of the GpStatus enumeration.
Description
Updates the world transformation matrix of this Pen object with the product of itself and a rotation matrix.
Example
' ======================================================================================== ' The following example creates a Pen object, sets a scaling matrix to the pen, and draws ' a rectangle. The code then resets the transformation of the pen and draws a second rectangle. ' ======================================================================================== SUB Example_RotateTransform (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
DIM pen AS CGpPen = CGpPen(&hFF0000FF, 5) ' // Blue pen.ScaleTransform(1, 4) ' // first stretch pen.RotateTransform(30, MatrixOrderAppend) ' // then rotate graphics.DrawEllipse(@pen, 50, 30, 200, 200)
END SUB ' ========================================================================================
Reference
- Include file
CGpPen.inc - Defined in AfxNova/CGpPen.inc:289
- Documented in Graphics/GdiPlus Classes/CGpPen Class.md
- Topic: CGpPen Class