How can I change the scale mode for a canvas ?

BlitzPlus Forums/BlitzPlus Programming/How can I change the scale mode for a canvas ?

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.

What I meant was, allowing the canvas to grow, yet keeping the same pixel size of everything....


Const maximumcanvassize = 2048

Global window = CreateWindow("Test window - resize me",(ClientWidth(Desktop())/2)-250,(ClientHeight(Desktop())/2)-210,500,420,0,1+2)
Global panel  = CreatePanel(0,0,ClientWidth(window),ClientHeight(window),window,True)
	SetGadgetLayout(panel,1,1,1,1)
Global canvas = CreateCanvas(0,0,maximumcanvassize,maximumcanvassize,panel)
	SetGadgetLayout(canvas,1,0,1,0)

Repeat
	Select WaitEvent()
		Case $203
			SetBuffer CanvasBuffer(canvas)
			Color Rand(0,255),Rand(0,255),Rand(0,255)
			w = Rand(0,100)
			h = Rand(0,100)
			Oval EventX()-(w/2),EventY()-(h/2),w,h,1
			FlipCanvas(canvas)
		Case $803 : Exit
	End Select
Forever


You can, like I said ;)