[GRASS-dev] [GRASS GIS] #3320: d.text does not show anything with screen position in geographic coordinates or pixels
GRASS GIS
trac at osgeo.org
Fri Mar 24 05:50:10 PDT 2017
#3320: d.text does not show anything with screen position in geographic
coordinates or pixels
----------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.2.1
Component: Display | Version: 7.2.0
Keywords: d.text d.graph | CPU: Unspecified
Platform: Unspecified |
----------------------------+-------------------------
G7:d.text works only with the default settings. I get nothing when using
the `-g` (map/geo coordinates) or `-p` (screen pixels). Same in trunk and
7.2 (likely also 7.0).
Relevant flags and option:
{{{
-p Screen position in pixels ([0,0] is top left)
-g Screen position in geographic coordinates
at Screen position at which text will begin to be drawn (percentage,
[0,0] is lower left)
}}}
How to reproduce:
{{{
#!bash
d.mon wx0
# OK
d.text at=50,50 text=TestPer
# nothing
d.text at=635334.375,220456.25 -g text=TestCoor
# nothing
d.text at=200,200 -p text=TestPx
# d.mon stop=wx0
}}}
Workaround with G7:d.graph:
{{{
#!bash
d.graph -m << EOF
color black
move 635334.375,220456.25
text TestGraph
EOF
}}}
Here is the initialization code in `d.text` and in `d.graph`:
{{{
#!c
/* d.text */
D_setup_unity(0);
/* d.graph */
if (mapcoords->answer) {
mapunits = TRUE;
D_setup(0);
}
else {
D_setup2(0, 0, 100, 0, 0, 100);
mapunits = FALSE;
}
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3320>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list