Функция _GDIPlus_ArrowCapGetMiddleInset

         Описание функции


_GDIPlus_ArrowCapGetMiddleInset

Gets the value of the inset

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

Параметры

$hArrowCap Handle to a ArrowCap object

Возвращаемое значение

Успех:Inset value
Ошибка:Возвращает 0

Примечания

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.

См. также

_GDIPlus_ArrowCapSetMiddleInset

См. также

Искать GdipGetAdjustableArrowCapMiddleInset в библиотеке MSDN

Пример

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

_Main()

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

    ; Создаёт GUI
    $hGUI = GUICreate("GDI+", 400, 300)
    GUISetState()

    ; Создаёт ресурсы
    _GDIPlus_Startup ()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
    $hPen = _GDIPlus_PenCreate (0xFF000000, 4)
    $hEndCap = _GDIPlus_ArrowCapCreate (3, 6)

    ; Рисует стрелку 1
    $iInset = 0.5
    _GDIPlus_ArrowCapSetMiddleInset ($hEndCap, $iInset)
    _GDIPlus_PenSetCustomEndCap ($hPen, $hEndCap)
    _GDIPlus_GraphicsDrawLine ($hGraphic, 10, 120, 390, 120, $hPen)

    ; Рисует стрелку 2
    $iInset = _GDIPlus_ArrowCapGetMiddleInset ($hEndCap) + 0.5
    _GDIPlus_ArrowCapSetMiddleInset ($hEndCap, $iInset)
    _GDIPlus_PenSetCustomEndCap ($hPen, $hEndCap)
    _GDIPlus_GraphicsDrawLine ($hGraphic, 10, 150, 390, 150, $hPen)

    ; Рисует стрелку 3
    $iInset = _GDIPlus_ArrowCapGetMiddleInset ($hEndCap) + 0.5
    _GDIPlus_ArrowCapSetMiddleInset ($hEndCap, $iInset)
    _GDIPlus_PenSetCustomEndCap ($hPen, $hEndCap)
    _GDIPlus_GraphicsDrawLine ($hGraphic, 10, 180, 390, 180, $hPen)

    ; Цикл выполняется, пока окно не будет закрыто
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Очищает ресурсы
    _GDIPlus_ArrowCapDispose ($hEndCap)
    _GDIPlus_PenDispose ($hPen)
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_Shutdown ()
EndFunc   ;==>_Main