Canvas trouble

Blitz3D Forums/Blitz3D Beginners Area/Canvas trouble

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

; Try looking at the example code in the samples folder
; for a more detailed explanation.
; Below is a simple example. Regards, Prof

WinWidth=400:WinHeight=390
WinTitle$="Window"
WinX=(ClientWidth(Desktop())-WinWidth)/2
WinY=(ClientHeight(Desktop())-WinHeight)/2
Window=CreateWindow(WinTitle$,WinX,WInY,WinWidth,WinHeight,0,3)

;Create a canvas for the whole window area.
MainCanvas=CreateCanvas(0,0,ClientWidth(window),ClientHeight(window),window)
SetGadgetLayout Maincanvas,1,1,1,1
SetBuffer CanvasBuffer(MainCanvas)

; Now draw what-ever you want
Text 10,10,"Simple canvas setup."


While WaitEvent()<>$803


Wend
End