styleSheets
parameter allows to set an external StyleSheet to apply to the SVG result.LoaderParameters params = new LoaderParameters(); params.stylesheet = <the stylesheets path> SVGImage image = SVGLoader.load(<my svg>, params);
scale
parameter allows to scale the SVG result. Note that:width
parameter. These two parameters are mutually exclusive. If the scale
and width
are both present, the scale
will be applied and width
will be ignoredLoaderParameters params = new LoaderParameters(); params.scale = 0.5d; SVGImage image = SVGLoader.load(<my svg>, params);
width
parameter allows to scale the SVG result by specifying the desired width of the result. Note that:scale
parameterLoaderParameters params = new LoaderParameters(); params.width = 50; SVGImage image = SVGLoader.load(<my svg>, params);
scaleLineWidth
parameter specifies if line widths will also be scaled if the scale
or width
parameter is used to scale the SVG result.LoaderParameters params = new LoaderParameters(); params.scale = 0.5d; params.scaleLineWidth = false; SVGImage image = SVGLoader.load(<my svg>, params);
centerImage
parameter specifies if the resulting SVG Node position must be centered.LoaderParameters params = new LoaderParameters(); params.centerImage = true; SVGImage image = SVGLoader.load(<my svg>, params);
applyViewportPosition
parameter specifies if the x and x coordinates of the viewPort position must be taken into account in the result.LoaderParameters params = new LoaderParameters(); params.applyViewportPosition = false; SVGImage image = SVGLoader.load(<my svg>, params);
Copyright 2021-2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD-3-Clause License