Function Reference


_GDIPlus_ArrowCapGetWidth

Gets the width of the arrow cap

#include <GDIPlus.au3>
_GDIPlus_ArrowCapGetWidth ( $hArrowCap )

Parameters

$hArrowCap Handle to a ArrowCap object

Return Value

Success: the width of the arrow cap.
Failure: 0 and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPIP_ERR* see GPIPlusConstants.au3).

Remarks

The width is the distance between the endpoints of the base of the arrow.

Related

_GDIPlus_ArrowCapSetWidth

See Also

Search GdipGetAdjustableArrowCapWidth in MSDN Library.

Example

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

Example()

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

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

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

        ; Draw arrow 1
        _GDIPlus_GraphicsDrawLine($hGraphic, 10, 120, 390, 120, $hPen)

        ; Draw arrow 2
        _GDIPlus_ArrowCapSetWidth($hEndCap, _GDIPlus_ArrowCapGetWidth($hEndCap) + 2)
        _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
        _GDIPlus_GraphicsDrawLine($hGraphic, 10, 150, 390, 150, $hPen)

        ; Draw arrow 3
        _GDIPlus_ArrowCapSetWidth($hEndCap, _GDIPlus_ArrowCapGetWidth($hEndCap) + 2)
        _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
        _GDIPlus_GraphicsDrawLine($hGraphic, 10, 190, 390, 190, $hPen)

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

        ; Clean up resources
        _GDIPlus_ArrowCapDispose($hEndCap)
        _GDIPlus_PenDispose($hPen)
        _GDIPlus_GraphicsDispose($hGraphic)
        _GDIPlus_Shutdown()
EndFunc   ;==>Example