Funktionreferenz


_GDIPlus_LineBrushSetTransform


Sets the transformation matrix of a linear gradient brush

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

Parameter

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

Rückgabewert

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

Bemerkungen

None.

Siehe auch

Suche nach GdipSetLineTransform in der MSDN Bibliothek.

Beispiel

#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)

    ; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Ressourcen freigeben
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
EndFunc   ;==>Example