qt-interest@trolltech.com
[Top] [All Lists]

[Qt-interest] QPrinter and QPainter transforms

Subject: [Qt-interest] QPrinter and QPainter transforms
From: James Vernon
Date: Mon, 9 Feb 2009 20:17:25 +0000
Hi all,

I'm trying to print the contents of a QGraphicsScene to paper using
QPainter and QPrinter. In the scene's QGraphicsView, I mirror the view
in the x or y axis by applying a matrix transform.  My problem is that
when I render the scene with a QPainter, I want to apply the same
reflection matrix from the view to the painter with the setMatrix()
method, but doing so causes the visible items to be rendered off the
printable area of the page.

I've tried grabbing the painter window() and viewport(), multiplying
them by the reflection matrix and saving them back to the painter, but
that doesn't seem to be helping. How should I be getting and setting
the viewable/printable area of the page?

Thanks,
James
_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest

<Prev in Thread] Current Thread [Next in Thread>
  • [Qt-interest] QPrinter and QPainter transforms, James Vernon <=