Couple of questions on Canvases

BlitzPlus Forums/BlitzPlus Programming/Couple of questions on Canvases

Davo(Posted 2004) [#1]
I'll keep it short...

How can you change the canvas colours? How many canvases could you attach before a noticable amount of slowdown?

Thanks in advance.


Kevin_(Posted 2004) [#2]
Think of a canvas as a normal graphics screen for drawing operations. Changing the colours is just a case of using a color statement like color 255,255,255 which will make the current drawing colour white. The default colour for the background is black (0,0,0) and is used every time you clear the screen (cls). To change the cls colour use clscolour red,green,blue.

You can have as many canvases as you like and it wont make any difference to the speed because you can only draw to one at a time. Use Setbuffer CanvasBuffer(YourCanvas) to change from one canvas to the next.

Hope that helps.


Davo(Posted 2004) [#3]
It helped alot, and it worked, thanks. Im stuck again though...

If I try explaining the problem I'll just probably confuse you so I'll ask as an example. If I created a canvas purely to make a window move around the desktop... how would I go about doing that? This question is linked to something what I would like to do but its not absolutely needed.

Thanks again, in advance.


Kevin_(Posted 2004) [#4]
To move your window around the desktop use SetGadgetShape. More info can be found in the documentation.


Davo(Posted 2004) [#5]
Cheers.