문제

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