home *** CD-ROM | disk | FTP | other *** search
- import java.awt.image.ColorModel;
- import java.awt.image.ImageConsumer;
- import java.awt.image.ImageProducer;
-
- class animatedMemoryImageSource implements ImageProducer {
- int width;
- int height;
- // $FF: renamed from: cm java.awt.image.ColorModel
- ColorModel field_0;
- byte[] pixels;
- // $FF: renamed from: ic java.awt.image.ImageConsumer
- ImageConsumer field_1;
-
- animatedMemoryImageSource(int var1, int var2, ColorModel var3, byte[] var4) {
- this.width = var1;
- this.height = var2;
- this.field_0 = var3;
- this.pixels = var4;
- }
-
- public void addConsumer(ImageConsumer var1) {
- if (this.field_1 != var1) {
- if (this.field_1 != null) {
- this.field_1.imageComplete(1);
- }
-
- this.field_1 = var1;
- this.field_1.setDimensions(this.width, this.height);
- this.field_1.setColorModel(this.field_0);
- this.field_1.setHints(1);
- this.field_1.setPixels(0, 0, this.width, this.height, this.field_0, this.pixels, 0, this.width);
- this.field_1.imageComplete(2);
- }
- }
-
- public boolean isConsumer(ImageConsumer var1) {
- return this.field_1 == var1;
- }
-
- public void removeConsumer(ImageConsumer var1) {
- if (this.field_1 == var1) {
- this.field_1 = null;
- }
-
- }
-
- public void requestTopDownLeftRightResend(ImageConsumer var1) {
- }
-
- public void startProduction(ImageConsumer var1) {
- this.addConsumer(var1);
- }
-
- void newPixels(int var1, int var2, int var3, int var4) {
- if (this.field_1 != null) {
- this.field_1.setPixels(var1, var2, var3, var4, this.field_0, this.pixels, this.width * var2 + var1, this.width);
- this.field_1.imageComplete(2);
- }
-
- }
- }
-