Function Reference

_GDIPlus_GraphicsDrawClosedCurve

閉じたカーディナル曲線を描画します。

#Include <GDIPlus.au3>
_GDIPlus_GraphicsDrawClosedCurve($hGraphics, $aPoints[, $hPen = 0])

 

パラメータ

$hGraphics Graphicsオブジェクトのハンドル
$aPoints 曲線の点を指定する配列:
[0][0] - 点の数
[1][0] - 点1のX座標
[1][1] - 点1のY座標
[2][0] - 点2のX座標
[2][1] - 点2のY座標
[n][0] - 点nのX座標
[n][1] - 点nのY座標
$hPen [オプション]曲線の描画に使用されるペンのハンドル。0の場合、幅1の黒いペンが使用されます。

 

返し値

成功: True
失敗: False

 

注意

閉じたカーディナル曲線では配列内の最後の点は配列内の最初の点につながり曲線の描画がおこなわれます。
点の配列には少なくとも3つの要素が格納されている必要があります。

 

関連

 

こちらも参照

MSDNライブラリでGdipDrawClosedCurveIを検索して下さい。

 


#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>

Opt('MustDeclareVars', 1)

_Main()

Func _Main()
    Local $hGUI, $hGraphic, $aPoints[8][2]

    ; GUI作成
    $hGUI = GUICreate("GDI+", 400, 300)
    GUISetState()

    ; カーディナル曲線を描画
    _GDIPlus_Startup ()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)

    $aPoints[0][0] = 7
    $aPoints[1][0] = 50
    $aPoints[1][1] = 50
    $aPoints[2][0] = 100
    $aPoints[2][1] = 25
    $aPoints[3][0] = 200
    $aPoints[3][1] = 5
    $aPoints[4][0] = 250
    $aPoints[4][1] = 50
    $aPoints[5][0] = 300
    $aPoints[5][1] = 100
    $aPoints[6][0] = 350
    $aPoints[6][1] = 200
    $aPoints[7][0] = 250
    $aPoints[7][1] = 250

    _GDIPlus_GraphicsDrawClosedCurve ($hGraphic, $aPoints)

    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; リソースを破棄
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_Shutdown ()

EndFunc   ;==>_Main