other versions
- jessie 6.4.4-1
- stretch 7.2.0-2
- testing 7.6.0-1
- unstable 7.6.0-1
- experimental 7.6.1-1~exp1
cairodriver(1grass) | Grass User's Manual | cairodriver(1grass) |
NAME¶
Cairo driver - driver for bitmap or vector output using the Cairo graphics library.DESCRIPTION¶
The Cairo driver generates PNG, BMP, PPM, PS, PDF or SVG images from GRASS display commands, using the Cairo graphics library. The image format is selected from the extension of the output file. It is started as 'pseudo' monitor (output to an image file) and when stopped, all output from previously used display commands are written to the output file.USAGE¶
Environment variables¶
Several environment variables affect the operation of the Cairo driver:GRASS_WIDTH=xxx
the width of the image. GRASS_HEIGHT=yyy
the height of the image. GRASS_CAIROFILE=filename
the name and format of the resulting image file, default is map.png.
The image format is determined from the file extension.
Supported bitmap formats:
specifies the background color to use in RGB notation (hex values). Default is
FFFFFF (white). GRASS_TRANSPARENT=[TRUE|FALSE]
sets transparent background on (TRUE) or off (FALSE, default).
GRASS_AUTO_WRITE=[TRUE|FALSE]
if set to TRUE, the image file will be written after each operation (i.e.
whenever a client disconnects), rather than only being written out when the
driver terminates.
(Note: This only applies to bitmap formats - vector formats are always written
directly to file). GRASS_CAIRO_READ
if TRUE, the Cairo driver will initialize the image from the contents of
GRASS_CAIROFILE.
(Note: This is only supported for bitmap formats) GRASS_CAIRO_MAPPED
if TRUE, the Cairo driver will map GRASS_CAIROFILE as its framebuffer, rather
than using memory. This only works with BMP files.
.png - Portable Network Graphics (PNG) .bmp
- Windows Bitmap (BMP, 32-bpp) (these are not readable by some older viewers)
.ppm - Portable Pixmap (PPM + PGM for alpha channel)
Supported vector formats:
.pdf - Portable Document Format (PDF) .ps -
PostScript (PS) .svg - Scalable Vector Graphics (SVG)
(Note: Some formats may not be available, depending on your platform and the
Cairo library that GRASS was built with.) GRASS_BACKGROUNDCOLOR=RRGGBB
Examples¶
Example using the driver directly (bash-syntax):NOTES¶
The driver is still in development. Enable it by specifying --with-cairo when configuring GRASS. This requires a reasonably recent version of the Cairo libraries and a working pkg-config. Antialiasing is enabled by default for bitmap formats. There is currently no way of disabling this. Cairo supports true vector format output whenever possible. However, if the selected format doesn't support a necessary feature, Cairo may fall back on rendering a bitmap representation of the image wrapped in the selected vector format. Cairo driver output via d.out.file is supported via the -c flag.SEE ALSO¶
HTMLMAP driver, PNG driver, PostScript driver, XDRIVERAUTHOR¶
Lars AhlzenGRASS 6.4.4 |