, . , RoundRectShape, 0 .
Rect frame = new Rect(left, top, right, bottom);
int width = canvas.getWidth();
int height = canvas.getHeight();
paint.setColor(maskColor);
canvas.drawRect(0, 0, width, frame.top, paint);
canvas.drawRect(0, frame.top, frame.left, frame.bottom + 1, paint);
canvas.drawRect(frame.right + 1, frame.top, width, frame.bottom + 1, paint);
canvas.drawRect(0, frame.bottom + 1, width, height, paint);
float outerRadii[] = {0, 0, 0, 0, 0, 0, 0, 0};
float innerRadii[] = {8, 8, 8, 8, 8, 8, 8, 8};
RoundRectShape roundRect = new RoundRectShape(outerRadii, new RectF(5,5,5,5), innerRadii);
roundRect.resize(frame.width()+1, frame.height()+1);
canvas.save();
canvas.translate(frame.left, frame.top);
roundRect.draw(canvas, paint);
canvas.restore();
:
http://i.stack.imgur.com/4qdTw.png