How to make and process a new image(distinct from the screen)?

I want to process a image with the functions like text() or rect(),circle() and put a part of the image in the screen with image.get();
To explain a little more, I have a long text which I want to visualize at the screen. But it’s too long to fit the whole thing inside, so I want to make a image of it with text(), and cut the image with image.get() so it can be fit into the screen. The scroll bar will be used to control which part should be visible.

I remember a class that can be used like
class f;
f.size(200,400);
f.circle(50,20,40);
f.text("",30,30,30,30);
but I can’t remember how to use it. Can someone tell me what to do?

I am not trying to create a new window or something, I just want to edit a image.

I think you are referring to PGrapics.
One thing I should mention is that text has an option with 5 parameters which limits the text to a bound area. You should check it out in the reference. If you want to actually have a scroll effect, the keyword to search in the forum is “panning” and you should get some hits that you can apply to your use case.

Kf