プログラム言語 FreeBasic |
TextDraw
TextDraw( x , y ,string , [ColorBk=0] , [colorText= 0],[Alpha= 255])
Function TextDraw(ByVal x As Long, ByVal y As Long, ByRef text As string, ByVal ColorBK As Long=0, ByVal ColorText As Long=0, ByVal AlPHAPARAM As Long=255) As Integer
テキストを描画するために使います。
Linux の座標によるテキスト出力は、Windowsのバージョンと同じではない場合があることを考慮する必要があります!
x - X軸方向の位置
y - Y軸方向の位置
string - 任意の文字列
ColorText - 文字の色
ColorBk - 文字列の背景色 (値が-1の場合、透明色)
Alpha - テキストの透明度レベル (0 〜 255)
Windows , Linux
例:
#Include "window9.bi"
Var hwnd=OpenWindow("",100,100,300,300)
WindowStartDraw(hwnd)
'FillRectDraw(40,40,&hffffff)
FillRectDraw(0,0,&hffffff) 'ウインドウ全体の背景を白にする
TextDraw(10,10,"Hello",&hffffff)
StopDraw
Do : Loop until WaitEvent= EventClose