How do I move the camera/window?

Say you have a picture of a massive smiley face that is greater than the size of your window. Is there a way/function call that allows me to move the camera so that I can see the other parts of the smiley face as they come into view?

I apologize if the question is too vague.

You can scale the camera!

Use ofScale(X,Y,0) to scale the image.

if you want to control exactly how you render the image in screen then you can use a ofCamera with orthographic enabled. Look up some ofCamera examples in the examples folder.

Perhaps picture wasn’t the proper choice of word. My objective is to essentially shift the ‘box’ that the window is currently displaying. The image, of let’s say a smiley face, is static. But with arrow keys or with my mouse, I’d like to be able to ‘move’ around the smiley face by moving the window box… not physically moving the window with Windows API but like moving it to see more of an image.

It’s like how you move the ‘camera’ in video games.

I apologize if this doesn’t really make any sense.

If you could link a page of examples, that would be appreciated. I searched but couldn’t find the example page you mentioned.

Yep, I understood this is what you wanted. To shift the camera, you can use ofTranslate(X,Y,0), and to increase the width of the red box, thus zooming back, you can use ofScale(X,Y,0)

Ah, thank you for clarifying that for me. Just wanted to make sure I was heading down the right path for this matter. I appreciate the help! :slight_smile: