D�finit l'alignement d'un crayon
#include <GDIPlus.au3>
_GDIPlus_PenSetAlignment ( $hPen [, $iAlignment = 0] )
$hPen | Handle de l'objet Pen |
$iAlignment | [optionnel]Alignement du crayon. L'un des suivants: 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 |
Succ�s: | Retourne True. |
�chec: | Retourne False et d�finit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*). |
Cherchez GdipSetPenMode 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