Function Reference


Creates an adjustable arrow line cap with the specified height and width

#include <GDIPlus.au3>
_GDIPlus_ArrowCapCreate ( $fHeight, $fWidth [, $bFilled = True] )


$fHeight Specifies the length, in units, of the arrow from its base to its point
$fWidth Specifies the distance, in units, between the corners of the base of the arrow
$bFilled [optional] Fill flag:
    True - Arrow will be filled
    False - Arrow will not be filled

Return Value

Success: a handle to a new arrowCap object.
Failure: sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPID_ERR*).


After you are done with the object, call _GDIPlus_ArrowCapDispose() to release the object resources.



See Also

Search GdipCreateAdjustableArrowCap in MSDN Library.


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


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

    ; Create GUI
    $hGUI = GUICreate("GDI+", 400, 300)

    ; Create resources
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    $hPen = _GDIPlus_PenCreate(0xFF000000, 2)
    $hEndCap = _GDIPlus_ArrowCapCreate(3, 6)
    _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)

    ; Show pen end cap
    MsgBox($MB_SYSTEMMODAL, "Information", "Pen end cap: 0x" & Hex(_GDIPlus_PenGetCustomEndCap($hPen)))

    ; Draw arrows
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 120, 390, 120, $hPen)
    _GDIPlus_PenSetWidth($hPen, 4)
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 150, 390, 150, $hPen)
    _GDIPlus_PenSetWidth($hPen, 6)
    _GDIPlus_GraphicsDrawLine($hGraphic, 10, 180, 390, 180, $hPen)

    ; Loop until the user exits.
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Clean up resources
EndFunc   ;==>Example