UDF > GDIPlus > GraphicsPath >


_GDIPlus_PathStartFigure

D�marre une nouvelle figure sans fermer la figure actuelle. Les points ajout�s au trac� sont alors ajout�s � la nouvelle figure

#include <GDIPlus.au3>
_GDIPlus_PathStartFigure ( $hPath )

Param�tre

$hPath Handle de l'objet GraphicsPath

Valeur de retour

Succ�s: Retourne True.
�chec: Retourne False et d�finit @error <> 0, @extended contient le code erreur ($GPID_ERR*).

En relation

_GDIPlus_PathCloseFigure

Voir aussi

Consultez GdipStartPathFigure dans la Librairie MSDN.

Exemple

#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>

Example()

Func Example()
    Local $hGUI, $hGraphic, $hPen, $hPath

    ; Cr�e une GUI
    $hGUI = GUICreate("GDI+", 800, 300)
    GUISetState(@SW_SHOW)

    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) ; Cr�e un objet graphique � partir du handle de la fen�tre
    _GDIPlus_GraphicsSetSmoothingMode($hGraphic, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ; D�finit pour l'objet graphique la qualit� de rendu antialiasing
    _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)

    $hPen = _GDIPlus_PenCreate(0xFF8800AA, 2)

    $hPath = _GDIPlus_PathCreate() ; Cr�e un objet path

    _GDIPlus_PathAddLine($hPath, 40, 100, 140, 200)
    _GDIPlus_PathAddLine($hPath, 240, 100, 340, 200)

    _GDIPlus_PathStartFigure($hPath); La ligne suivante ne sera pas reli�e au dernier point

    _GDIPlus_PathAddLine($hPath, 440, 100, 540, 200)
    _GDIPlus_PathAddLine($hPath, 640, 100, 740, 200)

    _GDIPlus_GraphicsDrawPath($hGraphic, $hPath, $hPen)

    ; Boucle jusqu'� ce que l'utilisateur quitte.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Nettoie les ressources
    _GDIPlus_PathDispose($hPath)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
EndFunc   ;==>Example