欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

基 礎 函 數(shù) 參 考


GUICtrlSetGraphic

修改繪圖控件數(shù)據(jù).

GUICtrlSetGraphic ( 控件ID, 類型 [, par1 [, ... par6]] )

參 數(shù)

控件ID GUICtrlCreateGraphic 函數(shù)返回的控件標識符.
類型 繪圖類型 : 點(dot), 線(line), 貝賽爾曲線(bezier), 矩形(rect), 橢圓(ellipse), 餅圖(pie).
par1...par6 參考下面的 繪圖類型列表 below.

返 回 值

成功: 返回 1.
失敗: 返回 0.
返回 -1, 數(shù)據(jù)無效

備 注

點坐標 (x,y) 是 GUICtrlCreateGraphic 繪圖控件的相對坐標. 可以超出繪圖控件,但不能超出 GUI 窗口.

繪圖類型列表


繪圖 參數(shù) 結果
$GUI_GR_COLOR 顏色 [,背景色] 定義下一個繪圖時的顏色.
當參數(shù)"背景色"等于 $GUI_GR_NOBKCOLOR, 繪圖不會填充顏色(默認).
默認線條顏色為黑色.
$GUI_GR_MOVE x,y 移動當前坐標點, 但不繪圖.
$GUI_GR_DOT x,y 畫一個點(在點周圍環(huán)繞小正方形), 下一繪圖將從先前位置啟動.
$GUI_GR_PIXEL x,y 畫一個圖素, 下一繪圖將從先前位置啟動.
$GUI_GR_LINE x,y 畫線.
$GUI_GR_BEZIER x,y,x1,y1,x2,y2 畫兩個控制點之間的貝賽爾曲線.
$GUI_GR_RECT x,y,w,h 畫一個矩形. 當寬(w) = 高(h), 將畫一個正方形.
$GUI_GR_ELLIPSE x,y,w,h 畫一個橢圓. 當寬(w) = 高(h), 將畫一個正圓.
$GUI_GR_PIE x,y,r,sa,wa 畫一個餅圖. r = 半徑, sa = 起始角度, wa = 掃描角度. 單位為度數(shù).
$GUI_GR_CLOSE   關閉當前繪圖.
添加到 $GUI_GR_LINE 或 $GUI_GR_BEZIER 關閉當前畫線或貝賽爾曲線.
單獨使用將被忽略.
$GUI_GR_REFRESH   強制刷新動態(tài)更新后的圖形.
$GUI_GR_HINT   顯示貝塞爾曲線/線條曲線的控制點與終點.
$GUI_GR_PENSIZE n 設定下一繪圖的畫筆大小. 必須在定義 $GUI_GR_COLOR(顏色) 之前接受計算.
$GUI_GR_NOBKCOLOR   一個虛擬背景色, 強制閉合圖形不填充顏色. 僅用于畫線時.

由于設計上的限制, 矩形, 橢圓和餅圖需首先畫圖形控件. 例如, 一個矩形總是先畫線.
如果繪制順序對繪圖外觀非常重要, 則建議使用多個圖形控件, 而不是使用一個單一的控件完成所有的繪圖.

相 關 函 數(shù)

GUICtrlCreateGraphic

函 數(shù) 示 例


#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

Global $MAXGr = 6, $del, $child
Global $a[$MAXGr + 1] ; 0 和 $MAXGr 項目不允許 GUICtrlDelete 函數(shù)刪除結果

Example()

Func Example()
    Local $msg, $inc, $i, $del1

    GUICreate("我的 Main", -1, -1, 100, 100)
    $del1 = GUICtrlCreateButton("刪除", 50, 200, 50)
    GUISetState()
    CreateChild()

    $i = 1
    $inc = 1
    ;$i=5   ; 去掉注釋改變圖形刪除順序
    ;$inc=-1

    Do
        $msg = GUIGetMsg()
        If $msg = $del1 Then $i = Del($inc)

        If $msg = $del Then
            GUICtrlDelete($a[$i])
            $i = $i + $inc
            If $i < 0 Or $i > $MAXGr Then Exit
        EndIf
    Until $msg = $GUI_EVENT_CLOSE
