Package java.awt.image

Examples of java.awt.image.Raster.createTranslatedChild()


        Raster tile = getSource(0).getTile(tileX, tileY);

  if (tile == null)
      return null;

  return tile.createTranslatedChild(tileXToX(tileX), tileYToY(tileY));
    }

    /**
     * Returns a conservative estimate of the destination region that
     * can potentially be affected by the pixels of a rectangle of a
View Full Code Here


                int tx = x + relx;
                int tw = Math.min(w-relx, TILE_SIZE);

                Raster srcRaster = paintCtxt.getRaster(tx, ty, tw, th);
                if ((srcRaster.getMinX() != 0) || (srcRaster.getMinY() != 0)) {
                    srcRaster = srcRaster.createTranslatedChild(0, 0);
                }
                if (lastRas != srcRaster) {
                    lastRas = srcRaster;
                    context.lastRaster = new WeakReference(lastRas);
                    // REMIND: This will fail for a non-Writable raster!
View Full Code Here

/*      */     {
/*  172 */       String message = JaiI18N.getString("TIFFImage13");
/*  173 */       ImagingListenerProxy.errorOccurred(message, new ImagingException(message, ioe), TIFFImage.class, false);
/*      */     }
/*      */
/*  180 */     return jpegRaster.createTranslatedChild(minX, minY);
/*      */   }
/*      */
/*      */   private final void inflate(byte[] deflated, byte[] inflated)
/*      */   {
/*  188 */     this.inflater.setInput(deflated);
View Full Code Here

/* 140 */     Raster tile = getSource(0).getTile(tileX, tileY);
/*     */
/* 142 */     if (tile == null) {
/* 143 */       return null;
/*     */     }
/* 145 */     return tile.createTranslatedChild(tileXToX(tileX), tileYToY(tileY));
/*     */   }
/*     */
/*     */   public Rectangle mapSourceRect(Rectangle sourceRect, int sourceIndex)
/*     */   {
/* 164 */     if (sourceRect == null) {
View Full Code Here

    }

    public Raster getTile(int tileX, int tileY) {
        Raster r = getSource().getTile(tileX, tileY);

        return r.createTranslatedChild(r.getMinX()+deltaX,
                                       r.getMinY()+deltaY);
    }

    public Raster getData() {
        Raster r = getSource().getData();
View Full Code Here

                                       r.getMinY()+deltaY);
    }

    public Raster getData() {
        Raster r = getSource().getData();
        return r.createTranslatedChild(r.getMinX()+deltaX,
                                       r.getMinY()+deltaY);
    }

    public Raster getData(Rectangle rect) {
        Rectangle r = (Rectangle)rect.clone();
View Full Code Here

    public Raster getData(Rectangle rect) {
        Rectangle r = (Rectangle)rect.clone();
        r.translate(-deltaX, -deltaY);
        Raster ret = getSource().getData(r);
        return ret.createTranslatedChild(ret.getMinX()+deltaX,
                                         ret.getMinY()+deltaY);
    }

    public WritableRaster copyData(WritableRaster wr) {
        WritableRaster wr2 = wr.createWritableTranslatedChild
View Full Code Here

                            BufferedImage bi =
                                new BufferedImage(colorModel, wRas,
                                                  false, null);
                            jpegEncoder.encode(bi);
                        } else {
                            jpegEncoder.encode(src.createTranslatedChild(0,
                                                                         0));
                        }

                        long endPos = getOffset(output);
                        tileByteCounts[tileNum++] = (int)(endPos - startPos);
View Full Code Here

        } catch (IOException ioe) {
            throw new RuntimeException("TIFFImage13");
        }

        // Translate the decoded Raster to the specified location and return.
        return jpegRaster.createTranslatedChild(minX, minY);
    }

    /**
     * Inflates <code>deflated</code> into <code>inflated</code> using the
     * <code>Inflater</code> constructed during class instantiation.
View Full Code Here

        return bi.getTile(tileX,tileY);
    }

    public Raster getData() {
        Raster r = bi.getData();
        return r.createTranslatedChild(getMinX(), getMinY());
    }

    public Raster getData(Rectangle rect) {
        Rectangle r = (Rectangle)rect.clone();
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.