Définit l'état de remplissage de l'embout de flèche
#include <GDIPlus.au3>
_GDIPlus_ArrowCapSetFillState ( $hArrowCap [, $bFilled = True] )
$hArrowCap | Handle de l'embout de flèche |
$bFilled | [optionnel] Etat de remplissage: True - Embout rempli False - Embout non rempli |
Succès: | Retourne True |
Échec: | Retourne False et définit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*). |
Consultez GdipSetAdjustableArrowCapFillState dans la Library MSDN.
#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $hGUI, $hGraphic, $hPen, $hEndCap ; Crée GUI $hGUI = GUICreate("GDI+", 400, 300) GUISetState(@SW_SHOW) ; Crée des ressources _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hPen = _GDIPlus_PenCreate(0xFF000000, 4) $hEndCap = _GDIPlus_ArrowCapCreate(4, 6) ; Affiche l'état de remplissage MsgBox($MB_SYSTEMMODAL, "Information", "Fill state: " & _GDIPlus_ArrowCapGetFillState($hEndCap)) ; Dessine flèche 1 _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap) _GDIPlus_GraphicsDrawLine($hGraphic, 10, 130, 390, 130, $hPen) ; Dessine flèche 2 _GDIPlus_ArrowCapSetFillState($hEndCap, False) _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap) _GDIPlus_GraphicsDrawLine($hGraphic, 10, 160, 390, 160, $hPen) ; Boucle jusqu'à ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Nettoie les ressources _GDIPlus_ArrowCapDispose($hEndCap) _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc ;==>Example