Funktionreferenz


_GDIPlus_PathBrushSetTransform


Sets the transformation matrix of a path gradient brush

#include <GDIPlus.au3>
_GDIPlus_PathBrushSetTransform ( $hPathGradientBrush, $hMatrix )

Parameter

$hPathGradientBrush Pointer to a PathGradientBrush 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 GdipSetPathGradientTransform in der MSDN Bibliothek.

Beispiel

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

Example()

Func Example()
    Local $hGUI = GUICreate("GDI+", 200, 180)
    GUISetState(@SW_SHOW)

    _GDIPlus_Startup()
    Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
    _GDIPlus_GraphicsClear($hGraphics, 0xFFFFFFFF)

    Local $hPath = _GDIPlus_PathCreate()
    _GDIPlus_PathAddEllipse($hPath, 10, 10, 180, 160)

    Local $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath)
    _GDIPlus_PathBrushSetCenterColor($hBrush, 0xF08080A0)

    Local $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixScale($hMatrix, 0.75, 1.25)
    _GDIPlus_PathBrushSetTransform($hBrush, $hMatrix)

    _GDIPlus_GraphicsFillPath($hGraphics, $hPath, $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_PathDispose($hPath)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()
EndFunc   ;==>Example