ShadowDisplayListCanvas
, ShadowRecordingCanvas
@Implements(android.graphics.Canvas.class) public class ShadowCanvas extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
ShadowCanvas.ArcPaintHistoryEvent |
|
static class |
ShadowCanvas.CirclePaintHistoryEvent |
|
static class |
ShadowCanvas.LinePaintHistoryEvent |
|
static class |
ShadowCanvas.OvalPaintHistoryEvent |
|
static class |
ShadowCanvas.RectPaintHistoryEvent |
|
static class |
ShadowCanvas.RoundRectPaintHistoryEvent |
Captures round rectangle drawing events
|
static class |
ShadowCanvas.TextHistoryEvent |
Constructor | Description |
---|---|
ShadowCanvas() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
__constructor__(Bitmap bitmap) |
|
void |
appendDescription(String s) |
|
protected void |
drawArc(RectF oval,
float startAngle,
float sweepAngle,
boolean useCenter,
Paint paint) |
|
protected void |
drawBitmap(Bitmap bitmap,
float left,
float top,
Paint paint) |
|
protected void |
drawBitmap(Bitmap bitmap,
Matrix matrix,
Paint paint) |
|
protected void |
drawBitmap(Bitmap bitmap,
Rect src,
RectF dst,
Paint paint) |
|
protected void |
drawBitmap(Bitmap bitmap,
Rect src,
Rect dst,
Paint paint) |
|
protected void |
drawCircle(float cx,
float cy,
float radius,
Paint paint) |
|
protected void |
drawColor(int color) |
|
protected void |
drawLine(float startX,
float startY,
float stopX,
float stopY,
Paint paint) |
|
protected void |
drawOval(RectF oval,
Paint paint) |
|
protected void |
drawPaint(Paint paint) |
|
protected void |
drawPath(Path path,
Paint paint) |
|
protected void |
drawRect(float left,
float top,
float right,
float bottom,
Paint paint) |
|
protected void |
drawRoundRect(RectF rect,
float rx,
float ry,
Paint paint) |
|
protected void |
drawText(char[] text,
int index,
int count,
float x,
float y,
Paint paint) |
|
protected void |
drawText(CharSequence text,
int start,
int end,
float x,
float y,
Paint paint) |
|
protected void |
drawText(String text,
float x,
float y,
Paint paint) |
|
protected void |
drawText(String text,
int start,
int end,
float x,
float y,
Paint paint) |
|
int |
getArcPaintHistoryCount() |
|
int |
getCirclePaintHistoryCount() |
|
String |
getDescription() |
|
ShadowCanvas.ArcPaintHistoryEvent |
getDrawnArc(int i) |
|
ShadowCanvas.CirclePaintHistoryEvent |
getDrawnCircle(int i) |
|
ShadowCanvas.LinePaintHistoryEvent |
getDrawnLine(int i) |
|
ShadowCanvas.OvalPaintHistoryEvent |
getDrawnOval(int i) |
|
Paint |
getDrawnPaint() |
|
Path |
getDrawnPath(int i) |
|
Paint |
getDrawnPathPaint(int i) |
|
ShadowCanvas.RectPaintHistoryEvent |
getDrawnRect(int i) |
|
ShadowCanvas.RoundRectPaintHistoryEvent |
getDrawnRoundRect(int i) |
|
ShadowCanvas.TextHistoryEvent |
getDrawnTextEvent(int i) |
|
protected int |
getHeight() |
|
ShadowCanvas.RectPaintHistoryEvent |
getLastDrawnRect() |
|
ShadowCanvas.RoundRectPaintHistoryEvent |
getLastDrawnRoundRect() |
|
int |
getLinePaintHistoryCount() |
|
int |
getOvalPaintHistoryCount() |
|
int |
getPathPaintHistoryCount() |
|
int |
getRectPaintHistoryCount() |
|
int |
getRoundRectPaintHistoryCount() |
|
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(Bitmap bitmap) |
|
void |
setHeight(int height) |
|
void |
setWidth(int width) |
|
protected void |
translate(float x,
float y) |
|
static String |
visualize(Canvas canvas) |
Returns a textual representation of the appearance of the object.
|
public static String visualize(Canvas canvas)
canvas
- the canvas to visualize@Implementation protected void __constructor__(Bitmap bitmap)
public void appendDescription(String s)
public String getDescription()
@Implementation protected void setBitmap(Bitmap bitmap)
@Implementation protected void drawText(String text, float x, float y, Paint paint)
@Implementation protected void drawText(CharSequence text, int start, int end, float x, float y, Paint paint)
@Implementation protected void drawText(char[] text, int index, int count, float x, float y, Paint paint)
@Implementation protected void drawText(String text, int start, int end, float x, float y, 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(Paint paint)
@Implementation protected void drawColor(int color)
@Implementation protected void drawBitmap(Bitmap bitmap, float left, float top, Paint paint)
@Implementation protected void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint)
@Implementation protected void drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint)
@Implementation protected void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint)
@Implementation protected void drawPath(Path path, Paint paint)
@Implementation protected void drawCircle(float cx, float cy, float radius, Paint paint)
@Implementation protected void drawArc(RectF oval, float startAngle, float sweepAngle, boolean useCenter, Paint paint)
@Implementation protected void drawRect(float left, float top, float right, float bottom, Paint paint)
@Implementation protected void drawRoundRect(RectF rect, float rx, float ry, Paint paint)
@Implementation protected void drawLine(float startX, float startY, float stopX, float stopY, Paint paint)
@Implementation protected void drawOval(RectF oval, 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 Paint getDrawnPathPaint(int i)
public Path getDrawnPath(int i)
public ShadowCanvas.CirclePaintHistoryEvent getDrawnCircle(int i)
public ShadowCanvas.ArcPaintHistoryEvent getDrawnArc(int i)
public void resetCanvasHistory()
public 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.RoundRectPaintHistoryEvent getDrawnRoundRect(int i)
public ShadowCanvas.RoundRectPaintHistoryEvent getLastDrawnRoundRect()
public int getRoundRectPaintHistoryCount()
public ShadowCanvas.LinePaintHistoryEvent getDrawnLine(int i)
public int getLinePaintHistoryCount()
public int getOvalPaintHistoryCount()
public ShadowCanvas.OvalPaintHistoryEvent getDrawnOval(int i)