Bug report #1963
"Ghost Lines" when using Anti-aliasing, polygons with shared boundaries, and no outline/QT::NoPen
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||wontfix|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||12023|
QT's anti-aliasing output exhibits an inherent limitation of AA, where polygon edges are drawn/feathered twice and the background color "bleeds" through what are supposed to be tightly shared edges of polygons.
I wonder if some of the new render hints in QT4.4 > might help work around this issue:
See also: http://trac.mapnik.org/ticket/428, where I am working on a workaround using AGG that may apply to the QT renderer, given an exposed API.
#6 Updated by springmeyer - over 9 years ago
We solved this sufficiently in Mapnik within the AGG renderer by allowing the user to control the AA gamma. A gamma of 0 is aliased while 1 is fully anti-aliased and setting gamma to around .6-.7 is able to remove the faint lines while keeping an AA-ish look with much more definition to edges (like coastlines) than can be achieved by the only other known workaround: overpainting with a thin line of the same color as the polygon fill. In short, we solved this by reducing the aggressiveness of the AA algorithm so that polygons are slightly dilated rather are fully AA or aliased.
So, I assume that QT will expose somewhere an equivalent gamma setting (or partial AA ability) - as QT's renderer is originally based on AGG (http://labs.qt.nokia.com/2009/12/18/qt-graphics-and-performance-the-raster-engine/)
#7 Updated by Tim Sutton over 9 years ago
- Status changed from Open to Closed
- Resolution set to wontfix
Reading the the referenced article it seems they only were inspired by AGG and didnt directly use any source code from AGG in their implementation. It seems like Qt4 rendering engine does not expose any agg-like gamma options and there isnt really any reasonable work around we can come up with for this. I am going to close this ticket since the only way to resolve this issue currently is to disable AA rendering it would seem and there isnt anything else we can do to fix it.
#9 Updated by Henrik Uggla over 7 years ago
- Assignee deleted (
- Crashes QGIS or corrupts data set to No
- Affected QGIS version set to master
- Target version changed from Version 1.7.0 to Version 2.0.0
- Status changed from Closed to Reopened
- File testlinux.pdf added
Turning off "Make lines appear less jagged..." removes the thin lines on the screen but they still show when printing (see attached pdf). I can find no option for disabling anti-aliasing in the composer. Applies to both Windows7 and ubuntugis.
Note regarding attached pdf: The thin lines are displayed differently in different pdf-viewers.
#11 Updated by Johannes Kroeger over 3 years ago
Has anything happened in the past years or maybe, hopefully, in QT5 that allows this to be fixed? It would highly improve cartographic quality in some use cases.
If not, a "use fill color for stroke" checkbox would be nice, if that indeed is a workaround for this (as suggested in the duplicates). It could be a useful addition for other use cases as well maybe?
#14 Updated by Giovanni Manghi about 2 years ago
- Status changed from Reopened to Closed
- Description updated (diff)
Johannes Kroeger wrote:
A workaround to this is:
Set the Stroke width to Hairline
Set the Stroke color to
@symbol_colorusing Data defined override
I forgot who shared this, either Nathan or Nyall. :)
is this in the docs? Can't find it.