Open Graph Drawing Framework
current version:
v.2015.05 (Baobab)
     

gml2pic Reference Documentation

The gml2pic utility is used from the command line. The basic syntax is

gml2pic [ Options ] input-graph

The following options are available (default values are shown in bold face and underlined):

General options

  • -format type
    Specifies the file format of the input graph; if auto is selected, gml2pic uses the file extension of the input graph (.gml or .ogml) to detect the format.
    Possible types are: auto, GML, OGML (these names are case insensitive, so you can also write gml or ogml)
  • -pic type
    Selects the image format of the produced graphics file.
    Possible types are: PNG, JPG, TIFF, SVG, PDF, EPS (these names are case insensitive, so you can also write png, jpg, etc.)
  • -o filename
    Specifies the file name of the produced graphics file. By default, the file name is derived from the input file name by changing the file extension according to the chosen image format (i.e., to .png, .jpg, .tiff, .svg, .pdf, or .eps).
  • -msg-level level
    Selects the message level, which determines how much informative output is produced; possible levels are:
    • silent
      no output is produced (except for error messages).
    • normal
      few output is produced (mainly the names of processed graphs).
    • verbose
      much output is produced (additional information about the graph read and what gml2pic is currently doing).
  • -version
    Shows the version of gml2pic and the used Qt library, and exits.
  • -help
    Displays help about calling syntax and available options, and exists.

Options for adjusting how objects are being rendered

  • -no-node-labels
    Instructs gml2pic to omit all node labels (not set by default); can be used to speed up drawing for large graphs.
  • -no-cluster-labels
    Instructs gml2pic to omit all cluster labels (not set by default); can be used to speed up drawing for large graphs.
  • -margin size
    Specifies an additional margin around the drawing (default is 0); the size of the margin is given with respect to GML coordinates (not pixels).
  • -arrows type
    Selects how to draw arrow heads of arcs; possible types are:
    • gml
      use the corresponding attribute from the GML file for each edge.
    • none
      do not draw arrow heads at all.
    • first
      always draw arrow heads at the source node of an edge, but never at the target node.
    • last
      always draw arrow heads at the target node of an edge, but never at the source node.
    • both
      always draw arrow heads at both source and target node of an edge.
  • -curve type
    Selects the curve type for rendering edges; possible types are:
    • linear
      simply draws a polyline with bend points.
    • quad
      smoothes edges using quadratic Bézier curves.
    • cubic
      smoothes edges using cubic Bézier curves.
    • arc
      smoothes edges using circular arcs.
  • -curvedLength len
    Specifies the maximal length of line segments that are curved, i.e., segments longer than 2*len will be drawn linear in the middle part.
    Only applies if curve type is quad, cubic, or arc.
    The default value depends on the curve type: 20 (quadratic Bézier), 40 (cubic Bézier), 25 (circular arc)

Options for bitmap graphics

These options only apply to bitmap graphics formats (PNG, JPEG, TIFF); when creating vector graphics, they are simply ignored.

  • -bg color
    Specifies the background color. A color is defined by a string as used by Qt's QColor::setNamedColor() method; possible values for color are:
    • #RGB
      (each of R, G, and B is a single hex digit)
    • #RRGGBB
    • #RRRGGGBBB
    • #RRRRGGGGBBBB
    • a name from the list of SVG color keywords, e.g., white, black, lightgray, or orange.
    • transparent
  • -width w
    Specifies the width of the generated bitmap in pixels.
    If the height of the bitmap is not explicitly specified, it is computed such that the aspect ratio of the drawing is preserved.
  • -height h
    Specifies the height of the generated bitmap in pixels.
    If the width of the bitmap is not explicitly specified, it is computed such that the aspect ratio of the drawing is preserved.
  • -scale f
    Specifies a scale factor for scaling the GML coordinates. The default scale factor is 1.0, which means that 1 unit in GML coordinates corresponds to 1 pixel in the bitmap.
    Note: If width or height (or both) are explicitly specified, it is not allowed to also specify a scale factor.
  • -compression level
    Specifies the compression level for the graphics format; only applies to PNG and JPEG formats. Possible values for level are:
    • -1
      uses default values for image formats (PNG: 100; JPEG: 0).
    • a number between 0 and 100
      the higher the number the higher is the compression level (resulting in smaller file size). Notice that PNG uses lossless compression, hence a high compression level does not decrease image quality but only increases runtime; on the other hand, a high compression level for JPEG files decreases image quality.
 
project/gml2pic-doc.txt · Last modified: 2014/12/16 12:20 (external edit)
This page is driven by DokuWiki