EndFunc   ;==>Example

Func Del($iInc)
    GUIDelete($child)
    CreateChild()
    If $iInc = -1 Then Return 5
    Return 1
EndFunc   ;==>Del

Func CreateChild()
    $child = GUICreate("我的繪圖", 440, 400)
    $del = GUICtrlCreateButton("刪除", 50, 165, 50)

    $a[1] = GUICtrlCreateGraphic(20, 50, 100, 100)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetColor(-1, 0)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff0000, 0xff0000)
    GUICtrlSetGraphic(-1, $GUI_GR_PIE, 50, 50, 40, 30, 270)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x00ff00, 0xffffff)
    GUICtrlSetGraphic(-1, $GUI_GR_PIE, 58, 50, 40, -60, 90)

    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 100, 100, 50, 80)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x00ff00, 0xc0c0ff)
    GUICtrlSetGraphic(-1, $GUI_GR_RECT, 350, 200, 50, 80)
    GUICtrlCreateLabel("標記", 65, 100, 30)
    GUICtrlSetColor(-1, 0xff)

    $a[2] = GUICtrlCreateGraphic(220, 10, 100, 100)

    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff)
    GUICtrlSetGraphic(-1, $GUI_GR_PIE, 50, 50, 40, 30, 270)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x00ff00, 0xffffff)
    GUICtrlSetGraphic(-1, $GUI_GR_PIE, 58, 50, 40, -60, 90)

    $a[3] = GUICtrlCreateGraphic(220, 110, 100, 100)
    GUICtrlSetBkColor(-1, 0xf08080)
    GUICtrlSetColor(-1, 0xff)
    GUICtrlSetGraphic(-1, $GUI_GR_HINT, 1)

    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff00)
    GUICtrlSetGraphic(-1, $GUI_GR_RECT, 50, 50, 80, 80)

    $a[4] = GUICtrlCreateGraphic(20, 200, 80, 80)
    GUICtrlSetBkColor(-1, 0xffffff)
    GUICtrlSetGraphic(-1, $GUI_GR_HINT, 1)

    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 10, 10)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, 30, 40)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff00)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, 70, 70)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff0000)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, 10, 50)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xffff00)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, 10, 10)

    $a[5] = GUICtrlCreateGraphic(150, 10, 50, 50)
    GUICtrlSetBkColor(-1, 0xa0ffa0)
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 20, 20) ; 起點
    ; 最好是在點以后畫線
    ; 避免轉換每個繪圖的顏色
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x0000ff)
    GUICtrlSetGraphic(-1, $GUI_GR_DOT, 30, 30)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, 20, 40)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff0000)
    GUICtrlSetGraphic(-1, $GUI_GR_DOT, 25, 25)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, 40, 40)
    GUICtrlSetGraphic(-1, $GUI_GR_DOT, 30, 40)

    $a[6] = GUICtrlCreateGraphic(110, 260, 230, 130)
    GUICtrlSetColor(-1, 0) ; 顯示一個黑色的邊界線
    GUICtrlSetBkColor(-1, 0xc0c0ff)
    GUICtrlSetGraphic(-1, $GUI_GR_HINT, 3) ; 顯示控制線和終點

    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff); fill in blue
    GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 120, 20) ; 起點
    GUICtrlSetGraphic(-1, $GUI_GR_BEZIER, 120, 100, 200, 20, 200, 100)
    GUICtrlSetGraphic(-1, $GUI_GR_BEZIER + $GUI_GR_CLOSE, 100, 40, 40, 100, 40, 20)
    GUICtrlSetGraphic(-1, $GUI_GR_LINE, 60, 30) ; 起點

    GUISetState()
EndFunc   ;==>CreateChild

provider with jb51.net (unicode)