Group class. As a Group has no size by itself, it can not be integrated efficiently in a Layout containers (such as a BorderPane)[1]
Group is not directly resizableSVGImage in a Layout container, you can use the SVGImage.createRegion() which will create a SVGImageRegion wrapping the SVGImage. SVGImageRegion is a Region, it can be resized and be fully integrated in a Layout container.
SVGImageRegion is the SVGImageRegion.setConform(boolean) which allow to force the result of the resize to always keep the SVH Image conform (by default the conformity of the result will not be enforced).
SVGImage in a BorderPane. The SVGImage will shrink or expand when the stage is resized:SVGImage svgImg = SVGLoader.load(<my SVG file>); SVGImageRegion region = svgImg.createRegion(); BorderPane borderPane = new BorderPane(); borderPane.setCenter(region); stage.setScene(new Scene(borderPane, 300, 250)); stage.show();
Group is not directly resizableCopyright 2021-2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD-3-Clause License