Quick question.

Started by JBR, September 25, 2021, 01:14:35

Previous topic - Next topic

JBR

Hi,

1) Is it possible to draw an image onto another bigger image?

2) Is there any way a texture can be drawn like an image?

Thanks, Jim.

GrindalfGames

setbuffer imagebuffer(image1handle)
drawimage image2handle,0,0
setbuffer backbuffer()

that would draw an image to another image
Im not sure how you could draw a texture to an image though

RemiD

#2
2 ways to draw a texture like an image :

-using copyrect( fromstartx, fromstarty, fromendx, fromendy, tostartx, tostarty, frombuffer (texturebuffer), tobuffer (backbuffer or imagebuffer or texturebuffer) )

-using a quad + texture with pixel perfect sizing + renderworld, so that one texel of the texture corresponds to one pixel of the screen.
for example :
https://www.syntaxbomb.com/blitz2d-blitzplus-blitz3d/help-error-somewhere-to-position-a-quad-precisely-at-mousex-mousey/