/** * Copies data from one raster to another. Only the region of * overlap between src and dst is copied. <code>Src</code> and * <code>Dst</code> must have compatible SampleModels. * * @param src The source of the data * @param dst The destination for the data. */ public static void copyData(Raster src, WritableRaster dst) { if (is_INT_PACK_Data(src.getSampleModel(), false) && is_INT_PACK_Data(dst.getSampleModel(), false)) { copyData_INT_PACK(src, dst); return; } copyData_FALLBACK(src, dst); }
/** * Copies data from one raster to another. Only the region of * overlap between src and dst is copied. <code>Src</code> and * <code>Dst</code> must have compatible SampleModels. * * @param src The source of the data * @param dst The destination for the data. */ public static void copyData(Raster src, WritableRaster dst) { if (is_INT_PACK_Data(src.getSampleModel(), false) && is_INT_PACK_Data(dst.getSampleModel(), false)) { copyData_INT_PACK(src, dst); return; } copyData_FALLBACK(src, dst); }
/** * Copies data from one raster to another. Only the region of * overlap between src and dst is copied. <code>Src</code> and * <code>Dst</code> must have compatible SampleModels. * * @param src The source of the data * @param dst The destination for the data. */ public static void copyData(Raster src, WritableRaster dst) { if (is_INT_PACK_Data(src.getSampleModel(), false) && is_INT_PACK_Data(dst.getSampleModel(), false)) { copyData_INT_PACK(src, dst); return; } copyData_FALLBACK(src, dst); }
public WritableRaster copyData(WritableRaster wr) { int xOff = ((int)Math.floor(wr.getMinX()/xStep))*xStep; int yOff = ((int)Math.floor(wr.getMinY()/yStep))*yStep; int x0 = wr.getMinX()-xOff; int y0 = wr.getMinY()-yOff; int tx0 = getXTile(x0); int ty0 = getYTile(y0); int tx1 = getXTile(x0+wr.getWidth() -1); int ty1 = getYTile(y0+wr.getHeight()-1); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); r = r.createChild(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight(), r.getMinX()+xOff, r.getMinY()+yOff, null); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } return wr; }
public WritableRaster copyData(WritableRaster wr) { int xOff = ((int)Math.floor(wr.getMinX()/xStep))*xStep; int yOff = ((int)Math.floor(wr.getMinY()/yStep))*yStep; int x0 = wr.getMinX()-xOff; int y0 = wr.getMinY()-yOff; int tx0 = getXTile(x0); int ty0 = getYTile(y0); int tx1 = getXTile(x0+wr.getWidth() -1); int ty1 = getYTile(y0+wr.getHeight()-1); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); r = r.createChild(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight(), r.getMinX()+xOff, r.getMinY()+yOff, null); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } return wr; }
public WritableRaster copyData(WritableRaster wr) { int xOff = ((int)Math.floor(wr.getMinX()/xStep))*xStep; int yOff = ((int)Math.floor(wr.getMinY()/yStep))*yStep; int x0 = wr.getMinX()-xOff; int y0 = wr.getMinY()-yOff; int tx0 = getXTile(x0); int ty0 = getYTile(y0); int tx1 = getXTile(x0+wr.getWidth() -1); int ty1 = getYTile(y0+wr.getHeight()-1); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); r = r.createChild(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight(), r.getMinX()+xOff, r.getMinY()+yOff, null); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } return wr; }
GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr);
GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr);
GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr);
GraphicsUtil.copyData_INT_PACK(ras, wr); else GraphicsUtil.copyData_FALLBACK(ras, wr); GraphicsUtil.copyData_INT_PACK(wr, tile); else GraphicsUtil.copyData_FALLBACK(wr, tile); GraphicsUtil.copyData_INT_PACK(ras, wr); else GraphicsUtil.copyData_FALLBACK(ras, wr);
GraphicsUtil.copyData_INT_PACK(ras, wr); else GraphicsUtil.copyData_FALLBACK(ras, wr); GraphicsUtil.copyData_INT_PACK(wr, tile); else GraphicsUtil.copyData_FALLBACK(wr, tile); GraphicsUtil.copyData_INT_PACK(ras, wr); else GraphicsUtil.copyData_FALLBACK(ras, wr);
genRect( child ); if ( use_INT_PACK ) { GraphicsUtil.copyData_INT_PACK( child, wr ); } else { GraphicsUtil.copyData_FALLBACK( child, wr );
genRect(child); if (use_INT_PACK) { GraphicsUtil.copyData_INT_PACK(child, wr); } else { GraphicsUtil.copyData_FALLBACK(child, wr);
genRect(child); if (use_INT_PACK) { GraphicsUtil.copyData_INT_PACK(child, wr); } else { GraphicsUtil.copyData_FALLBACK(child, wr);
public WritableRaster copyData(WritableRaster wr) { int tx0 = getXTile(wr.getMinX()); int ty0 = getYTile(wr.getMinY()); int tx1 = getXTile(wr.getMinX()+wr.getWidth() -1); int ty1 = getYTile(wr.getMinY()+wr.getHeight()-1); final boolean is_INT_PACK = GraphicsUtil.is_INT_PACK_Data(getSampleModel(), false); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } return wr; } }
public WritableRaster copyData(WritableRaster wr) { int tx0 = getXTile(wr.getMinX()); int ty0 = getYTile(wr.getMinY()); int tx1 = getXTile(wr.getMinX()+wr.getWidth() -1); int ty1 = getYTile(wr.getMinY()+wr.getHeight()-1); final boolean is_INT_PACK = GraphicsUtil.is_INT_PACK_Data(getSampleModel(), false); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } return wr; } }
public WritableRaster copyData(WritableRaster wr) { int tx0 = getXTile(wr.getMinX()); int ty0 = getYTile(wr.getMinY()); int tx1 = getXTile(wr.getMinX()+wr.getWidth() -1); int ty1 = getYTile(wr.getMinY()+wr.getHeight()-1); final boolean is_INT_PACK = GraphicsUtil.is_INT_PACK_Data(getSampleModel(), false); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } return wr; } }
/** * Copies data from this images tile grid into wr. wr may * extend outside the bounds of this image in which case the * data in wr outside the bounds will not be touched. * @param wr Raster to fill with image data. */ public void copyToRaster(WritableRaster wr) { int tx0 = getXTile(wr.getMinX()); int ty0 = getYTile(wr.getMinY()); int tx1 = getXTile(wr.getMinX()+wr.getWidth() -1); int ty1 = getYTile(wr.getMinY()+wr.getHeight()-1); if (tx0 < minTileX) tx0 = minTileX; if (ty0 < minTileY) ty0 = minTileY; if (tx1 >= minTileX+numXTiles) tx1 = minTileX+numXTiles-1; if (ty1 >= minTileY+numYTiles) ty1 = minTileY+numYTiles-1; final boolean is_INT_PACK = GraphicsUtil.is_INT_PACK_Data(getSampleModel(), false); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } }
/** * Copies data from this images tile grid into wr. wr may * extend outside the bounds of this image in which case the * data in wr outside the bounds will not be touched. * @param wr Raster to fill with image data. */ public void copyToRaster(WritableRaster wr) { int tx0 = getXTile(wr.getMinX()); int ty0 = getYTile(wr.getMinY()); int tx1 = getXTile(wr.getMinX()+wr.getWidth() -1); int ty1 = getYTile(wr.getMinY()+wr.getHeight()-1); if (tx0 < minTileX) tx0 = minTileX; if (ty0 < minTileY) ty0 = minTileY; if (tx1 >= minTileX+numXTiles) tx1 = minTileX+numXTiles-1; if (ty1 >= minTileY+numYTiles) ty1 = minTileY+numYTiles-1; final boolean is_INT_PACK = GraphicsUtil.is_INT_PACK_Data(getSampleModel(), false); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } }
/** * Copies data from this images tile grid into wr. wr may * extend outside the bounds of this image in which case the * data in wr outside the bounds will not be touched. * @param wr Raster to fill with image data. */ public void copyToRaster(WritableRaster wr) { int tx0 = getXTile(wr.getMinX()); int ty0 = getYTile(wr.getMinY()); int tx1 = getXTile(wr.getMinX()+wr.getWidth() -1); int ty1 = getYTile(wr.getMinY()+wr.getHeight()-1); if (tx0 < minTileX) tx0 = minTileX; if (ty0 < minTileY) ty0 = minTileY; if (tx1 >= minTileX+numXTiles) tx1 = minTileX+numXTiles-1; if (ty1 >= minTileY+numYTiles) ty1 = minTileY+numYTiles-1; final boolean is_INT_PACK = GraphicsUtil.is_INT_PACK_Data(getSampleModel(), false); for (int y=ty0; y<=ty1; y++) for (int x=tx0; x<=tx1; x++) { Raster r = getTile(x, y); if (is_INT_PACK) GraphicsUtil.copyData_INT_PACK(r, wr); else GraphicsUtil.copyData_FALLBACK(r, wr); } }