private void doBitmap(Canvas canvas, float x, float y, float width, float height, byte[] bytes) {
Bitmap bm = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
if (bm != null) {
// Log.d(TAG, String.format("Image %f x %f %s", width, height, bm));
bm.prepareToDraw();
Paint paint = new Paint(Paint.FILTER_BITMAP_FLAG | Paint.ANTI_ALIAS_FLAG);
RectF rect = new RectF(x, y, x+width, y+height);
canvas.clipRect(rect, Op.REPLACE);
canvas.drawBitmap(bm, null, rect, paint);
bm.recycle();
}
}
SVGParser.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:svg-android-2
作者:
评论列表
文章目录