描述
用自身和另一个矩阵的乘积更新画笔的变换矩阵.
C++ Syntax
Status MultiplyTransform( [in] Matrix *matrix, [in] MatrixOrder order ); |
FreeBASIC 语法
FUNCTION MultiplyTransform ( _ BYVAL pMatrix AS CGpMatrix PTR, _ BYVAL order AS MatrixOrder = MatrixOrderPrepend _ ) AS GpStatus |
参数
pMatrix
[in]指向矩阵乘以这个刷的电流变换矩阵.
order
该MatrixOrder指定相乘的顺序[in, optional]元.MatrixOrderPrepend指定传递矩阵是在左边,和MatrixOrderAppend指定传递矩阵是正确的.默认值是MatrixOrderPrepend.
返回值
如果该方法成功,则返回Ok,这是对Status枚举元素.
如果这个方法失败,它返回一个枚举的其他元素的Status.
引用文件
CGpBrush.inc (include CGdiPlus.inc)
示例
' ========================================================================================
' The following example creates a texture brush and sets the transformation of the brush.
' The code then uses the transformed brush to fill a rectangle.
' ========================================================================================
SUB Example_MultiplyTransform (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context
DIM graphics AS CGpGraphics = hdc
' // Get the DPI scaling ratio
DIM rxRatio AS SINGLE = graphics.GetDpiX / 96
DIM ryRatio AS SINGLE = graphics.GetDpiY / 96
' // Set the scale transform
graphics.ScaleTransform(rxRatio, ryRatio)
' // Horizontal stretch
DIM matrix AS CGpMatrix = CGpMatrix(3, 0, 0, 1, 0, 0)
' // Create a texture brush, and set its transformation.
DIM pImage AS CGpImage = "HouseAndTree.gif"
DIM textureBrush AS CGpTextureBrush = @pImage
textureBrush.RotateTransform(30) ' // rotate
textureBrush.MultiplyTransform(@matrix, MatrixOrderAppend) ' // stretch
graphics.FillRectangle(@textureBrush, 0, 0, 400, 200)
END SUB
' ========================================================================================