Home
Categories
Dictionary
Download
Project Details
FAQ
License

JavaFX to SVG conversion usage


You use the library to convert to SVG by calling one of the convert methods of the SVGConverter class.

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

You can reuse the same SVGConverter for more than one JavaFX Node conversion.

Parameters

Main Article: ConverterParameters

By default the width and the height of the resulting svg document are those of the root node bounds. However several parameters allow to configure the result. 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