Bug report #21092
Marker line with custom dash
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Symbology | ||
Affected QGIS version: | 3.4.4 | Regression?: | No |
Operating System: | Win 10 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 28910 |
Description
Rendering of comlex line symbol ( marker line with custom dash line ) show different incorrect results on different scales. See examples on the pictures. "Scale 1:500" shows correct rendering. Position of marker match the gap of dashed line. "Scale 1:250" - line cross the symbol. "Scale 1:10000" - wrong symbol size. Size of symbol is set in map units. With this scale it must be one pixel only or invisible. I see this problem in both QGIS 2.18 and 3.4 versions.
History
#1 Updated by Sergey Chernyshov over 5 years ago
BTW check/uncheck flag "clip features to canvas extent" in Advanced doesn't solve it
#2 Updated by Giovanni Manghi over 5 years ago
- Easy fix? changed from Yes to No
- Status changed from Open to In Progress
- Regression? changed from Yes to No
Please try the latest version available, 3.4.4
#3 Updated by Sergey Chernyshov over 5 years ago
Giovanni Manghi wrote:
Please try the latest version available, 3.4.4
In ver 3.4.4 result is the same.
#4 Updated by Sergey Chernyshov over 5 years ago
I see the problem is because rendering uses different algorythmes for draw Marker line and Simple line with Custom dash pattern.
For Marker line I set Marker placement parameter = "with interval" and Units for this interval are "Map units". Rendering algorythm calculates position of each markers from the beginning of line.
I expected the the same algorythm for dashed line. But it differs!
Pen object uses Custom Dash Pattern (qgslinesymbollayerv2.cpp):
mPen.setStyle( Qt::CustomDashLine );
...
mPen.setDashPattern( scaledVector );
Then beninning of dashes / spaces depends on current visible frame, visible part of feature, etc.
#5 Updated by Giovanni Manghi over 5 years ago
- Status changed from In Progress to Open
- Affected QGIS version changed from 3.4.2 to 3.4.4
#6 Updated by Alexis Roy-L over 5 years ago
Did some tests, on my end, only font marker seem to behave this way. Typical symbols and SVGs are ok and maintain their scale when zoomed out.
#7 Updated by Sergey Chernyshov over 5 years ago
Alexis Roy-L wrote:
Did some tests, on my end, only font marker seem to behave this way. Typical symbols and SVGs are ok and maintain their scale when zoomed out.
The problem is with custom dashes and spaces (in map units!). In my tests all types of symbol were rendered correct.