Opened 13 years ago
Closed 13 years ago
#3787 closed defect (fixed)
wrong dash pattern
Reported by: | zanollim | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | MapServer C Library | Version: | 6.0 |
Severity: | normal | Keywords: | |
Cc: | tbonfort |
Description (last modified by )
I'm not able to reproduce this pattern [mapserver-6.0.0-beta3]:
==== == ==== == ==== ==
here the map code
STYLE COLOR 0 0 0 LINECAP square PATTERN 4 2 2 2 END END
Is this a bug? Thanks, michele
Attachments (3)
Change History (17)
comment:1 by , 13 years ago
Cc: | added |
---|
comment:2 by , 13 years ago
Description: | modified (diff) |
---|
comment:3 by , 13 years ago
Thanks tbonfort,
it seems that 4 2 1 2 is the best solution for me.
But in the map the value 2 [num off] is shorter than value 1 [num on]
(see the screenshot attached)
I think this is a wrong behavior
michele
by , 13 years ago
Attachment: | dash_dot.png added |
---|
comment:5 by , 13 years ago
but my screenshot refers exactly to this code
STYLE WIDTH 3 OUTLINECOLOR 160 0 160 LINECAP butt PATTERN 4 2 1 2 END END
comment:6 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Ok,
there might be some glitches in how different renderers interpret the line caps. Given that there's a workaround (by augmenting the white space), and that the implementation of a fix would involve getting into the code of each renderer (agg,cairo,gd), I don't think this this will get investigated more.
comment:7 by , 13 years ago
As you can see in the pattern_4_3_1_3 attachment, augmenting the white space returns a copletely different and wrong behavior.
comment:8 by , 13 years ago
Note that the pattern, starting from beta3, is not scaled by the line width (as was the case beforehand). In that regard, it is usually not a good idea to have any value in your pattern that is smaller than the actual width of your line.
so, using width 3, do you get what you expect with
STYLE WIDTH 3 OUTLINECOLOR 160 0 160 LINECAP butt PATTERN 12 6 6 6 END END
?
comment:9 by , 13 years ago
sorry tbonfort, but your style code (see pattern_12_6_6_6 attachment) is too far from the best solution for me (see the dash_dot attachment)
by , 13 years ago
Attachment: | pattern_12_6_6_6.png added |
---|
comment:10 by , 13 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
thank you for pushing on this ;)
I looked in the code and there was a bug in the mapserver agg code. I'll commit the fix asap and let you try with trunk.
comment:13 by , 13 years ago
My tests with mapserver-6.0.0-beta4 are OK! For me this ticket can be closed
comment:14 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I'm guessing that the square linecap is eating into the blank space left between the dashes. Try with linecap butt, or increasing the spacing, eg:
4 3 2 3