@Override
	public void paintIcon( Component c, Graphics g, int x, int y ) {
		Graphics2D g2 = (Graphics2D) g.create();
		try {
			FlatUIUtils.setRenderingHints( g2 );

			// for testing
//			g2.setColor( Color.blue );
//			g2.drawRect( x, y, getIconWidth() - 1, getIconHeight() - 1 );

			paintBackground( c, g2, x, y );

			g2.translate( x, y );
			UIScale.scaleGraphics( g2 );

			if( color != null )
				g2.setColor( color );

			paintIcon( c, g2 );
		} finally {
			g2.dispose();
		}
	}
Base class for icons that scales width and height, creates and initializes
a scaled graphics context for icon painting.

Subclasses do not need to scale icon painting.

@author Karl Tauber
flatlaf-core/src/main/java/com/formdev/flatlaf/icons/FlatAbstractIcon.java