Obtient l'alignement du crayon
#include <GDIPlus.au3>
_GDIPlus_PenGetAlignment ( $hPen )
$hPen | Handle d'un objet Pen |
Succ�s: | Retourne le type d'alignement: 0 - Sp�cifie que le crayon est align� sur le centre de la ligne dessin�e 1 - Sp�cifie, lors de l'�laboration d'un polygone, que le crayon est align� � l'int�rieur du bord du polygone |
�chec: | Retourne -1 et d�finit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*). |
Cherchez GdipGetPenMode dans la Library MSDN.
#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $hGUI, $hGraphic, $hPen ; Cr�e la GUI $hGUI = GUICreate("GDI+", 400, 300) GUISetState(@SW_SHOW) ; Cr�e des ressources _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hPen = _GDIPlus_PenCreate(0xFF000000, 4) _GDIPlus_PenSetEndCap($hPen, $GDIP_LINECAPARROWANCHOR) _GDIPlus_PenSetAlignment($hPen, 1) ; Afficher l'alignement du crayon MsgBox($MB_SYSTEMMODAL, "Information", "Pen alignment: " & _GDIPlus_PenGetAlignment($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