r13940 by fschmid - Better rendering of patterns on screen.
scribus-commit
scribus-commit at lists.scribus.net
Sat Aug 29 11:30:15 CEST 2009
Revision: 13940
Author: fschmid
Date: 2009-08-29T09:30:37.893102Z
Commit message: Better rendering of patterns on screen.
Changeset:
M /branches/Version135/Scribus/scribus/scpainter.cpp
Diffs:
Index: scribus/scpainter.cpp
===================================================================
--- scribus/scpainter.cpp (revision 13939)
+++ scribus/scpainter.cpp (revision 13940)
@@ -994,6 +994,7 @@
qmatrix.translate(patternOffsetX, patternOffsetY);
qmatrix.rotate(patternRotation);
qmatrix.scale(patternScaleX, patternScaleY);
+ qmatrix.scale(m_pattern->width / static_cast<double>(m_pattern->getPattern()->width()), m_pattern->height / static_cast<double>(m_pattern->getPattern()->height()));
cairo_matrix_init(&matrix, qmatrix.m11(), qmatrix.m12(), qmatrix.m21(), qmatrix.m22(), qmatrix.dx(), qmatrix.dy());
cairo_matrix_invert(&matrix);
cairo_pattern_set_matrix (m_pat, &matrix);
@@ -1089,6 +1090,7 @@
qmatrix.translate(patternOffsetX, patternOffsetY);
qmatrix.rotate(patternRotation);
qmatrix.scale(patternScaleX, patternScaleY);
+ qmatrix.scale(m_pattern->width / static_cast<double>(m_pattern->getPattern()->width()), m_pattern->height / static_cast<double>(m_pattern->getPattern()->height()));
QBrush brush = QBrush(*m_pattern->getPattern());
brush.setMatrix(qmatrix);
painter.rotate(0.0001); // hack to get Qt-4's strange pattern rendering working
More information about the scribus-commit
mailing list