/* * This file is part of HoloAPI. * * HoloAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HoloAPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HoloAPI. If not, see <http://www.gnu.org/licenses/>. */ package com.dsh105.holoapi.image; import java.awt.image.BufferedImage; /** * Represents an animated frame generated by a GIF image */ public class GIFFrame extends Frame { protected BufferedImage image; protected String disposal; protected ImageGenerator imageGenerator; protected GIFFrame(BufferedImage image, int delay, String disposal) { super(delay); this.image = image; this.disposal = disposal; } protected GIFFrame(ImageGenerator generator, int delay) { super(delay); this.imageGenerator = generator; } /** * Gets the image generator used to generate the frame lines * * @return image generator used */ public ImageGenerator getImageGenerator() { return imageGenerator; } @Override public String[] getLines() { return this.imageGenerator.getLines(); } }