#1410: scalebar displays multiples north arrows
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
I just tried to use the scalebar in GRASS 7. Because it is a latlon map, I
picked north arrow only. It displays a new line-drawing-only north arrow
(no fill now), AND it displays 3 of them in a row. Only the left-most
arrow has the "N" text with it. This is with both Cairo and PNG displays.
I don't know if this is a problem with d.barscale or the GUI display of
it. I've attached a screenshot. Weird.
Another problem is that the settings for d.barscale disappear if you turn
off the north arrow and scale bar. So you have to set them again. This is
not a big deal, but they used to be kept.
#1410: scalebar displays multiples north arrows
-----------------------------------------------+----------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: barscale, d.barscale, north arrow | Platform: All
Cpu: Unspecified |
-----------------------------------------------+----------------------------
Changes (by cmbarton):
* keywords: => barscale, d.barscale, north arrow
* platform: Unspecified => All
* component: Default => Display
Comment:
The settings issue (above) turned out to be a wxGUI issue that is now
solved. The multiple arrows only seem to appear in a latlon location and
seem to be a d.barscale issue. Related to this, is the missing shading
(black right triangle and white left triangle is now clear on both sides)
intentional or accidental?
#1410: scalebar displays multiples north arrows
-----------------------------------------------+----------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: barscale, d.barscale, north arrow | Platform: All
Cpu: Unspecified |
-----------------------------------------------+----------------------------
Comment(by cmbarton):
d.barscale is still not working in latlon regions for GRASS 7. The
multiple, unfilled north arrows are still being drawn. This seems to be a
d.barscale problem.
#1410: scalebar displays multiples north arrows
-----------------------------------------+----------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: d.barscale, ll, north arrow | Platform: All
Cpu: Unspecified |
-----------------------------------------+----------------------------------
Comment(by hamish):
the triplicate symbols in d.barscale still happens in lat/lon locations
with the new version of the module. The infill problem is fixed now.
it seems to be during this code of D_symbol():
{{{
case S_POLYGON:
...
/* again, to draw the lines */
...
D_begin();
for (k = 0; k < chain->scount; k++) {
xp = x0 + sx * chain->sx[k];
yp = y0 - sy * chain->sy[k];
if (k == 0)
D_move_abs(xp, yp);
else
D_cont_abs(xp, yp);
}
D_end();
D_stroke();
}}}
which is called only once.
adding a printf() in the loop shows the xp and yp display coords look ok:
{{{
xp=50.40 yp=368.00
xp=33.40 yp=386.00
xp=50.40 yp=316.00
xp=68.40 yp=386.00
xp=50.40 yp=368.00
xp=50.40 yp=368.00
}}}
I tried throwing in a D_close() before the D_end(), no change.
- It is unclear to me what D_end() does now, it appears to be a no-op?
trying the different north_arrow= symbol options shows the problem
manifesting itself differently through a couple different scenarios.
My first guess would be a missing D_stroke(), but it's right there...
so my next guess is some D_move_*() or D_pos_*() function error. It's a
bit unclear to me when to use D_pos_*(), I tried to add some more header
comments with what I understand about them, but some clarification would
be appreciated as I fear spreading misinformation.