⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 baseimage.java

📁 Ftp服务1.0
💻 JAVA
字号:
package ranab.img;

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

/**
 * This is the abstract base class of all the image
 * classes. All the image classes have to extend this class.
 * 
 * @author <a href="mailto:rana_b@yahoo.com">Rana Bhattacharyya</a>
 */
public 
abstract class BaseImage {

    protected int miHeight;
    protected int miWidth;

    /**
     * Constructor
     */
    public BaseImage(int width, int height) {
        miWidth = width;
        miHeight = height;  
    }


    /**
     * get image height
     */
    public int getHeight() {
        return miHeight;    
    }


    /**
     * get image height
     */
    public int getWidth() {
        return miWidth; 
    }


    /**
     * Get graphics to draw
     */
    public abstract Graphics2D getGraphics();   

    /**
     * Encode function
     */
    public abstract void encode(OutputStream os) throws Exception; 


    /**
     * Get mime type
     */
    public abstract String getMimeType();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -