001: /*
002: * $RCSfile: WrapperRI.java,v $
003: *
004: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
005: *
006: * Use is subject to license terms.
007: *
008: * $Revision: 1.1 $
009: * $Date: 2005/02/11 04:55:44 $
010: * $State: Exp $
011: */
012: package com.sun.media.jai.iterator;
013:
014: import java.awt.Rectangle;
015: import java.awt.image.ColorModel;
016: import java.awt.image.Raster;
017: import java.awt.image.RenderedImage;
018: import java.awt.image.SampleModel;
019: import java.awt.image.WritableRaster;
020: import java.util.Vector;
021:
022: /**
023: * @since EA2
024: */
025: public class WrapperRI implements RenderedImage {
026:
027: Raster ras;
028:
029: public WrapperRI(Raster ras) {
030: this .ras = ras;
031: }
032:
033: public Vector getSources() {
034: return null;
035: }
036:
037: public Object getProperty(String name) {
038: return null;
039: }
040:
041: public String[] getPropertyNames() {
042: return null;
043: }
044:
045: public ColorModel getColorModel() {
046: return null;
047: }
048:
049: public SampleModel getSampleModel() {
050: return ras.getSampleModel();
051: }
052:
053: public int getWidth() {
054: return ras.getWidth();
055: }
056:
057: public int getHeight() {
058: return ras.getHeight();
059: }
060:
061: public int getMinX() {
062: return ras.getMinX();
063: }
064:
065: public int getMinY() {
066: return ras.getMinY();
067: }
068:
069: public int getNumXTiles() {
070: return 1;
071: }
072:
073: public int getNumYTiles() {
074: return 1;
075: }
076:
077: public int getMinTileX() {
078: return 0;
079: }
080:
081: public int getMinTileY() {
082: return 0;
083: }
084:
085: public int getTileWidth() {
086: return ras.getWidth();
087: }
088:
089: public int getTileHeight() {
090: return ras.getHeight();
091: }
092:
093: public int getTileGridXOffset() {
094: return ras.getMinX();
095: }
096:
097: public int getTileGridYOffset() {
098: return ras.getMinY();
099: }
100:
101: public Raster getTile(int tileX, int tileY) {
102: return ras;
103: }
104:
105: public Raster getData() {
106: throw new RuntimeException(JaiI18N.getString("WrapperRI0"));
107: }
108:
109: public Raster getData(Rectangle rect) {
110: throw new RuntimeException(JaiI18N.getString("WrapperRI0"));
111: }
112:
113: public WritableRaster copyData(WritableRaster raster) {
114: throw new RuntimeException(JaiI18N.getString("WrapperRI0"));
115: }
116: }
|