Function Reference


Updates a brush's transformation matrix with the product of itself and another matrix

#include <GDIPlus.au3>
_GDIPlus_PathBrushMultiplyTransform ( $hPathGradientBrush, $hMatrix [, $iOrder = 0] )


$hPathGradientBrush Pointer to a PathGradientBrush object
$hMatrix Pointer to a matrix to be multiplied by the brush's current transformation matrix
$iOrder [optional] Order of matrices multiplication:
    0 - The passed matrix is on the left
    1 - The passed matrix is on the right

Return Value

Success: True.
Failure: False and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPID_ERR*).

See Also

Search GdipMultiplyPathGradientTransform in MSDN Library.


#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>


Func Example()
    Local $hGUI, $hGraphic, $hBrush, $hPath, $hMatrix

    ; Create GUI
    $hGUI = GUICreate("GDI+", 400, 400)

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) ;Create a graphics object from a window handle
    _GDIPlus_GraphicsSetSmoothingMode($hGraphic, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;Sets the graphics object rendering quality (antialiasing)
    _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)

    $hPath = _GDIPlus_PathCreate() ;Create new path object
    _GDIPlus_PathAddEllipse($hPath, 10, 10, 380, 380)

    $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath)
    _GDIPlus_PathBrushSetCenterPoint($hBrush, 200, 100)
    _GDIPlus_PathBrushSetCenterColor($hBrush, 0xFFFFFFFF)
    _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xFFAA00FF)
    _GDIPlus_PathBrushSetSigmaBlend($hBrush, 1)
    _GDIPlus_PathBrushSetGammaCorrection($hBrush, True)

    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, -200, -200)
    _GDIPlus_MatrixRotate($hMatrix, 1, True)
    _GDIPlus_MatrixTranslate($hMatrix, 200, 200, True)

    For $i = 1 To 360
        _GDIPlus_GraphicsFillPath($hGraphic, $hPath, $hBrush)
        _GDIPlus_PathBrushMultiplyTransform($hBrush, $hMatrix, True)

    ; Loop until the user exits.
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Clean up resources
EndFunc   ;==>Example