0

Who knows how to move from top left coordinate system to the default, where X/Y-axis starts from the left bottom corner (like we always draw them) on QPixmap/Qimage

tema
  • 1,115
  • 14
  • 33
  • Did you already read the QPainter's documentation about [coordinate transforms](http://qt-project.org/doc/qt-4.8/qpainter.html#coordinate-transformations)? –  May 05 '13 at 18:43
  • @Roku yes, but I don't understand how can I do what I told. – tema May 05 '13 at 18:46

1 Answers1

1

Here's the solution:

QMatrix m;
m.translate(0,size.height());
m.scale(1,-1);
QPainter painter;
painter.begin(&pic);
painter.setMatrix(m);
tema
  • 1,115
  • 14
  • 33