Build m5-rc15

android.graphics
Class Canvas

java.lang.Object
  extended by android.graphics.Canvas

public class Canvas
extends Object


Nested Class Summary
static class Canvas.EdgeType
           
 
Field Summary
static int CLIP_SAVE_FLAG
           
static int CLIP_TO_LAYER_SAVE_FLAG
           
static int FULL_COLOR_LAYER_SAVE_FLAG
           
static int HAS_ALPHA_LAYER_SAVE_FLAG
           
static int MATRIX_SAVE_FLAG
           
 
Constructor Summary
Canvas()
           
Canvas(Bitmap bitmap)
           
 
Method Summary
 boolean clipPath(Path path)
           
 boolean clipPath(Path path, Region.Op op)
           
 boolean clipRect(float f, float f1, float f2, float f3)
           
 boolean clipRect(float left, float top, float right, float bottom, Region.Op op)
           
 boolean clipRect(int i, int j, int k, int l)
           
 boolean clipRect(Rect rect)
           
 boolean clipRect(RectF rectf)
           
 boolean clipRect(RectF rect, Region.Op op)
           
 boolean clipRect(Rect rect, Region.Op op)
           
 boolean clipRegion(Region region)
           
 boolean clipRegion(Region region, Region.Op op)
           
 void concat(Matrix matrix)
           
 void drawArc(RectF oval, float startAngle, float sweepAngle, Paint paint)
           
 void drawARGB(int a, int r, int g, int b)
           
 void drawBitmap(Bitmap bitmap, float left, float top, Paint paint)
           
 void drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint)
           
 void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint)
           
 void drawCircle(float cx, float cy, float radius, Paint paint)
           
 void drawColor(int color)
           
 void drawColor(int color, PorterDuff.Mode mode)
           
 void drawLine(float startX, float startY, float stopX, float stopY, Paint paint)
           
 void drawOval(RectF oval, Paint paint)
           
 void drawPaint(Paint paint)
           
 void drawPath(Path path, Paint paint)
           
 void drawPicture(Picture picture)
           
 void drawPoint(float f, float f1, Paint paint)
           
 void drawPoints(float[] af, int i, int j, Paint paint)
           
 void drawPoints(float[] pts, Paint paint)
           
 void drawPosText(char[] text, int index, int count, float[] pos, Paint paint)
           
 void drawPosText(String text, float[] pos, Paint paint)
           
 void drawRect(float left, float top, float right, float bottom, Paint paint)
           
 void drawRect(RectF rect, Paint paint)
           
 void drawRect(Rect r, Paint paint)
           
 void drawRGB(int r, int g, int b)
           
 void drawRoundRect(RectF rect, float rx, float ry, Paint paint)
           
 void drawText(char[] text, int index, int count, float x, float y, Paint paint)
           
 void drawText(CharSequence text, int start, int end, float x, float y, Paint paint)
           
 void drawText(String s, float f, float f1, Paint paint)
           
 void drawText(String text, int start, int end, float x, float y, Paint paint)
           
 void drawTextOnPath(char[] text, int index, int count, Path path, float hOffset, float vOffset, Paint paint)
           
 void drawTextOnPath(String text, Path path, float hOffset, float vOffset, Paint paint)
           
protected  void finalize()
           
 int getBitmapHeight()
           
 int getBitmapWidth()
           
 Rect getClipBounds()
           
 boolean getClipBounds(Rect bounds)
           
 Matrix getCTM()
           
 void getCTM(Matrix ctm)
           
 DrawFilter getDrawFilter()
           
 int getSaveCount()
           
 boolean isBitmapOpaque()
           
 boolean quickReject(float left, float top, float right, float bottom, Canvas.EdgeType type)
           
 boolean quickReject(Path path, Canvas.EdgeType type)
           
 boolean quickReject(RectF rect, Canvas.EdgeType type)
           
 void restore()
           
 void restoreToCount(int i)
           
 void rotate(float f)
           
 void rotate(float degrees, float px, float py)
           
 int save()
           
 int save(int i)
           
 int saveLayer(float left, float top, float right, float bottom, Paint paint, int saveFlags)
           
 int saveLayer(RectF bounds, Paint paint, int saveFlags)
           
 int saveLayerAlpha(float left, float top, float right, float bottom, int alpha, int saveFlags)
           
 int saveLayerAlpha(RectF bounds, int alpha, int saveFlags)
           
 void scale(float f, float f1)
           
 void scale(float sx, float sy, float px, float py)
           
 void setDevice(Bitmap bitmap)
           
 void setDrawFilter(DrawFilter filter)
           
 void skew(float f, float f1)
           
 void translate(float f, float f1)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MATRIX_SAVE_FLAG

public static final int MATRIX_SAVE_FLAG
See Also:
Constant Field Values

CLIP_SAVE_FLAG

public static final int CLIP_SAVE_FLAG
See Also:
Constant Field Values

HAS_ALPHA_LAYER_SAVE_FLAG

public static final int HAS_ALPHA_LAYER_SAVE_FLAG
See Also:
Constant Field Values

FULL_COLOR_LAYER_SAVE_FLAG

public static final int FULL_COLOR_LAYER_SAVE_FLAG
See Also:
Constant Field Values

CLIP_TO_LAYER_SAVE_FLAG

public static final int CLIP_TO_LAYER_SAVE_FLAG
See Also:
Constant Field Values
Constructor Detail

Canvas

public Canvas()

Canvas

public Canvas(Bitmap bitmap)
Method Detail

setDevice

public void setDevice(Bitmap bitmap)

isBitmapOpaque

public boolean isBitmapOpaque()

