private void paintBgHighlight(Graphics2D g2d, double scale, double max, double ix, double iy,
			double iw, double ih) {

		// range from 0 to max (e.g., 0 to .3); highlight will fade in from full alpha
		double range = max - 1;
		double current = scale - 1;
		double alpha = current;

		Composite originalComposite = g2d.getComposite();
		try {
			AlphaComposite alphaComposite = AlphaComposite.getInstance(
				AlphaComposite.SrcOver.getRule(), (float) alpha);

			g2d.setComposite(alphaComposite);
			g2d.setColor(Colors.FOREGROUND);

			// highlight size is a range from 0 to max, where max is currently .3; grow the 
			// highlight shape as the animation progresses 
			double percent = current / range;
			double bgpadding = 1;
			double fullbgw = iw;
			double fullbgh = ih;
			double bgw = (fullbgw + bgpadding) * percent;
			double bgh = (fullbgh + bgpadding) * percent;

			// center using the delta between the icon size and the current highlight size
			double halfpadding = (bgpadding / 2);
			double bgwd = (iw + bgpadding) - bgw;
			double bghd = (ih + bgpadding) - bgh;
			double halfw = bgwd / 2;
			double halfh = bghd / 2;
			double bgx = (ix - halfpadding) + halfw;
			double bgy = (iy - halfpadding) + halfh;

			g2d.fillRoundRect((int) bgx, (int) bgy, (int) bgw, (int) bgh, 6, 6);
		}
		finally {
			g2d.setComposite(originalComposite);
		}
	}
Paints a background highlight under the icon that will get painted.
@param g2d the graphics
@param scale the current scale, up to max 
@param max the max emphasis size
@param ix the icon x
@param iy the icon y
@param iw the icon width
@param ih the icon height
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GTableHeaderRenderer.java