[GRASS-dev] [GRASS GIS] #1410: scalebar displays multiples north arrows
GRASS GIS
trac at osgeo.org
Sat Jun 22 03:39:23 PDT 2013
#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.
??
thanks,
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1410#comment:6>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list