Java Reference
In-Depth Information
F The FXD data file —the conversion step will generate a data file embedded in the FXZ
compressed file named content.fxd . This is a textual file, which contains JavaFX
object literal declarations of a scene graph that represents objects exported from the
original SVG file.
F Generated PNG iles —when the SVG file contains bit-mapped objects (embedded or
linked), they are rasterized down to PNG or JPG image files. Similar to the Illustrator
plugin, the SVG converter utility will rasterize complex visual effects that it cannot
convert to native JavaFX objects. All generated images are embedded in the FXZ
files and are accessed using an ImageView node in the FXD file.
F Text —the SVG Converter tool will automatically export Text objects from the SVG file
as Text instances in the JavaFX FXD file. It will export the font's name, weight, and
size. However, the SVG to JavaFX conversion does not support embeddable fonts; if
the font is not there, it the Text object will default to a supported font.
There's more...
The current version of the Production Suite's SVG Converter supports several SVG standards,
including SVG 1.1 and SVG Tiny 1.1. The exported FXD data file, content.fxd , contains a set
of nested literal declarations of Group instances organized as follows:
F Root group —the FXD file contains a root Group instance that serves as a container
for all other groups of objects exported from the SVG file.
F Exported layers —each <g> (or group) tag in the SVG document is mapped to a Group
instance in the FXD document. The Group's id:String property is set to the value
of the <g> tag's id attribute. The vector graphics objects in each <g> elements are
then exported as either native JavaFX graphics nodes or as instances of SVGPath ,
with path values copied from the SVG file.
What gets exported
The following outlines the objects supported by the SVG Converter and how they are exported
to JavaFX:
F Primitive shapes —basic shapes such as line, polyline, rectangle, polygon, and oval
map directly to the corresponding JavaFX shape objects.
F Curves, paths, and complex shapes —SVG curves are mapped to the appropriate
JavaFX curve classes whenever possible. However, if there are no corresponding
graphics classes for the shape being exported, the converter will fall back to the
JavaFX SVGPath class to export complex shapes.
F Paint, stroke, and gradient —the converter supports the paint and strokes, and stroke
attributes from SVG to JavaFX using RGB colors. Gradients from the SVG artwork will
map to either the LinearGradient or the RadialGradient class. If the gradient is
part of a complex shape, the converter may choose to export it as a rasterized image.
 
Search WWH ::




Custom Search