Function Reference


_GDIPlus_ArrowCapGetMiddleInset

Gets the value of the inset

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

Parameters

$hArrowCap Handle to a ArrowCap object

Return Value

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

Remarks

The middle inset is the number of units that the midpoint of the base shifts towards the vertex.
A middle inset of zero results in no shift -- the base is a straight line, giving the arrow a triangular shape.
A positive (greater than zero) middle inset results in a shift the specified number of units toward the vertex -- the base is an arrow shape that points toward the vertex, giving the arrow cap a V-shape.
A negative (less than zero) middle inset results in a shift the specified number of units away from the vertex -- the base becomes an arrow shape that points away from the vertex, giving the arrow either a diamond shape (if the absolute value of the middle inset is equal to the height) or distorted diamond shape.
If the middle inset is equal to or greater than the height of the arrow cap, the cap does not appear at all.
The value of the middle inset affects the arrow cap only if the arrow cap is filled.

Related

_GDIPlus_ArrowCapSetMiddleInset

See Also

Search GdipGetAdjustableArrowCapMiddleInset in MSDN Library.

Example

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

Example()

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

        ; 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)

        ; Draw arrow 1
        $iInset = 0.5
        _GDIPlus_ArrowCapSetMiddleInset($hEndCap, $iInset)
        _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
        _GDIPlus_GraphicsDrawLine($hGraphic, 10, 120, 390, 120, $hPen)

        ; Draw arrow 2
        $iInset = _GDIPlus_ArrowCapGetMiddleInset($hEndCap) + 0.5
        _GDIPlus_ArrowCapSetMiddleInset($hEndCap, $iInset)
        _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
        _GDIPlus_GraphicsDrawLine($hGraphic, 10, 150, 390, 150, $hPen)

        ; Draw arrow 3
        $iInset = _GDIPlus_ArrowCapGetMiddleInset($hEndCap) + 0.5
        _GDIPlus_ArrowCapSetMiddleInset($hEndCap, $iInset)
        _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap)
        _GDIPlus_GraphicsDrawLine($hGraphic, 10, 180, 390, 180, $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