public class SVGWriter extends Object
Modifier and Type | Field and Description |
---|---|
static String |
_class |
static String |
_strokecapbutt |
static String |
_strokecapround |
static String |
_strokecapsquare |
static String |
_strokedasharray |
static String |
_strokedashoffset |
static String |
_strokejoinbevel |
static String |
_strokejoinmiter |
static String |
_strokejoinround |
static String |
_strokelinecap |
static String |
_strokelinejoin |
static String |
_strokemiterlimit |
static String |
_strokewidth |
static float |
DEFAULT_DASH_OFFSET |
static float |
DEFAULT_MITER_LIMIT |
static String |
svgURI
the SVG namespace URI
|
static String |
xlinkURI
the xlink namespace URI
|
Constructor and Description |
---|
SVGWriter() |
Modifier and Type | Method and Description |
---|---|
static String |
arrayOffloatAsCSStrings(float[] ar) |
Document |
exportVirtualSpace(VirtualSpace vs,
DOMImplementation di,
File dest)
Export the content of a virtual space as a DOM object (that can then be serialized as an XML document using the parser of your choice (returns null if any error occurs)
|
Document |
exportVirtualSpace(VirtualSpace vs,
DOMImplementation di,
File dest,
SVGWriterPostProcessor epp)
Export the content of a virtual space as a DOM object (that can then be serialized as an XML document using the parser of your choice (returns null if any error occurs)
|
static String |
getGenericFontFamily(Font f) |
String |
getSVGPathCoordinates(DPath p)
Serialze a DPath's cordinates.
|
String |
getSVGPathCoordinates(PathIterator pi)
Serialze a DPath's cordinates (from its PathIterator).
|
public static String _strokewidth
public static String _strokelinecap
public static String _strokelinejoin
public static String _strokemiterlimit
public static String _strokedasharray
public static String _strokedashoffset
public static String _strokecapbutt
public static String _strokecapround
public static String _strokecapsquare
public static String _strokejoinbevel
public static String _strokejoinmiter
public static String _strokejoinround
public static String _class
public static float DEFAULT_MITER_LIMIT
public static float DEFAULT_DASH_OFFSET
public static final String svgURI
public static final String xlinkURI
public Document exportVirtualSpace(VirtualSpace vs, DOMImplementation di, File dest)
vs
- virtual space to be exporteddi
- a DOMImplementation, like org.apache.xerces.dom.DOMImplementationImpl()dest
- destination file to which the SVG is exported (SVGWriter does not serialize the SVG document, but needs this info in case there are bitmap images associated with your SVG document, so that they get output in a subdirectory whose name is based on the main SVG file name) - This is necessary ONLY if the exported VirtualSpace contains one or more instances of VImage (or any subclass). Otherwise, you can pass null. VImages get exported as separate PNG files referenced using relative URIs in the main SVG file. The scheme is as follows: for a main SVG file named abcd.svg, a directory named abcd_files will be created, and PNG images will be placed there, named zvtmXXX.png where XXX is a positive integerpublic Document exportVirtualSpace(VirtualSpace vs, DOMImplementation di, File dest, SVGWriterPostProcessor epp)
vs
- virtual space to be exporteddi
- a DOMImplementation, like org.apache.xerces.dom.DOMImplementationImpl()dest
- destination file to which the SVG is exported (SVGWriter does not serialize the SVG document, but needs this info in case there are bitmap images associated with your SVG document, so that they get output in a subdirectory whose name is based on the main SVG file name) - This is necessary ONLY if the exported VirtualSpace contains one or more instances of VImage (or any subclass). Otherwise, you can pass null. VImages get exported as separate PNG files referenced using relative URIs in the main SVG file. The scheme is as follows: for a main SVG file named abcd.svg, a directory named abcd_files will be created, and PNG images will be placed there, named zvtmXXX.png where XXX is a positive integerepp
- object implementing the SVGWriterPostProcessing interfacepublic String getSVGPathCoordinates(PathIterator pi)
public static String arrayOffloatAsCSStrings(float[] ar)
Copyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.