Package java.awt.image

Examples of java.awt.image.VolatileImage.contentsLost()


                            bufferComponent,w, h);
                        vImage = (java.awt.image.VolatileImage)offscreen;
                    }
                    paintDoubleBuffered(paintingComponent, vImage, g, x, y,
                                        w, h);
                    paintCompleted = !vImage.contentsLost();
                }
            }
            // VolatileImage painting loop failed, fallback to regular
            // offscreen buffer
            if (!paintCompleted && (offscreen = getValidImage(
View Full Code Here


                paintDirectly(bg, c, w, h, extendedCacheKeys);

                // close buffer graphics
                bg.dispose();
            }
        } while (buffer.contentsLost() && renderCounter++ < 3);

        // check if we failed
        if (renderCounter == 3)
            return null;
View Full Code Here

                            bufferComponent,w, h);
                        vImage = (java.awt.image.VolatileImage)offscreen;
                    }
                    paintDoubleBuffered(paintingComponent, vImage, g, x, y,
                                        w, h);
                    paintCompleted = !vImage.contentsLost();
                }
            }
            // VolatileImage painting loop failed, fallback to regular
            // offscreen buffer
            if (!paintCompleted && (offscreen = getValidImage(
View Full Code Here

        do {
            vi.validate(gc);
            Graphics2D g = vi.createGraphics();
            render(g, vi.getWidth(), vi.getHeight());
            bi = vi.getSnapshot();
        } while (vi.contentsLost());

        checkBI(bi);
        System.out.println("Test PASSED.");
    }
View Full Code Here

                    dstRect.x + bltWidth, dstRect.y + bltHeight,
                    srcRect.x, srcRect.y,
                    srcRect.x + bltWidth, srcRect.y + bltHeight,
                    Color.red,
                    null);
        } while (vi != null && vi.contentsLost());
    }


    public void test(Rectangle srcRect, Rectangle dstRect) {
        int w = getWidth();
View Full Code Here

                color = testImage(vi, true, false);
                testResult("vi_clip_notx", vi.getSnapshot(), color);

                color = testImage(vi, false, true);
                testResult("vi_noclip_tx", vi.getSnapshot(), color);
            } while (vi.contentsLost());
        }

        BufferedImage bi = new BufferedImage(64, 64, BufferedImage.TYPE_INT_RGB);
        int color = testImage(bi, false, false);
        testResult("bi_noclip_notx", bi, color);
View Full Code Here

            g2d.fillRect(0, 0, vi.getWidth(), vi.getHeight());

            render(g2d);

            res = vi.getSnapshot();
        } while (vi.contentsLost());

        for (int y = 0; y < bi.getHeight(); y++) {
            for (int x = 0; x < bi.getWidth(); x++) {
                if (res.getRGB(x, y) == Color.black.getRGB()) {
                    System.err.printf("Test FAILED: found black at %d,%d\n",
View Full Code Here

                            bufferComponent,w, h);
                        vImage = (java.awt.image.VolatileImage)offscreen;
                    }
                    paintDoubleBuffered(paintingComponent, vImage, g, x, y,
                                        w, h);
                    paintCompleted = !vImage.contentsLost();
                }
            }
            // VolatileImage painting loop failed, fallback to regular
            // offscreen buffer
            if (!paintCompleted && (offscreen = getValidImage(
View Full Code Here

        repaintManager.resetVolatileDoubleBuffer(gc);
        offscreen = repaintManager.getVolatileOffscreenBuffer(bufferComponent,clipW, clipH);
        vImage = (java.awt.image.VolatileImage)offscreen;
    }
          paintWithOffscreenBuffer(paintingComponent, g, clipX, clipY, clipW, clipH, offscreen);
          paintCompleted = !vImage.contentsLost();
      }
  }
  if (!paintCompleted) {
      // VolatileImage painting loop failed, fallback to regular offscreen buffer
      if ((offscreen =
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.