Graphics.PixmapFormat
Modifier and Type | Field and Description |
---|---|
(package private) AssetManager |
assets |
(package private) Canvas |
canvas |
(package private) Rect |
dstRect |
(package private) Bitmap |
frameBuffer |
(package private) Paint |
paint |
(package private) Rect |
srcRect |
Constructor and Description |
---|
AndroidGraphics(AssetManager assets,
Bitmap frameBuffer) |
Modifier and Type | Method and Description |
---|---|
void |
clear(int color) |
void |
drawLine(int x,
int y,
int x2,
int y2,
int color) |
void |
drawPixel(int x,
int y,
int color) |
void |
drawPixmap(Pixmap pixmap,
int x,
int y) |
void |
drawPixmap(Pixmap pixmap,
int x,
int y,
int srcX,
int srcY,
int srcWidth,
int srcHeight) |
void |
drawRect(int x,
int y,
int width,
int height,
int color) |
void |
drawText(java.lang.String text,
int x,
int y,
int color,
int size)
Additional method to this frame: Use to draw text on screen
|
int |
getHeight() |
int |
getWidth() |
Pixmap |
newPixmap(java.lang.String fileName,
Graphics.PixmapFormat format) |
AssetManager assets
Bitmap frameBuffer
Canvas canvas
Paint paint
Rect srcRect
Rect dstRect
public Pixmap newPixmap(java.lang.String fileName, Graphics.PixmapFormat format)
public void drawPixel(int x, int y, int color)
public void drawLine(int x, int y, int x2, int y2, int color)
public void drawRect(int x, int y, int width, int height, int color)
public void drawPixmap(Pixmap pixmap, int x, int y, int srcX, int srcY, int srcWidth, int srcHeight)
drawPixmap
in interface Graphics
public void drawPixmap(Pixmap pixmap, int x, int y)
drawPixmap
in interface Graphics
public void drawText(java.lang.String text, int x, int y, int color, int size)
Graphics