Bestimmt, ob die Pfeilspitze ausgefüllt ist
#include <GDIPlus.au3>
_GDIPlus_ArrowCapSetFillState ( $hArrowCap [, $bFilled = True] )
$hArrowCap | Handle zu einem Pfeil-Objekt |
$bFilled | [optional] Füllstatus: True - Pfeilspitze ist ausgefüllt False - Pfeilspitze ist nicht ausgefüllt |
Erfolg: | True |
Fehler: | False und setzt das @error Flag auf ungleich null. @extended kann den GPSTATUS Fehlercode ($GPID_ERR* siehe GDIPlusConstants.au3) enthalten. |
Suche nach GdipSetAdjustableArrowCapFillState in der MSDN Bibliothek.
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $hGui, $hGraphic, $hPen, $hEndCap
; Erstellt eine GUI
$hGui = GUICreate("GDI+", 400, 300)
GUISetState(@SW_SHOW)
; Erzeugt die Ressourcen
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
$hPen = _GDIPlus_PenCreate(0xFF000000, 4)
$hEndCap = _GDIPlus_ArrowCapCreate(4, 6)
; Ermittelt ob die Pfeilspitze ausgefüllt ist
MsgBox($MB_TASKMODAL, "Information", "Füllstatus: " & _GDIPlus_ArrowCapGetFillState($hEndCap))
; Zeichnet Pfeil 1
_GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
_GDIPlus_GraphicsDrawLine($hGraphic, 10, 130, 390, 130, $hPen)
; Zeichnet Pfeil 2
_GDIPlus_ArrowCapSetFillState($hEndCap, False)
_GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
_GDIPlus_GraphicsDrawLine($hGraphic, 10, 160, 390, 160, $hPen)
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
; Ressourcen freigeben
_GDIPlus_ArrowCapDispose($hEndCap)
_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
EndFunc ;==>Example