Hi. I want to implement the coordinate system like in math where there would be a rectangle with 4 corners:
- the first corner would be (0,0) --> left+down
- the second --> (0,1) --> right + down
- third --> (1,0) --> left + up
- forth --> (1,1) --> right + up
----> that is what the coordinate system looks like in math
But in programming it's not like that. I need a way to make this possible. Any ideas?
I'm using QPainter class. I tried like this:
//move the coording system to the (WIDTH,HEIGHT)
painter.translate(WIDTH,HEIGHT);
//rotate the coordinating system for 180 degrees
painter.rotate(180);
//sets the painter's window to the rectangle beginning at (x, y) and the given width and height.
painter.setWindow(0,0,WIDTH,HEIGHT);
//move the coording system to the (WIDTH,HEIGHT)
painter.translate(WIDTH,HEIGHT);
//rotate the coordinating system for 180 degrees
painter.rotate(180);
//sets the painter's window to the rectangle beginning at (x, y) and the given width and height.
painter.setWindow(0,0,WIDTH,HEIGHT);
To copy to clipboard, switch view to plain text mode
but it's not exactly what I want...
I need some suggestions how to make this possible.
Bookmarks