Stretch the canvas without changing the resolution

can I stretch the canvas without changing the resolution (width,height veriables)?

I’m using my p5js sketch canvas inside a html div. which I’m allowed to thinker with.

what I thought was initial canvas size can not be changed. so resizeCanvas() would probably stretch it or smth. but turns out its literally changing the resolution of the canvas. which I don’t want right now. I don’t know what I can do right now.

I’m trying to preview some image processing inside my canvas and I want to resize my canvas to the predetermined preview resolutions. but if its smaller than the div that the canvas is children to, I want my canvas to stretch out to fill the gaps without messing up the aspect ratio. I guess I know how to find the required stretched out sizes. but I don’t have a way to stretch it out :thinking:

any way to help?

for future questions, so like I said, resizeCanvas() changes the resolution of the canvas. which would mean for me to do extra pixel processing. I didn’t want to simulate the pixelations myself because thats still extra pixel color applying for my cpu. so what I did is that I did all my work in a graphic object. which is at the size of what I want it to be. then stamped it on my (for the context, big) canvas with the image() function which can stretch things. now I can work with low resolution canvases… on big canvasses. it worked fine