[GRASS-dev] raster offset with cairo driver

Hamish hamish_nospam at yahoo.com
Tue Nov 27 00:10:57 EST 2007


Hi,

raster offset and fonts now look ok, good stuff guys.

I've updated the fancy example on the wiki page to show off the fancy compass:
 http://grass.gdf-hannover.de/wiki/Cairo_driver#Examples


d.out.file now has added support for ps, svg, and pdf by way of the Cairo
driver.

but it doesn't work, I get output like this for the simple spearfish example:

$ cat spearfish.ps
%!PS-Adobe-3.0
%%Creator: cairo (http://cairographics.org)
%%CreationDate: Tue Nov 27 17:12:30 2007
%%Pages: 0
%%BoundingBox: 0 0 800 800
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments
%%BeginProlog
/C{curveto}bind def
/F{fill}bind def
/G{setgray}bind def
/L{lineto}bind def
/M{moveto}bind def
/P{closepath}bind def
/R{setrgbcolor}bind def
/S{show}bind def
%%EndProlog
% _cairo_ps_surface_emit_font_subsets
%%Trailer
%%EOF


$ cat spearfish.svg 
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="800pt" height="800pt"
viewBox="0 0 800 800" version="1.1">
<defs>
<clipPath id="clip0">
  <rect width="800" height="800"/>
</clipPath>
</defs>
<g id="surface0" clip-path="url(#clip0)">
</g>
</svg>


$ cat spearfish.pdf 
%PDF-1.4
%µí®û
%PDF-1.4
%µí®û
1 0 obj
<< /Type /Pages
   /Kids [ ]
   /Count 0
   /Resources <<
      /Font <<
      >>
   >>
>>
endobj
2 0 obj
<< /Creator (cairographics.org)
   /Producer (cairographics.org)
>>
endobj
3 0 obj
<< /Type /Catalog
   /Pages 1 0 R
>>
endobj
xref
0 4
0000000000 65535 f
0000000017 00000 n
0000000133 00000 n
0000000221 00000 n
trailer
<< /Size 4
   /Root 3 0 R
   /Info 2 0 R
>>
startxref
278
%%EOF



also, is it possible for the Cairo driver in PS and PDF modes to respect
GRASS_LANDSCAPE and GRASS_PAPER like the GRASS PS driver?


thanks,
Hamish



      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ


More information about the grass-dev mailing list