سؤال

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

هل كانت مفيدة؟

المحلول

Here's the solution:

QMatrix m;
m.translate(0,size.height());
m.scale(1,-1);
QPainter painter;
painter.begin(&pic);
painter.setMatrix(m);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top