Esempio n. 1
0
 public void drawImage(Image img, float alpha, double[] _xyzSW, double[] _xyzSE, double[] _xyzNW) {
   Composite cs = comp2D.getComposite();
   comp2D.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha));
   AffineTransform t =
       getAffineTransform(img.getWidth(canvas), img.getHeight(canvas), _xyzSW, _xyzSE, _xyzNW);
   if (t != null) {
     comp2D.drawImage(img, t, canvas);
   }
   comp2D.setComposite(cs);
 }
 /**
  * calls drawImage(Image,int,int,int,int,Color,ImageObserver)
  *
  * @see #drawImage(Image,int,int,int,int,Color,ImageObserver)
  */
 public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) {
   return drawImage(img, x, y, img.getWidth(observer), img.getHeight(observer), bgcolor, observer);
 }