I have an image
, I can draw an circle
over it like the code below:
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.girl).copy(Bitmap.Config.ARGB_8888, true);
Canvas canvas = new Canvas(bitmap);
Paint paint = new Paint();
paint.setColor(Color.RED);
paint.setStrokeWidth(200);
paint.setStyle(Style.STROKE.FILL);
paint.setAntiAlias(true);
canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, 100,
paint);
And the circle
will be red color! But because of some reason, I want the color of circle
same as its under bitmap
. Can I do it? and how? Thanks everyone!
Edited: One more question, How I can get all the pixels inside circle
?