We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want to write somefunction(float xmin, float xmax, float ymin, float ymax)
which maps coordinates like:
0,0 +--------+ +---------+ xmax, ymax
| | to | |
| | | |
+--------+ width,height xmin,ymin +---------+
I could do this in processing 2 but changes in 3 invalidates previous method.
Answers
Maybe
rectMode(CORNERS);
: :-/https://Processing.org/reference/rectMode_.html
height-500
height-500?
Do you want the bottom left corner of the display to be the origin [0,0] ?
Try this
@quark: I want to have an arbitrary position of bottom left corner, and I want it to work with everything, not just rect. image(), rect(), vertex(), qad(), line(), point(), etc.
It's trivial to do in legacy opengl, and last time I did it by changing the matrix for PGraphicsOpenGL or similiar. I might have to dig around the source code again.
I've solved it
I use it like this: