[GRASS-dev] raster offset with cairo driver
hamish_nospam at yahoo.com
Thu Nov 22 05:04:48 EST 2007
I'm trying out the new Cairo driver. To make things easier I just added support for it to d.out.file: use the -c flag with a raster image format.
As AFAICT there is no user documentation, so I also added a small wiki page for it: http://grass.gdf-hannover.de/wiki/Cairo_driver
It is missing a display/drivers/cairo/description.html page, modeled after the equivalent PNG driver page.
There's a problem in that the raster data is being rendered offset vs. the vector data. For a window with the same aspect ratio as the region it seems to line up ok. Else, not.
d.vect map=streams width=1 color=blue
d.vect map=roads width=2
d.out.file -c sf_cairo format=png size=800,800
# even more dramatic
d.out.file -c sf_cairo1 format=png size=400,800
d.out.file -c sf_cairo3 format=png size=800,400
There's another problem with fonts- True/FreeType fonts gets scrambled.
This reminds me of a long ago bug in d.text.freetype, fixed in rev 1.42.
"use correct pitch for reading bitmap buffer & fix scrambled letters"
(d.* commands given on the above wiki page)
More information about the grass-dev