Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

de.codecentric.centerdevice:javafxsvg

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

de.codecentric.centerdevice:javafxsvg

JavaFxSVG is a simple library adding SVG support to JavaFX and thus allowing to use SVG graphics just like any other image type.

  • 1.3.0
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

JavaFxSVG

Codacy Badge

A simple library to add SVG support to JavaFX, allowing to use SVG graphics just like any other image type.

More details about the project can be found at the codecentric blog: Adding a custom image renderer to JavaFX 8

Installation

If you are using maven, just add JavaFxSVG to the dependencies

<dependency>
	<groupId>de.codecentric.centerdevice</groupId>
	<artifactId>javafxsvg</artifactId>
	<version>1.3.0</version>
</dependency>

Usage

Add this line to your application:

SvgImageLoaderFactory.install();

preferably before any JavaFX code is executed. After this, you can use SVG images just as any other Image in your application.

If the JavaFX container does not specify any width or height, the image is rendered with default dimensions (currently 400x400). To changes this behavior, a DimensionProvider can be passed with the install command:

SvgImageLoaderFactory.install(new PrimitiveDimensionProvider());

will try to determine the actual size of the SVG (as specified by width and height attributes) and use this as a fallback size.

Known Issues

Currently, SVGs are required to start with either "<svg" or "<?xml" due to some rather static signature matching. As a result, svg might not be displayed when starting with whitespace characters or comment.

FAQs

Package last updated on 26 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc