显示位图中的一部分
一张位图如下图所示:
代码截取第一张图片显示
@Override
protected void onDraw(Canvas canvas) {
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(Color.BLUE);
paint.setStyle(Paint.Style.FILL);
Bitmap s = BitmapFactory.decodeResource(this.getResources(), R.mipmap