home *** CD-ROM | disk | FTP | other *** search
- package sun.awt.image;
-
- import java.awt.image.ColorModel;
- import java.awt.image.ImageConsumer;
-
- public class PixelStore8 extends PixelStore {
- public PixelStore8() {
- }
-
- public PixelStore8(int w, int h) {
- super(w, h);
- }
-
- public PixelStore8(int w, int h, ColorModel cm) {
- this.setDimensions(w, h);
- ((PixelStore)this).setColorModel(cm);
- }
-
- public void setDimensions(int w, int h) {
- super.setDimensions(w, h);
- }
-
- Object allocateLines(int num) {
- return num * super.width > 1000000 ? null : new byte[num * super.width];
- }
-
- void replayLines(ImageConsumer ic, int i, int cnt, Object line) {
- ic.setPixels(0, i, super.width, cnt, super.colormodel, (byte[])line, super.offsets[i], super.width);
- }
- }
-