Is there a way to make a temporary "image" with Pyglet? (Something akin to LÖVE's Canvas).
Basically, I want to have an object that I could blit stuff like sprites and text to, and then blit this temporary image to the window.
I tried creating an image with pyglet.image.create()
, but apparently it procures an ImageData
which you can't blit to.
Thank you very much for your attention.
Checkout AbstractImage. It has all the methods I think you want - creating an image offline, blitting
stuff to it:
myimage.blit_into('sprite1',x,y,z)
myimage.blit_into('sprite2',x+20,y,z)
and then blitting it to the active frame:
myimage.blit(x,y[,z])
etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With