@Implements(value=android.graphics.Canvas.class) public class ShadowCanvas extends java.lang.Object
Broken. This implementation is very specific to the application for which it was developed. Todo: Reimplement. Consider using the same strategy of collecting a history of draw events and providing methods for writing queries based on type, number, and order of events.
Modifier and Type | Class and Description |
---|---|
static class |
ShadowCanvas.ArcPaintHistoryEvent |
static class |
ShadowCanvas.CirclePaintHistoryEvent |
static class |
ShadowCanvas.LinePaintHistoryEvent |
static class |
ShadowCanvas.OvalPaintHistoryEvent |
static class |
ShadowCanvas.RectPaintHistoryEvent |
static class |
ShadowCanvas.TextHistoryEvent |
Constructor and Description |
---|
ShadowCanvas() |
Modifier and Type | Method and Description |
---|---|
protected void |
__constructor__(android.graphics.Bitmap bitmap) |
void |
appendDescription(java.lang.String s) |
protected void |
drawArc(android.graphics.RectF oval,
float startAngle,
float sweepAngle,
boolean useCenter,
android.graphics.Paint paint) |
protected void |
drawBitmap(android.graphics.Bitmap bitmap,
float left,
float top,
android.graphics.Paint paint) |
protected void |
drawBitmap(android.graphics.Bitmap bitmap,
android.graphics.Matrix matrix,
android.graphics.Paint paint) |
protected void |
drawBitmap(android.graphics.Bitmap bitmap,
android.graphics.Rect src,
android.graphics.RectF dst,
android.graphics.Paint paint) |
protected void |
drawBitmap(android.graphics.Bitmap bitmap,
android.graphics.Rect src,
android.graphics.Rect dst,
android.graphics.Paint paint) |
protected void |
drawCircle(float cx,
float cy,
float radius,
android.graphics.Paint paint) |
protected void |
drawColor(int color) |
protected void |
drawLine(float startX,
float startY,
float stopX,
float stopY,
android.graphics.Paint paint) |
protected void |
drawOval(android.graphics.RectF oval,
android.graphics.Paint paint) |
protected void |
drawPaint(android.graphics.Paint paint) |
protected void |
drawPath(android.graphics.Path path,
android.graphics.Paint paint) |
protected void |
drawRect(float left,
float top,
float right,
float bottom,
android.graphics.Paint paint) |
protected void |
drawText(char[] text,
int index,
int count,
float x,
float y,
android.graphics.Paint paint) |
protected void |
drawText(java.lang.CharSequence text,
int start,
int end,
float x,
float y,
android.graphics.Paint paint) |
protected void |
drawText(java.lang.String text,
float x,
float y,
android.graphics.Paint paint) |
protected void |
drawText(java.lang.String text,
int start,
int end,
float x,
float y,
android.graphics.Paint paint) |
int |
getArcPaintHistoryCount() |
int |
getCirclePaintHistoryCount() |
java.lang.String |
getDescription() |
ShadowCanvas.ArcPaintHistoryEvent |
getDrawnArc(int i) |
ShadowCanvas.CirclePaintHistoryEvent |
getDrawnCircle(int i) |
ShadowCanvas.LinePaintHistoryEvent |
getDrawnLine(int i) |
ShadowCanvas.OvalPaintHistoryEvent |
getDrawnOval(int i) |
android.graphics.Paint |
getDrawnPaint() |
android.graphics.Path |
getDrawnPath(int i) |
android.graphics.Paint |
getDrawnPathPaint(int i) |
ShadowCanvas.RectPaintHistoryEvent |
getDrawnRect(int i) |
ShadowCanvas.TextHistoryEvent |
getDrawnTextEvent(int i) |
protected int |
getHeight() |
ShadowCanvas.RectPaintHistoryEvent |
getLastDrawnRect() |
int |
getLinePaintHistoryCount() |
int |
getOvalPaintHistoryCount() |
int |
getPathPaintHistoryCount() |
int |
getRectPaintHistoryCount() |
int |
getTextHistoryCount() |
protected int |
getWidth() |
boolean |
hasDrawnCircle() |
boolean |
hasDrawnPath() |
void |
resetCanvasHistory() |
protected void |
restore() |
protected int |
save() |
protected void |
scale(float sx,
float sy) |
protected void |
scale(float sx,
float sy,
float px,
float py) |
protected void |
setBitmap(android.graphics.Bitmap bitmap) |
void |
setHeight(int height) |
void |
setWidth(int width) |
protected void |
translate(float x,
float y) |
static java.lang.String |
visualize(android.graphics.Canvas canvas)
Returns a textual representation of the appearance of the object.
|
public static java.lang.String visualize(android.graphics.Canvas canvas)
Returns a textual representation of the appearance of the object.
canvas
- the canvas to visualize@Implementation protected void __constructor__(android.graphics.Bitmap bitmap)
public void appendDescription(java.lang.String s)
public java.lang.String getDescription()
@Implementation protected void setBitmap(android.graphics.Bitmap bitmap)
@Implementation protected void drawText(java.lang.String text, float x, float y, android.graphics.Paint paint)
@Implementation protected void drawText(java.lang.CharSequence text, int start, int end, float x, float y, android.graphics.Paint paint)
@Implementation protected void drawText(char[] text, int index, int count, float x, float y, android.graphics.Paint paint)
@Implementation protected void drawText(java.lang.String text, int start, int end, float x, float y, android.graphics.Paint paint)
@Implementation protected void translate(float x, float y)
@Implementation protected void scale(float sx, float sy)
@Implementation protected void scale(float sx, float sy, float px, float py)
@Implementation protected void drawPaint(android.graphics.Paint paint)
@Implementation protected void drawColor(int color)
@Implementation protected void drawBitmap(android.graphics.Bitmap bitmap, float left, float top, android.graphics.Paint paint)
@Implementation protected void drawBitmap(android.graphics.Bitmap bitmap, android.graphics.Rect src, android.graphics.Rect dst, android.graphics.Paint paint)
@Implementation protected void drawBitmap(android.graphics.Bitmap bitmap, android.graphics.Rect src, android.graphics.RectF dst, android.graphics.Paint paint)
@Implementation protected void drawBitmap(android.graphics.Bitmap bitmap, android.graphics.Matrix matrix, android.graphics.Paint paint)
@Implementation protected void drawPath(android.graphics.Path path, android.graphics.Paint paint)
@Implementation protected void drawCircle(float cx, float cy, float radius, android.graphics.Paint paint)
@Implementation protected void drawArc(android.graphics.RectF oval, float startAngle, float sweepAngle, boolean useCenter, android.graphics.Paint paint)
@Implementation protected void drawRect(float left, float top, float right, float bottom, android.graphics.Paint paint)
@Implementation protected void drawLine(float startX, float startY, float stopX, float stopY, android.graphics.Paint paint)
@Implementation protected void drawOval(android.graphics.RectF oval, android.graphics.Paint paint)
@Implementation protected int save()
@Implementation protected void restore()
public int getPathPaintHistoryCount()
public int getCirclePaintHistoryCount()
public int getArcPaintHistoryCount()
public boolean hasDrawnPath()
public boolean hasDrawnCircle()
public android.graphics.Paint getDrawnPathPaint(int i)
public android.graphics.Path getDrawnPath(int i)
public ShadowCanvas.CirclePaintHistoryEvent getDrawnCircle(int i)
public ShadowCanvas.ArcPaintHistoryEvent getDrawnArc(int i)
public void resetCanvasHistory()
public android.graphics.Paint getDrawnPaint()
public void setHeight(int height)
public void setWidth(int width)
@Implementation protected int getWidth()
@Implementation protected int getHeight()
public ShadowCanvas.TextHistoryEvent getDrawnTextEvent(int i)
public int getTextHistoryCount()
public ShadowCanvas.RectPaintHistoryEvent getDrawnRect(int i)
public ShadowCanvas.RectPaintHistoryEvent getLastDrawnRect()
public int getRectPaintHistoryCount()
public ShadowCanvas.LinePaintHistoryEvent getDrawnLine(int i)
public int getLinePaintHistoryCount()
public int getOvalPaintHistoryCount()
public ShadowCanvas.OvalPaintHistoryEvent getDrawnOval(int i)