示例#1
0
 public boolean scaleImage(
     SunGraphics2D sg,
     Image img,
     int dx1,
     int dy1,
     int dx2,
     int dy2,
     int sx1,
     int sy1,
     int sx2,
     int sy2,
     Color bgColor,
     ImageObserver observer) {
   if (!(img instanceof ToolkitImage)) {
     return scaleImage(sg, img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgColor);
   } else {
     ToolkitImage sunimg = (ToolkitImage) img;
     if (!imageReady(sunimg, observer)) {
       return false;
     }
     ImageRepresentation ir = sunimg.getImageRep();
     return ir.drawToBufImage(
         sg, sunimg, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgColor, observer);
   }
 }
 /*     */ public void flush() /*     */ {
   /* 276 */ if (this.src != null) /* 277 */ this.src.checkSecurity(null, false);
   /*     */ ImageRepresentation localImageRepresentation;
   /* 281 */ synchronized (this) {
     /* 282 */ this.availinfo &= -65;
     /* 283 */ localImageRepresentation = this.imagerep;
     /* 284 */ this.imagerep = null;
     /*     */ }
   /* 286 */ if (localImageRepresentation != null) {
     /* 287 */ localImageRepresentation.abort();
     /*     */ }
   /* 289 */ if (this.src != null) /* 290 */ this.src.flush();
   /*     */ }
示例#3
0
 public boolean copyImage(
     SunGraphics2D sg, Image img, int x, int y, Color bgColor, ImageObserver observer) {
   if (!(img instanceof ToolkitImage)) {
     return copyImage(sg, img, x, y, bgColor);
   } else {
     ToolkitImage sunimg = (ToolkitImage) img;
     if (!imageReady(sunimg, observer)) {
       return false;
     }
     ImageRepresentation ir = sunimg.getImageRep();
     return ir.drawToBufImage(sg, sunimg, x, y, bgColor, observer);
   }
 }
示例#4
0
 public boolean transformImage(
     SunGraphics2D sg, Image img, AffineTransform atfm, ImageObserver observer) {
   if (!(img instanceof ToolkitImage)) {
     transformImage(sg, img, 0, 0, atfm, sg.interpolationType);
     return true;
   } else {
     ToolkitImage sunimg = (ToolkitImage) img;
     if (!imageReady(sunimg, observer)) {
       return false;
     }
     ImageRepresentation ir = sunimg.getImageRep();
     return ir.drawToBufImage(sg, sunimg, atfm, observer);
   }
 }
 /*     */ private synchronized void addWatcher(
     ImageObserver paramImageObserver, boolean paramBoolean)
       /*     */ {
   /* 211 */ if ((this.availinfo & 0x40) != 0) {
     /* 212 */ if (paramImageObserver != null) {
       /* 213 */ paramImageObserver.imageUpdate(this, 192, -1, -1, -1, -1);
       /*     */ }
     /*     */
     /* 216 */ return;
     /*     */ }
   /* 218 */ ImageRepresentation localImageRepresentation = getImageRep();
   /* 219 */ localImageRepresentation.addWatcher(paramImageObserver);
   /* 220 */ if (paramBoolean) /* 221 */ localImageRepresentation.startProduction();
   /*     */ }
 /*     */ private synchronized void reconstruct(int paramInt) /*     */ {
   /* 226 */ if ((paramInt & (this.availinfo ^ 0xFFFFFFFF)) != 0) {
     /* 227 */ if ((this.availinfo & 0x40) != 0) {
       /* 228 */ return;
       /*     */ }
     /* 230 */ ImageRepresentation localImageRepresentation = getImageRep();
     /* 231 */ localImageRepresentation.startProduction();
     /* 232 */ while ((paramInt & (this.availinfo ^ 0xFFFFFFFF)) != 0) {
       /*     */ try {
         /* 234 */ wait();
         /*     */ } catch (InterruptedException localInterruptedException) {
         /* 236 */ Thread.currentThread().interrupt();
         /* 237 */ return;
         /*     */ }
       /* 239 */ if ((this.availinfo & 0x40) != 0) ;
       /*     */ }
     /*     */ }
   /*     */ }
示例#7
0
 public boolean copyImage(
     SunGraphics2D sg,
     Image img,
     int dx,
     int dy,
     int sx,
     int sy,
     int w,
     int h,
     Color bgColor,
     ImageObserver observer) {
   if (!(img instanceof ToolkitImage)) {
     return copyImage(sg, img, dx, dy, sx, sy, w, h, bgColor);
   } else {
     ToolkitImage sunimg = (ToolkitImage) img;
     if (!imageReady(sunimg, observer)) {
       return false;
     }
     ImageRepresentation ir = sunimg.getImageRep();
     return ir.drawToBufImage(
         sg, sunimg, dx, dy, (dx + w), (dy + h), sx, sy, (sx + w), (sy + h), bgColor, observer);
   }
 }
 /*     */ public void setAccelerationPriority(float paramFloat) {
   /* 327 */ super.setAccelerationPriority(paramFloat);
   /* 328 */ ImageRepresentation localImageRepresentation = getImageRep();
   /* 329 */ localImageRepresentation.setAccelerationPriority(this.accelerationPriority);
   /*     */ }
 /*     */ public BufferedImage getBufferedImage() /*     */ {
   /* 322 */ ImageRepresentation localImageRepresentation = getImageRep();
   /* 323 */ return localImageRepresentation.getBufferedImage();
   /*     */ }
 /*     */ public ColorModel getColorModel() /*     */ {
   /* 316 */ ImageRepresentation localImageRepresentation = getImageRep();
   /* 317 */ return localImageRepresentation.getColorModel();
   /*     */ }