【 WindowCreateImage 】
格式:
WindowCreateImage(BSTR Name,
BSTR ImageId,
long Row1,
long Row2,
long Row3,
long Row4,
long Row5,
long Row6,
long Row7,
long Row8)
中文:
WindowCreateImage(迷你視窗名稱,
圖樣ID,
long Row1,
long Row2,
long Row3,
long Row4,
long Row5,
long Row6,
long Row7,
long Row8)
說明:
建立一個花紋圖案,它是一個 8 位元的點陣圖,所以總共要指定八個
參數。建立好的圖案不能直接使用,通常和 WindowImageOp 配合使用,以
填充所繪製的圖形內容。最後仍需要使用 WindowShow 來顯示它們。
範例:
--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--
testmini = 'nobu'
WindowCreate (testmini,0,0,700,500,12,0,ColourNameToRGB("lime"))
WindowCreateImage (testmini, "im2",
tonumber ("11001100", 2), -- row 8
tonumber ("11001100", 2), -- row 7
tonumber ("00110011", 2), -- row 6
tonumber ("00110011", 2), -- row 5
tonumber ("11001100", 2), -- row 4
tonumber ("11001100", 2), -- row 3
tonumber ("00110011", 2), -- row 2
tonumber ("00110011", 2)) -- row 1
WindowImageOp (testmini, 2, 20, 20, 180, 180,
ColourNameToRGB("blue"), miniwin.pen_null, 0,
ColourNameToRGB("cyan"), "im2")
WindowShow (testmini, true)
--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--
來源:http://www.gammon.com.au/mushclient/mw_images.htm#WindowCreateImage