getBitmapWidth

public int getBitmapWidth()

getBitmapHeight

public int getBitmapHeight()

save

public int save()

save

public int save(int i)

saveLayer

public int saveLayer(RectF bounds,
                     Paint paint,
                     int saveFlags)

saveLayer

public int saveLayer(float left,
                     float top,
                     float right,
                     float bottom,
                     Paint paint,
                     int saveFlags)

saveLayerAlpha

public int saveLayerAlpha(RectF bounds,
                          int alpha,
                          int saveFlags)

saveLayerAlpha

public int saveLayerAlpha(float left,
                          float top,
                          float right,
                          float bottom,
                          int alpha,
                          int saveFlags)

restore

public void restore()

getSaveCount

public int getSaveCount()

restoreToCount

public void restoreToCount(int i)

translate

public void translate(float f,
                      float f1)

scale

public void scale(float f,
                  float f1)

scale

public final void scale(float sx,
                        float sy,
                        float px,
                        float py)

rotate

public void rotate(float f)

rotate

public final void rotate(float degrees,
                         float px,
                         float py)

skew

public void skew(float f,
                 float f1)

concat

public void concat(Matrix matrix)

clipRect

public boolean clipRect(RectF rect,
                        Region.Op op)

clipRect

public boolean clipRect(Rect rect,
                        Region.Op op)

clipRect

public boolean clipRect(RectF rectf)

clipRect

public boolean clipRect(Rect rect)

clipRect

public boolean clipRect(float left,
                        float top,
                        float right,
                        float bottom,
                        Region.Op op)

clipRect

public boolean clipRect(float f,
                        float f1,
                        float f2,
                        float f3)

clipRect

public boolean clipRect(int i,
                        int j,
                        int k,
                        int l)

clipPath

public boolean clipPath(Path path,
                        Region.Op op)

clipPath

public boolean clipPath(Path path)

clipRegion

public boolean clipRegion(Region region,
                          Region.Op op)

clipRegion

public boolean clipRegion(Region region)

getDrawFilter

public DrawFilter getDrawFilter()

setDrawFilter

public void setDrawFilter(DrawFilter filter)

quickReject

public boolean quickReject(RectF rect,
                           Canvas.EdgeType type)

quickReject

public boolean quickReject(Path path,
                           Canvas.EdgeType type)

quickReject

public boolean quickReject(float left,
                           float top,
                           float right,
                           float bottom,
                           Canvas.EdgeType type)

getClipBounds

public boolean getClipBounds(Rect bounds)

getClipBounds

public final Rect getClipBounds()

getCTM

public void getCTM(Matrix ctm)

getCTM

public final Matrix getCTM()

drawRGB

public void drawRGB(int r,
                    int g,
                    int b)

drawARGB

public void drawARGB(int a,
                     int r,
                     int g,
                     int b)

drawColor

public void drawColor(int color)

drawColor

public void drawColor(int color,
                      PorterDuff.Mode mode)

drawPaint

public void drawPaint(Paint paint)

drawPoints

public void drawPoints(float[] af,
                       int i,
                       int j,
                       Paint paint)

drawPoints

public void drawPoints(float[] pts,
                       Paint paint)

drawPoint

public void drawPoint(float f,
                      float f1,
                      Paint paint)

drawLine

public void drawLine(float startX,
                     float startY,
                     float stopX,
                     float stopY,
                     Paint paint)

drawRect

public void drawRect(RectF rect,
                     Paint paint)

drawRect

public void drawRect(Rect r,
                     Paint paint)

drawRect

public void drawRect(float left,
                     float top,
                     float right,
                     float bottom,
                     Paint paint)

drawOval

public void drawOval(RectF oval,
                     Paint paint)

drawCircle

public void drawCircle(float cx,
                       float cy,
                       float radius,
                       Paint paint)

drawArc

public void drawArc(RectF oval,
                    float startAngle,
                    float sweepAngle,
                    Paint paint)

drawRoundRect

public void drawRoundRect(RectF rect,
                          float rx,
                          float ry,
                          Paint paint)

drawPath

public void drawPath(Path path,
                     Paint paint)

drawBitmap

public void drawBitmap(Bitmap bitmap,
                       float left,
                       float top,
                       Paint paint)

drawBitmap

public void drawBitmap(Bitmap bitmap,
                       Rect src,
                       RectF dst,
                       Paint paint)

drawBitmap

public void drawBitmap(Bitmap bitmap,
                       Rect src,
                       Rect dst,
                       Paint paint)

drawText

public void drawText(char[] text,
                     int index,
                     int count,
                     float x,
                     float y,
                     Paint paint)

drawText

public void drawText(String s,
                     float f,
                     float f1,
                     Paint paint)

drawText

public void drawText(String text,
                     int start,
                     int end,
                     float x,
                     float y,
                     Paint paint)

drawText

public void drawText(CharSequence text,
                     int start,
                     int end,
                     float x,
                     float y,
                     Paint paint)

drawPosText

public void drawPosText(char[] text,
                        int index,
                        int count,
                        float[] pos,
                        Paint paint)

drawPosText

public void drawPosText(String text,
                        float[] pos,
                        Paint paint)

drawTextOnPath

public void drawTextOnPath(char[] text,
                           int index,
                           int count,
                           Path path,
                           float hOffset,
                           float vOffset,
                           Paint paint)

drawTextOnPath

public void drawTextOnPath(String text,
                           Path path,
                           float hOffset,
                           float vOffset,
                           Paint paint)

drawPicture

public void drawPicture(Picture picture)

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

Build m5-rc15

Please submit a feedback, bug or feature