forums

TNT Basic Forums > Programming Q&A
Canvas and sprites
< Last Thread     Next Thread >
Author
Thread        Post A Reply

04-19-2003 18:54

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Hi,

Do sprites always draw on top of the canvas? I want to have a sprite box with text inside, but the sprite draws on top of the text on the canvas. (On canvas 0)

04-19-2003 19:55

Posted by:
CubeFusion

Location:
California, USA

Find more posts by CubeFusion

Wouldn't you have to make the text a sprite too? You could open up a new canvas that you draw text into, then you could use "COPY IMAGE" to turn the canvas into an image that can be used for a sprite.

"SET SPRITE PRIORITY" would have to be used to make sure the text appears over the box.

04-19-2003 20:26

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

you don't need to make the text a sprite, just draw the text where you want it.

04-20-2003 03:53

Posted by:
CubeFusion

Location:
California, USA

Find more posts by CubeFusion

But then the text would appear "Underneath" the sprite box. This could be a good or bad thing depending on whether the box that he is talking about is transparent on the inside. If the Sprite box is hollow (transparent) on the inside, then the text (and anything else on the canvas below) will show through the sprite. However if it is a solid box, then the text would have to be a sprite to show up on top. At least according to my tests with TNT Basic.

04-20-2003 04:34

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Ahh

Oh ok, so there's a command to make an image from an image from the canvas? That helps a lot, thanks!

The other thing I tried was to paste the box and make the sprites underneath it paste on the canvas and turn off, but that brought other problems.

04-20-2003 16:44

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

couldn't you draw the text on a different canvas so as to draw it on top of the sprite? i havn't tried it, and i'd actually like to know.

04-20-2003 17:12

Posted by:
CubeFusion

Location:
California, USA

Find more posts by CubeFusion

Sprites will "always" appear on top of any canvas, no exceptions. One thing that I will have to test, is there a way to make a color transparent on canvas 1 (So you can paint on it or draw text). And then open a new viewport on canvas 0 referencing the previous canvas you just created. Assuming you had a background (Something other than black) on canvas 0, would the background show through the viewport's transparent sections?

I have a gut feeling that this wouldn't work, but I'm not 100% sure...

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.