Home
Categories
Dictionary
Download
Project Details
FAQ
License

Converter Parameters


    1  Parameters
       1.1  width
       1.2  height
       1.3  hasViewbox
       1.4  allowTransformForRoot
       1.5  background
    2  Example
    3  See also

The ConverterParameters class allows to configure the exporting of the JavaFX tree to a SVG file with the SVGConverter.

Parameters

width

The width parameter allows to set the width of the resulting svg document. If not set, by default the width will be the width of the root node bounds.

height

The height parameter allows to set the height of the resulting svg document. If not set, by default the width will be the height of the root node bounds.

hasViewbox

The hasViewbox parameter allows to set the viewbox of the resulting svg document. The viewbox will have the width and height of the svg document It is false by default.

allowTransformForRoot

The allowTransformForRoot parameter allows to allow transformations on the root of the svg document. It is true by default.

background

The background parameter allows to set the background color of the resulting svg document. The converter will generate a rectangle with the width and height of the svg document as the first child.

Example

For example:
   ConverterParameters params = new ConverterParameters();
   params.width = 150;
   params.height = 150;      
   SVGConverter converter = new SVGConverter();
   converter.convert(<my JavaFX root>, params, <my SVG file>);

See also


Categories: tosvg

Copyright 2021-2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD-3-Clause License