clear Image with color
This commit is contained in:
parent
b9331d87a8
commit
58ae9d5185
@ -1,6 +1,7 @@
|
|||||||
package sillysagiri;
|
package sillysagiri;
|
||||||
|
|
||||||
import javax.microedition.lcdui.Graphics;
|
import javax.microedition.lcdui.Graphics;
|
||||||
|
import javax.microedition.lcdui.Image;
|
||||||
|
|
||||||
import dothack.Global;
|
import dothack.Global;
|
||||||
|
|
||||||
@ -17,6 +18,20 @@ public final class Utils {
|
|||||||
gg.fillRect(0, 0, Global.app.game.getWidth(), Global.app.game.getHeight());
|
gg.fillRect(0, 0, Global.app.game.getWidth(), Global.app.game.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Clear_Image(Image img, int r, int g, int b)
|
||||||
|
{
|
||||||
|
Graphics gg = img.getGraphics();
|
||||||
|
gg.setColor(r,g,b);
|
||||||
|
gg.fillRect(0, 0, img.getWidth(), img.getHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Clear_Image(Image img, int rgb)
|
||||||
|
{
|
||||||
|
Graphics gg = img.getGraphics();
|
||||||
|
gg.setColor(rgb);
|
||||||
|
gg.fillRect(0, 0, img.getWidth(), img.getHeight());
|
||||||
|
}
|
||||||
|
|
||||||
public static int GetScreenWidth()
|
public static int GetScreenWidth()
|
||||||
{
|
{
|
||||||
return Global.app.game.getWidth();
|
return Global.app.game.getWidth();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user