UDF > GDIPlus > ArrowCap >


_GDIPlus_ArrowCapSetHeight

D�finit la distance de la base de l'embout � la pointe.

#include <GDIPlus.au3>
_GDIPlus_ArrowCapSetHeight ( $hArrowCap, $fHeight )

Param�tres

$hArrowCap Handle de l'objet Embout de fl�che
$fHeight Sp�cifie la distance de la base de l'embout � la pointe; l'unit� est l'�paisseur du crayon.

Valeur de retour

Succ�s: Retourne True
�chec: Retourne False

En relation

_GDIPlus_ArrowCapGetHeight

Voir aussi

Consultez GdipSetAdjustableArrowCapHeight dans la Library MSDN.

Exemple

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

Example()

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

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

    ; Cr�e des ressources
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    $hPen = _GDIPlus_PenCreate(0xFF000000, 4)
    $hEndCap = _GDIPlus_ArrowCapCreate(3, 6)
    _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)

    ; Dessine fl�che 1
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 120, 390, 120, $hPen)

    ; Dessine fl�che 2
    _GDIPlus_ArrowCapSetHeight($hEndCap, _GDIPlus_ArrowCapGetHeight($hEndCap) + 2)
    _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 150, 390, 150, $hPen)

    ; Dessine fl�che 3
    _GDIPlus_ArrowCapSetHeight($hEndCap, _GDIPlus_ArrowCapGetHeight($hEndCap) + 2)
    _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 180, 390, 180, $hPen)

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

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