转载请注明出处:http://blog.csdn.net/crazy1235/article/details/73611978
Canvas
Canvas – 画布
方法名 | 含义 |
---|---|
drawArc(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean useCenter, @NonNull Paint paint) | 绘制圆弧 |
drawArc(@NonNull RectF oval, float startAngle, float sweepAngle, boolean useCenter, @NonNull Paint paint) | 绘制圆弧 |
drawRGB(int r, int g, int b) | 绘制RGB色值 |
drawARGB(int a, int r, int g, int b) | 绘制ARGB色值 |
drawColor(@ColorInt int color) | 绘制颜色 |
drawColor(@ColorInt int color, @NonNull PorterDuff.Mode mode) | 绘制色值 |
drawPoint(float x, float y, @NonNull Paint paint) | 绘制一个点 |
drawPoints(@Size(multiple=2) @NonNull float[] pts, @NonNull Paint paint) | 绘制多个点 |
drawPoints(@Size(multiple=2) float[] pts, int offset, int count, @NonNull Paint paint) | 绘制多个点 |
drawLine(float startX, float startY, float stopX, float stopY, @NonNull Paint paint) | 绘制一条线 |
drawLines(@Size(multiple=4) @NonNull float[] pts, int offset, int count, @NonNull Paint paint) | 绘制多条线 |
drawLines(@Size(multiple=4) @NonNull float[] pts, @NonNull Paint paint) | 绘制多条线 |
drawCircle(float cx, float cy, float radius, @NonNull Paint paint) | 绘制一个圆形 |
drawOval(@NonNull RectF oval, @NonNull Paint paint) | 绘制椭圆 |
drawOval(float left, float top, float right, float bottom, @NonNull Paint paint) | 绘制椭圆 |
drawRect(float left, float top, float right, float bottom, @NonNull Paint paint) | 绘制矩形 |
drawRect(@NonNull Rect r, @NonNull Paint paint) | 绘制矩形 |
drawRect(@NonNull RectF rect, @NonNull Paint paint) | 绘制矩形 |
drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, @NonNull Paint paint) | 绘制圆角矩形 |
rawRoundRect(@NonNull RectF rect, float rx, float ry, @NonNull Paint paint) | 绘制圆角矩形 |
drawText(@NonNull char[] text, int index, int count, float x, float y, @NonNull Paint paint) | 绘制文本字符 |
drawText(@NonNull String text, float x, float y, @NonNull Paint paint) | 绘制文本字符 |
drawText(@NonNull CharSequence text, int start, int end, float x, float y, @NonNull Paint paint) | 绘制文本字符 |
drawText(@NonNull String text, int start, int end, float x, float y, @NonNull Paint paint) | 绘制文本字符 |
drawTextOnPath(@NonNull char[] text, int index, int count, @NonNull Path path, float hOffset, float vOffset, @NonNull Paint paint) | 沿着一条路径绘制字符串 |
drawTextOnPath(@NonNull String text, @NonNull Path path, float hOffset,float vOffset, @NonNull Paint paint) | 沿着一条路径绘制字符串 |
drawBitmap(@NonNull Bitmap bitmap, float left, float top, @Nullable Paint paint) | 绘制bitmap |
drawBitmap(@NonNull Bitmap bitmap, @Nullable Rect src, @NonNull RectF dst, @Nullable Paint paint) | 绘制bitmap |
drawBitmap(@NonNull Bitmap bitmap, @Nullable Rect src, @NonNull Rect dst, @Nullable Paint paint) | 绘制bitmap |
drawBitmap(@NonNull Bitmap bitmap, @NonNull Matrix matrix, @Nullable Paint paint) | 绘制bitmap |
drawPatch(@NonNull NinePatch patch, @NonNull Rect dst, @Nullable Paint paint) | 绘制路径 |
drawPatch(@NonNull NinePatch patch, @NonNull RectF dst, @Nullable Paint paint) | 绘制路径 |
Paint
作者:crazy1235 发表于2017/6/22 23:16:40 原文链接
阅读:355 评论:0 查看评论