public WritableRaster copyData(WritableRaster wr) { GraphicsUtil.copyData(theTile, wr); return wr; }
public WritableRaster copyData(WritableRaster wr) { GraphicsUtil.copyData(theTile, wr); return wr; }
public WritableRaster copyData(WritableRaster wr) { GraphicsUtil.copyData(theTile, wr); return wr; }
public WritableRaster copyData(WritableRaster wr) { GraphicsUtil.copyData(theTile, wr); return wr; }
/** * Copies data from one bufferedImage to another paying attention * to the state of AlphaPreMultiplied. * * @param src The source * @param dst The destination */ public static void copyData(BufferedImage src, BufferedImage dst) { Rectangle srcRect = new Rectangle(0, 0, src.getWidth(), src.getHeight()); copyData(src, srcRect, dst, new Point(0,0)); }
/** * Copies data from one bufferedImage to another paying attention * to the state of AlphaPreMultiplied. * * @param src The source * @param dst The destination */ public static void copyData(BufferedImage src, BufferedImage dst) { Rectangle srcRect = new Rectangle(0, 0, src.getWidth(), src.getHeight()); copyData(src, srcRect, dst, new Point(0,0)); }
/** * Copies data from one bufferedImage to another paying attention * to the state of AlphaPreMultiplied. * * @param src The source * @param dst The destination */ public static void copyData(BufferedImage src, BufferedImage dst) { Rectangle srcRect = new Rectangle(0, 0, src.getWidth(), src.getHeight()); copyData(src, srcRect, dst, new Point(0,0)); }
src = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_INT_ARGB_PRE); GraphicsUtil.copyData(origSrc, src); true, null); GraphicsUtil.copyData(origSrc, src); (src.isAlphaPremultiplied() != origSrc.isAlphaPremultiplied())) { GraphicsUtil.copyData(src, origSrc); (dest.isAlphaPremultiplied() != finalDest.isAlphaPremultiplied())){ GraphicsUtil.copyData(dest, finalDest);
src = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_INT_ARGB_PRE); GraphicsUtil.copyData(origSrc, src); true, null); GraphicsUtil.copyData(origSrc, src); (src.isAlphaPremultiplied() != origSrc.isAlphaPremultiplied())) { GraphicsUtil.copyData(src, origSrc); (dest.isAlphaPremultiplied() != finalDest.isAlphaPremultiplied())){ GraphicsUtil.copyData(dest, finalDest);
src = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_INT_ARGB_PRE); GraphicsUtil.copyData(origSrc, src); true, null); GraphicsUtil.copyData(origSrc, src); (src.isAlphaPremultiplied() != origSrc.isAlphaPremultiplied())) { GraphicsUtil.copyData(src, origSrc); (dest.isAlphaPremultiplied() != finalDest.isAlphaPremultiplied())){ GraphicsUtil.copyData(dest, finalDest);
public WritableRaster copyData(WritableRaster wr) { WritableRaster wr2 = wr.createWritableTranslatedChild (wr.getMinX()-getMinX(), wr.getMinY()-getMinY()); GraphicsUtil.copyData(bi.getRaster(), wr2); /* This was the original code. This is _bad_ since it causes a * multiply and divide of the alpha channel to do the draw * operation. I believe that at some point I switched to * drawImage in order to avoid some issues with * BufferedImage's copyData implementation but I can't * reproduce them now. Anyway I'm now using GraphicsUtil which * should generally be as fast if not faster... */ /* BufferedImage dest; dest = new BufferedImage(bi.getColorModel(), wr.createWritableTranslatedChild(0,0), bi.getColorModel().isAlphaPremultiplied(), null); java.awt.Graphics2D g2d = dest.createGraphics(); g2d.drawImage(bi, null, getMinX()-wr.getMinX(), getMinY()-wr.getMinY()); g2d.dispose(); */ return wr; } }
public WritableRaster copyData(WritableRaster wr) { WritableRaster wr2 = wr.createWritableTranslatedChild (wr.getMinX()-getMinX(), wr.getMinY()-getMinY()); GraphicsUtil.copyData(bi.getRaster(), wr2); /* This was the original code. This is _bad_ since it causes a * multiply and divide of the alpha channel to do the draw * operation. I believe that at some point I switched to * drawImage in order to avoid some issues with * BufferedImage's copyData implementation but I can't * reproduce them now. Anyway I'm now using GraphicsUtil which * should generally be as fast if not faster... */ /* BufferedImage dest; dest = new BufferedImage(bi.getColorModel(), wr.createWritableTranslatedChild(0,0), bi.getColorModel().isAlphaPremultiplied(), null); java.awt.Graphics2D g2d = dest.createGraphics(); g2d.drawImage(bi, null, getMinX()-wr.getMinX(), getMinY()-wr.getMinY()); g2d.dispose(); */ return wr; } }
public WritableRaster copyData(WritableRaster wr) { ColorModel cm = getColorModel(); CachableRed cr = getSource(); ColorModel srcCM = cr.getColorModel(); SampleModel srcSM = cr.getSampleModel(); srcSM = srcSM.createCompatibleSampleModel(wr.getWidth(), wr.getHeight()); WritableRaster srcWR; srcWR = Raster.createWritableRaster(srcSM, new Point(wr.getMinX(), wr.getMinY())); getSource().copyData(srcWR); BufferedImage srcBI = new BufferedImage (srcCM, srcWR.createWritableTranslatedChild(0,0), srcCM.isAlphaPremultiplied(), null); BufferedImage dstBI = new BufferedImage (cm, wr.createWritableTranslatedChild(0,0), cm.isAlphaPremultiplied(), null); GraphicsUtil.copyData(srcBI, dstBI); return wr; }
public WritableRaster copyData(WritableRaster wr) { WritableRaster wr2 = wr.createWritableTranslatedChild (wr.getMinX()-getMinX(), wr.getMinY()-getMinY()); GraphicsUtil.copyData(bi.getRaster(), wr2); /* This was the original code. This is _bad_ since it causes a * multiply and divide of the alpha channel to do the draw * operation. I believe that at some point I switched to * drawImage in order to avoid some issues with * BufferedImage's copyData implementation but I can't * reproduce them now. Anyway I'm now using GraphicsUtil which * should generally be as fast if not faster... */ /* BufferedImage dest; dest = new BufferedImage(bi.getColorModel(), wr.createWritableTranslatedChild(0,0), bi.getColorModel().isAlphaPremultiplied(), null); java.awt.Graphics2D g2d = dest.createGraphics(); g2d.drawImage(bi, null, getMinX()-wr.getMinX(), getMinY()-wr.getMinY()); g2d.dispose(); */ return wr; } }
public WritableRaster copyData(WritableRaster wr) { ColorModel cm = getColorModel(); CachableRed cr = getSource(); ColorModel srcCM = cr.getColorModel(); SampleModel srcSM = cr.getSampleModel(); srcSM = srcSM.createCompatibleSampleModel(wr.getWidth(), wr.getHeight()); WritableRaster srcWR; srcWR = Raster.createWritableRaster(srcSM, new Point(wr.getMinX(), wr.getMinY())); getSource().copyData(srcWR); BufferedImage srcBI = new BufferedImage (srcCM, srcWR.createWritableTranslatedChild(0,0), srcCM.isAlphaPremultiplied(), null); BufferedImage dstBI = new BufferedImage (cm, wr.createWritableTranslatedChild(0,0), cm.isAlphaPremultiplied(), null); GraphicsUtil.copyData(srcBI, dstBI); return wr; }
public WritableRaster copyData(WritableRaster wr) { ColorModel cm = getColorModel(); CachableRed cr = getSource(); ColorModel srcCM = cr.getColorModel(); SampleModel srcSM = cr.getSampleModel(); srcSM = srcSM.createCompatibleSampleModel(wr.getWidth(), wr.getHeight()); WritableRaster srcWR; srcWR = Raster.createWritableRaster(srcSM, new Point(wr.getMinX(), wr.getMinY())); getSource().copyData(srcWR); BufferedImage srcBI = new BufferedImage (srcCM, srcWR.createWritableTranslatedChild(0,0), srcCM.isAlphaPremultiplied(), null); BufferedImage dstBI = new BufferedImage (cm, wr.createWritableTranslatedChild(0,0), cm.isAlphaPremultiplied(), null); GraphicsUtil.copyData(srcBI, dstBI); return wr; }
GraphicsUtil.copyData(bi, indexed); return indexed;
GraphicsUtil.copyData(tmpR2, wr);
GraphicsUtil.copyData(tmpR2, wr);
GraphicsUtil.copyData(tmpR2, wr);