Code: Select all
Enumeration
#window
#canvas
EndEnumeration
OpenWindow(#window,0,0,800,600,"Test")
CanvasGadget(#canvas,10,10,300,300)
If StartDrawing(CanvasOutput(#canvas))
LoadFont(0,"Arial",30)
Box( 0,0,GadgetWidth(#canvas),GadgetHeight(#canvas),RGB(200,0,0))
DrawingFont(FontID(0))
txt.s="This is line 1"
DrawText(10,0,txt)
txt.s="This is line 2"
DrawText(GadgetWidth(#canvas),TextHeight(txt),txt)
StopDrawing()
EndIf
See images:
https://doko-cafe.de/test/canvaslinux.jpg
https://doko-cafe.de/test/canvaswindows10.jpg