-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotation labels #1729
Rotation labels #1729
Conversation
See http://hub.qgis.org/issues/11814 NOTE: the map rotation should likely be considered at LabelPlacement configuration rather than at rendering time
One example issue with putting the map support in the renderer is (for example) that upside-down labels are not flipped when the upside-down occurs due to map rotation... |
Subtle differences in tests again: http://dash.orfeo-toolbox.org/testDetails.php?test=27343142&build=166204 And if we update images, I'm afraid, they'll need to be updated more later, when changing the rendering pipeline again. Could we just raise tolerances instead @dakcarto ? |
Hopefully fixes existing (oversensitive) rendering tests: https://travis-ci.org/qgis/QGIS/builds/43697679 http://dash.orfeo-toolbox.org/testDetails.php?test=27343142&build=166204
Still fails even with the short-cut. Reminds me of the first rotation support commit (read: it's crazy). |
It's just a test to try at understanding the unstable test results from TravisCI (extremely frustrating). Again, this commit will need to be REVERTED before merging to master.
.. this is getting ilarious
painter->translate( QPointF( outPt.x(), outPt.y() ) ); | ||
painter->rotate( -lp->getAlpha() * 180 / M_PI ); | ||
QRectF rect( 0, 0, outPt2.x() - outPt.x(), outPt2.y() - outPt.y() ); | ||
rect = QRectF( 0, 0, outPt2.x() - outPt.x(), outPt2.y() - outPt.y() ); | ||
painter->drawRect( rect ); | ||
painter->restore(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this rect
assignment methodology change necessary? Just masks git blame
results for no apparent gain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the last 3 commits are just expeirments for travis, if you really want to see the real changes drop the last 3 (or even 4) commits. Will make this branch back to its original and focus on augmenting test tolerance tomorrow, if you leave some notes here about how to do that.
See http://hub.qgis.org/issues/11848 for possible cause of the failing tests. |
For instances where your labeling test images are close, but need some tolerance, you can add either color or mismatch tolerances to the base test, or add anomalies to the control image set. From Modules section in labeling tests README:
|
Add some map rotation knowledge in label renderer.
Horizontal and parallel line labels are now drawn correctly.
Curved labels are still suffering and I hadn't tested backshadow and such.
\cc @dakcarto for review
Related hub ticket: http://hub.qgis.org/issues/11814