[GRASS-dev] d.out.file now talks to the PostScript driver
Michael Barton
michael.barton at asu.edu
Tue May 15 12:09:45 EDT 2007
Lorenzo,
Probably a longer answer than you need, but it might be helpful to address
the larger issue of the appearance of GRASS screen output.
I originally wrote d.out.file, the successor to d.out.png (my first GRASS
script written to solve the complete lack of screen->to graphic file output
in version 5). It will only work with the xmon screen displays because it
uses d.save to capture all xdriver commands used to create the screen, and
then plays them back with the output set to PNG (or PS with Hamish¹s
update). The display in the TclTk and wxPython GUI is generated by sending
all d.* commands directly to the PNG driver. So d.save never captures these
display commands. For this reason, d.out.file will not work with the GUI.
The GUI does save the screen to various formats, including EPS.
The high resolution in d.out.file is a bit of a problem. It achieves this by
setting the size of the output graphic to some multiple of its current width
and height in pixels before rendering to the PNG driver. This can put more
pixels into the output graphic file. However, it also causes problems with
vectors (lines get increasingly thin with increased resolution), scales (the
scales get shorter vertically and type gets smaller), and possible some
other features.
Explore mode in the TclTk GUI and normal mode in the wxgrass GUI no longer
tie the number of pixels in the display to the resolution of the raster. So
you get a nicer output image from the screen without the distortions
introduced by the method used in d.out.file. Text is rendering a lot nicer
too because native GUI text can be used for manually placed text objects and
there is much better rendering of TrueType fonts in any text output from the
PNG driver now. Vectors can still look pixelated, however, until we have a
different method of rendering them.
There is ongoing discussion of making a better interface to ps.map to
produce nicer output too.
Michael
On 5/15/07 8:23 AM, "Lorenzo Moretti" <lorenzo.moretti at bologna.enea.it>
wrote:
> Hi Hamish
>
> d.out.file is a very very useful script because it prints at high
> resolution...
> but I have a problem: now I can only work via terminal. Example:
>
> g.region rast=slope -p
> d.mon gism
> d.rast slope
> d.vect streams type=area,line
> d.barscale at=0,94.5
> d.out.file spearfish_pic format=png size=800,600
> d.out.file spearfish_pic format=ps -r paper=a4
>
> I have my ps file or png.
> I have not use x0 terminal. I use new GIS Manager (in GRASS OS X - no X11) and
> if I enter:
>
>> % d.mon -L
>
> I have:
>
>> HTMLMAP Create HTML Image Map not running
>> PS Create PS Map not running
>> ps1 Create PS Map not running
>> ps2 Create PS Map not running
>> ps3 Create PS Map not running
>> ps4 Create PS Map not running
>> ps5 Create PS Map not running
>> ps6 Create PS Map not running
>> ps7 Create PS Map not running
>> PNG Create PNG Map not running
>> png1 Create PNG Map not running
>> png2 Create PNG Map not running
>> png3 Create PNG Map not running
>> png4 Create PNG Map not running
>> png5 Create PNG Map not running
>> png6 Create PNG Map not running
>> png7 Create PNG Map not running
>> gism Create PNG Map for gis.m not running
>>
> My GIS Manager works very well but it has not a selected monitor.
>
> d.out.file has a GUI but how it can view all layers inside GIS Manager?
>
>
>
> Thanks in advance
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20070515/dc817ff3/attachment.html
More information about the grass-dev
mailing list