Bug report #10166

Anti-aliasing leads to visible borders even if borders have "no pen"

Added by Johannes Kroeger over 10 years ago. Updated over 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:2.2.0 Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18620

Description

The option "Options -> Rendering -> Rendering Quality: Make lines appear less jagged at the expense of some drawing performance" leads to unwanted visual artifacts when drawing polygons with no borders.

To reproduce:
1. Have some polygons with adjacent/shared borders, eg from a Delaunay/Voronoi.
2. Set "Border style" to "No pen".
3. Set "Options -> Rendering -> Rendering Quality: Make lines appear less jagged at the expense of some drawing performance" to true by ticking the box. If it is ticked, the borders will appear in the color of the background as visible lines. If the option is unticked, there will be no visible borders as intended. See the attached image for an example.

I am on Linux using binary nvidia drivers.
QGIS version 2.3.0-Master
QGIS code revision eacb5bd
Compiled against Qt 4.8.6
Running against Qt 4.8.6
QWT Version 6.1.0
QScintilla2 Version 2.8.1

jaggedlinesantialiasingvisibleborders.png (22.3 KB) Johannes Kroeger, 2014-05-04 03:11 AM

History

#1 Updated by Martin Dobias over 10 years ago

You can simply keep using border with the border color equal to the fill color - this will make the artifacts disappear.

#2 Updated by Johannes Kroeger over 10 years ago

That hack is only feasible if you use a Single Symbol symbology. Otherwise you would need to update each class to have identical fill and border colors.

#3 Updated by Jürgen Fischer over 10 years ago

  • Category set to Symbology

#4 Updated by Sandro Santilli about 10 years ago

Maybe there could be an option to make the border style follow the fill style.

#5 Updated by Sandro Santilli about 10 years ago

I shall also mention that for me the artifacts are also visible with "Make lines appear less jagged at the expense of some drawing performance" option unchecked. Just less visible, but occasionally they still emerge.

#6 Updated by Sandro Santilli about 10 years ago

Indeed with a "graduated" symbology it is much harder to fix as you have to go in each and every class, and the default classes all have a black border

#7 Updated by Johannes Kroeger over 7 years ago

  • Status changed from Open to Closed

Duplicate of #1963

For what it's worth, the fix of adding the same color to the no-stroke border does not work for me in a satisfying way in 2.18.5.

Also available in: Atom PDF