invertedXform);
invertedXform, bgcolor);
  public boolean drawImage(Image img,                            AffineTransform xform,                           ImageObserver obs)  {    if (img instanceof GtkOffScreenImage &&        img.getGraphics () instanceof GdkGraphics2D &&                    (xform == null          || xform.getType () == AffineTransform.TYPE_IDENTITY          || xform.getType () == AffineTransform.TYPE_TRANSLATION)        )       {        // we are being asked to flush a double buffer from Gdk        GdkGraphics2D g2 = (GdkGraphics2D) img.getGraphics ();        gdkDrawDrawable (g2, (int)xform.getTranslateX(), (int)xform.getTranslateY());                if (isBufferedImageGraphics ())           updateBufferedImage();   	         return true;      }    else      {              // In this case, xform is an AffineTransform that transforms bounding        // box of the specified image from image space to user space. However        // when we pass this transform to cairo, cairo will use this transform        // to map "user coordinates" to "pixel" coordinates, which is the         // other way around. Therefore to get the "user -> pixel" transform         // that cairo wants from "image -> user" transform that we currently        // have, we will need to invert the transformation matrix.	        AffineTransform invertedXform = new AffineTransform();        try          {             	      invertedXform = xform.createInverse();             if (img instanceof BufferedImage)               {                   // draw an image which has actually been loaded                    // into memory fully                   BufferedImage b = (BufferedImage) img;                   return drawRaster (b.getColorModel (),                                       b.getData (),                                       invertedXform);               }             else               {                   // begin progressive loading in a separate thread                   new PainterThread (this, img, invertedXform);                   return false;               }	                 }        catch (NoninvertibleTransformException e)          {              throw new ImagingOpException("Unable to invert transform "                                            + xform.toString());          } 	            }  }