package org.wikiwebserver.util.image;

import java.awt.Graphics2D;
import java.io.IOException;
import java.io.OutputStream;

public abstract class GraphicsHelper {
    
    private int width, height;    
    private OutputStream out;
    
    public GraphicsHelper(int width, int height, OutputStream out) {
        this.width = width;
        this.height = height;
        this.out = out;
    }   
    
    public abstract Graphics2D createGraphics();
    
    public abstract void writeImageData() throws IOException;
    
    public abstract String getContentType();

    public int getWidth() {
        return this.width;
    }

    public int getHeight() {
        return this.height;
    }     
    
    public OutputStream getOutputStream() {
        return this.out;
    }
}

