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] )
$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 |
Success: | True. |
Failure: | False and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPIP_ERR* see GPIPlusConstants.au3). |
_GDIPlus_LineBrushSetSigmaBlend
Search GdipSetLineLinearBlend in MSDN Library.
#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)
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
; Clean up resources
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
EndFunc ;==>Example