From: Emden Gansner Date: Fri, 2 Sep 2011 01:38:48 +0000 (-0400) Subject: Add note describing required size information for image files. X-Git-Tag: LAST_LIBGRAPH~32^2~674^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a233f3f16b98797208b8050e649fa814ab31fc1c;p=graphviz Add note describing required size information for image files. --- diff --git a/doc/info/attrs.html b/doc/info/attrs.html index 780411bad..045566abe 100644 --- a/doc/info/attrs.html +++ b/doc/info/attrs.html @@ -910,9 +910,23 @@ This field indicates which graph component uses the attribute.
Gives the name of a file containing an image to be displayed inside a node. The image file must be in one of the recognized formats, - typically JPEG, PNG, GIF or Postscript, and be able to be converted + typically JPEG, PNG, GIF, BMP, SVG or Postscript, and be able to be converted into the desired output format.

+ The file must contain the image size information. This is usually trivially + true for the bitmap formats. For PostScript, the file must contain a + line starting with %%BoundingBox: followed by four integers + specifying the lower left x and y coordinates and the upper right x and y + coordinates of the bounding box for the image, the coordinates being in + points. An SVG image file must contain width and height + attributes, typically as part of the svg element. + The values for these should have the form of a floating point number, + followed by optional units, e.g., width="76pt". + Recognized units are in, px, + pc, pt, cm and mm for inches, pixels, + picas, points, centimeters and millimeters, respectively. + The default unit is points. +

Unlike with the shapefile attribute, the image is treated as node content rather than the entire node. In particular, an image can diff --git a/doc/infosrc/attrs b/doc/infosrc/attrs index 5c28bb5cc..a2b386342 100644 --- a/doc/infosrc/attrs +++ b/doc/infosrc/attrs @@ -413,9 +413,23 @@ can include multiple image maps in the same document. Gives the name of a file containing an image to be displayed inside a node. The image file must be in one of the recognized formats, -typically JPEG, PNG, GIF or Postscript, and be able to be converted +typically JPEG, PNG, GIF, BMP, SVG or Postscript, and be able to be converted into the desired output format.

+The file must contain the image size information. This is usually trivially +true for the bitmap formats. For PostScript, the file must contain a +line starting with %%BoundingBox: followed by four integers +specifying the lower left x and y coordinates and the upper right x and y +coordinates of the bounding box for the image, the coordinates being in +points. An SVG image file must contain width and height +attributes, typically as part of the svg element. +The values for these should have the form of a floating point number, +followed by optional units, e.g., width="76pt". +Recognized units are in, px, +pc, pt, cm and mm for inches, pixels, +picas, points, centimeters and millimeters, respectively. +The default unit is points. +

Unlike with the shapefile attribute, the image is treated as node content rather than the entire node. In particular, an image can