imgutil.java

来自「一款麻将游戏的J2me源代码」· Java 代码 · 共 52 行

JAVA
52
字号
// FrontEnd Plus GUI for JAD
// DeCompiled : ImgUtil.class
 
import java.io.IOException;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

public class ImgUtil
{

    public ImgUtil()
    {
    }

    public static Image createImage(String s)
    {
        Image image = null;
        try
        {
            image = Image.createImage(s);
        }
        catch(IOException ioexception) { }
        return image;
    }

    public static void drawImage(Graphics g, Image image, int i, int j)
    {
        g.drawImage(image, i, j, 0);
    }

    public static void drawString(Graphics g, String s, int i, int j)
    {
        g.drawString(s, i, j, 20);
    }

    public static void drawOutlineString(Graphics g, String s, int i, int j, int k, int l, int i1, int j1, 
            int k1, int l1)
    {
        g.setColor(k, l, i1);
        drawString(g, s, i - 1, j - 1);
        drawString(g, s, i, j - 1);
        drawString(g, s, i + 1, j - 1);
        drawString(g, s, i - 1, j);
        drawString(g, s, i + 1, j);
        drawString(g, s, i - 1, j + 1);
        drawString(g, s, i, j + 1);
        drawString(g, s, i + 1, j + 1);
        g.setColor(j1, k1, l1);
        drawString(g, s, i, j);
    }
}

⌨️ 快捷键说明

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