private void paintSvg( Graphics2D g, int x, int y ) {
		if( document == null ) {
			paintSvgError( g, x, y );
			return;
		}

		g.translate( x, y );
		g.clipRect( 0, 0, getIconWidth(), getIconHeight() );

		UIScale.scaleGraphics( g );
		if( width > 0 || height > 0 ) {
			Dimension2D svgSize = document.size();
			double sx = (width > 0) ? width / svgSize.getWidth() : 1;
			double sy = (height > 0) ? height / svgSize.getHeight() : 1;
			if( sx != 1 || sy != 1 )
				g.scale( sx, sy );
		}
		if( scale != 1 )
			g.scale( scale, scale );

		try {
			document.render( null, g );
		} catch( Exception ex ) {
			paintSvgError( g, 0, 0 );
		}
	}
Returns the scaled height of the icon.
flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatSVGIcon.java