private void draw(final ExecutionUnit process,final Graphics2D g2,final ProcessRendererModel rendererModel,final boolean printing){
  ProcessBackgroundImage image=rendererModel.getBackgroundImage(process);
  if (image != null) {
    Graphics2D g2D=(Graphics2D)g2.create();
    int x=image.getX();
    int y=image.getY();
    int w=image.getWidth();
    int h=image.getHeight();
    if (x == -1) {
      double processWidth=rendererModel.getProcessWidth(process);
      x=(int)((processWidth - w) / 2);
    }
    if (y == -1) {
      double processHeight=rendererModel.getProcessHeight(process);
      y=(int)((processHeight - h) / 2);
    }
    if (rendererModel.getZoomFactor() > 1.0) {
      float alpha=Math.max(MIN_OPACITY,2.0f - (float)rendererModel.getZoomFactor());
      AlphaComposite ac=AlphaComposite.getInstance(AlphaComposite.SRC_OVER,alpha);
      g2D.setComposite(ac);
    }
    g2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2D.drawImage(image.getImage(loadListener),x,y,w,h,null);
    g2D.dispose();
  }
}

private void draw ( final ExecutionUnit process , final Graphics2D g2 , final ProcessRendererModel rendererModel , final boolean printing ) { ProcessBackgroundImage image = rendererModel . getBackgroundImage ( process ) ; if ( image != null ) { Graphics2D g2D = ( Graphics2D ) g2 . create ( ) ; int x = image . getX ( ) ; int y = image . getY ( ) ; int w = image . getWidth ( ) ; int h = image . getHeight ( ) ; if ( x == - 1 ) { double processWidth = rendererModel . getProcessWidth ( process ) ; x = ( int ) ( ( processWidth - w ) / 2 ) ; } if ( y == - 1 ) { double processHeight = rendererModel . getProcessHeight ( process ) ; y = ( int ) ( ( processHeight - h ) / 2 ) ; } if ( rendererModel . getZoomFactor ( ) > 1.0 ) { float alpha = Math . max ( MIN_OPACITY , 2.0f - ( float ) rendererModel . getZoomFactor ( ) ) ; AlphaComposite ac = AlphaComposite . getInstance ( AlphaComposite . SRC_OVER , alpha ) ; g2D . setComposite ( ac ) ; } g2D . setRenderingHint ( RenderingHints . KEY_INTERPOLATION , RenderingHints . VALUE_INTERPOLATION_BILINEAR ) ; g2D . drawImage ( image . getImage ( loadListener ) , x , y , w , h , null ) ; g2D . dispose ( ) ; } }
draws the background annotations .
