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:

Qt Code:
  1. //move the coording system to the (WIDTH,HEIGHT)
  2. painter.translate(WIDTH,HEIGHT);
  3. //rotate the coordinating system for 180 degrees
  4. painter.rotate(180);
  5. //sets the painter's window to the rectangle beginning at (x, y) and the given width and height.
  6. 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.