Funktionreferenz


_GDIPlus_LineBrushSetLinearBlend


Sets the blend shape of a linear gradient brush to create a custom blend based on a triangular shape

#include <GDIPlus.au3>
_GDIPlus_LineBrushSetLinearBlend ( $hLineGradientBrush, $fFocus [, $fScale = 1] )

Parameter

$hLineGradientBrush Pointer to a LinearGradientBrush object
$fFocus Number in the range 0.0 to 1.0 that specifies the position of the ending color
$fScale [optional] Number in the range 0.0 to 1.0 that specifies the percentage of the gradient's ending color that gets blended, at the focus position, with the gradient's starting color. The default value is 1, which specifies that the ending color is at full intensity

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.

Verwandte Funktionen

_GDIPlus_LineBrushSetSigmaBlend

Siehe auch

Suche nach GdipSetLineLinearBlend in der MSDN Bibliothek.

Beispiel

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

Example()

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

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

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

    $hBrush = _GDIPlus_LineBrushCreate(10, 10, 390, 390, 0xFF000000, 0xFFFFFFFF)

    _GDIPlus_LineBrushSetLinearBlend($hBrush, 0.5)

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

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

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