Функция _GDIPlus_ArrowCapSetWidth

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


_GDIPlus_ArrowCapSetWidth

Sets the width of the arrow cap

#include <GDIPlus.au3>
_GDIPlus_ArrowCapSetWidth($hArrowCap, $fWidth)

Параметры

$hArrowCap Handle to a ArrowCap object
$fWidth Specifies the width, in units, of the arrow between the endpoints of the base of the arrow

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

Успех:Возвращает True
Ошибка:Возвращает False

См. также

_GDIPlus_ArrowCapGetWidth

См. также

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

Пример

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

_Main()

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

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

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

    ; Рисует стрелку 1
    _GDIPlus_GraphicsDrawLine ($hGraphic, 10, 120, 390, 120, $hPen)

    ; Рисует стрелку 2
    _GDIPlus_ArrowCapSetWidth ($hEndCap, _GDIPlus_ArrowCapGetWidth ($hEndCap) + 2)
    _GDIPlus_PenSetCustomEndCap ($hPen, $hEndCap)
    _GDIPlus_GraphicsDrawLine ($hGraphic, 10, 150, 390, 150, $hPen)

    ; Рисует стрелку 3
    _GDIPlus_ArrowCapSetWidth ($hEndCap, _GDIPlus_ArrowCapGetWidth ($hEndCap) + 2)
    _GDIPlus_PenSetCustomEndCap ($hPen, $hEndCap)
    _GDIPlus_GraphicsDrawLine ($hGraphic, 10, 190, 390, 190, $hPen)


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

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