Function Reference


_GDIPlus_LineBrushSetTransform

Sets the transformation matrix of a linear gradient brush

#include <GDIPlus.au3>
_GDIPlus_LineBrushSetTransform ( $hLineGradientBrush, $hMatrix )

Parameters

$hLineGradientBrush Pointer to a LinearGradientBrush object
$hMatrix Pointer to a Matrix object that specifies the transformation matrix

Return Value

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

See Also

Search GdipSetLineTransform in MSDN Library.

Example

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

Example()

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

        $hGUI = GUICreate("GDI+", 420, 420)
        GUISetState(@SW_SHOW)

        _GDIPlus_Startup()
        $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
        _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)

        $hBrush = _GDIPlus_LineBrushCreate(10, 10, 410, 410, 0xFF000000, 0xFFFFFFFF, 3)
        _GDIPlus_LineBrushSetSigmaBlend($hBrush, 1)

        $hMatrix = _GDIPlus_MatrixCreate()
        _GDIPlus_MatrixRotate($hMatrix, 45)

        _GDIPlus_LineBrushSetTransform($hBrush, $hMatrix)

        _GDIPlus_GraphicsFillRect($hGraphic, 10, 10, 400, 400, $hBrush)

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

        ; Clean up resources
        _GDIPlus_MatrixDispose($hMatrix)
        _GDIPlus_BrushDispose($hBrush)
        _GDIPlus_GraphicsDispose($hGraphic)
        _GDIPlus_Shutdown()
EndFunc   ;==>Example