sprite to image?

Just starting out? Need help? Post your questions and find answers here.
snap2000
User
User
Posts: 88
Joined: Fri Jun 04, 2004 12:11 am

sprite to image?

Post by snap2000 »

Is it possible to convert a sprite to a 2d image?


Or, perhaps, is it possible, to directly draw a sprite onto another sprite?
fweil
Enthusiast
Enthusiast
Posts: 725
Joined: Thu Apr 22, 2004 5:56 pm
Location: France
Contact:

Post by fweil »

snap2000,

Does not GrabSprite() answer ?

Another way to copy a sprite to an image is to copy the sprite forst to an array and then to copy pixels from the array to an opened image.

Rgrds
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
BalrogSoft
Enthusiast
Enthusiast
Posts: 203
Joined: Sat Apr 26, 2003 6:33 pm
Location: Spain
Contact:

Post by BalrogSoft »

Hi, to draw a sprite inside another sprite, you must use 'UseBuffer' that redirects the sprite drawing to another sprite instead the screen:

Code: Select all

   UseBuffer(1) ; draw sprites on sprite number 1
   
   DisplaySprite(5, 1, 1)

   UseBuffer(-1) ; restore the normal sprite output
snap2000
User
User
Posts: 88
Joined: Fri Jun 04, 2004 12:11 am

Post by snap2000 »

BalrogSoft wrote:Hi, to draw a sprite inside another sprite, you must use 'UseBuffer' that redirects the sprite drawing to another sprite instead the screen:

Code: Select all

   UseBuffer(1) ; draw sprites on sprite number 1
   
   DisplaySprite(5, 1, 1)

   UseBuffer(-1) ; restore the normal sprite output
Thank you! Perfect! Awesome!

I was trying

startdrawing(spriteoutput())

until I realized that displaysprite isn't a 2D drawing function. :P
Post Reply