Obtient le style d'embout de ligne affect� au crayon
#include <GDIPlus.au3>
_GDIPlus_PenGetEndCap ( $hPen )
$hPen | Handle de l'objet Pen |
Succ�s: | Retourne le type d'embout: $GDIP_LINECAPFLAT - Embout plat $GDIP_LINECAPSQUARE - Embout carr� $GDIP_LINECAPROUND - Embout rond $GDIP_LINECAPTRIANGLE - Embout triangulaire $GDIP_LINECAPNOANCHOR - Les extr�mit�s de la ligne ne sont pas ancr�es $GDIP_LINECAPSQUAREANCHOR - Les extr�mit�s de ligne sont ancr�es avec un carr� $GDIP_LINECAPROUNDANCHOR - Les extr�mit�s de ligne sont ancr�es avec un cercle $GDIP_LINECAPDIAMONDANCHOR - Les extr�mit�s de ligne sont ancr�es avec un losange $GDIP_LINECAPARROWANCHOR - Les extr�mit�s de ligne sont ancr�s � l'aide d'embout de fl�che $GDIP_LINECAPCUSTOM - les extr�mit�s de ligne sont d�finies � partir d'un CustomLineCap |
�chec: | Retourne -1 et d�finit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*). |
Cherchez GdipGetPenEndCap dans la Library MSDN.
#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $hGUI, $hGraphic, $hPen ; Cr�e une GUI $hGUI = GUICreate("GDI+", 400, 300) GUISetState(@SW_SHOW) ; Cr�e des ressources _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hPen = _GDIPlus_PenCreate(0xFF000000, 8) _GDIPlus_PenSetEndCap($hPen, $GDIP_LINECAPARROWANCHOR) ; Affiche l'embout du crayon MsgBox($MB_SYSTEMMODAL, "Information", "Pen end cap type: " & _GDIPlus_PenGetEndCap($hPen)) ; Dessine des fl�ches _GDIPlus_GraphicsDrawLine($hGraphic, 10, 130, 390, 130, $hPen) _GDIPlus_PenSetWidth($hPen, 6) _GDIPlus_GraphicsDrawLine($hGraphic, 10, 150, 390, 150, $hPen) _GDIPlus_PenSetWidth($hPen, 8) _GDIPlus_GraphicsDrawLine($hGraphic, 10, 170, 390, 170, $hPen) ; Boucle jusqu'� ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Nettoie les ressources _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc ;==>Example