code: public void setPaint(Paint paint) {
          if (paint == null)
              return;
          this.paint = paint;
  		realPaint = paint;
  
  		if ((composite instanceof AlphaComposite) && (paint instanceof Color)) {
  			
  			AlphaComposite co = (AlphaComposite) composite;
  			
  			if (co.getRule() == 3) {
  				Color c = (Color) paint;
  				this.paint = new Color(c.getRed(), c.getGreen(), c.getBlue(), (int) (c.getAlpha() * alpha));
  				realPaint = paint;
  			}
  		}
  
      }
docs: Method contributed by Alexej Suchov
  @see Graphics2D#setPaint(Paint)