that_person

Android Code Example: Paint (via http://goo.gl/vWu0F3)

Aug 26th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. Paint paint = new Paint();
  2. paint.setAntiAlias(true);
  3. paint.setColor(WHITE);
  4.  
  5. Bitmap clipped = Bitmap.createBitmap(width, height, ARGB_8888);
  6. Canvas canvas = new Canvas(clipped);
  7. canvas.drawRoundRect(new RectF(0, 0, width, height), radius, radius, paint);
  8. paint.setXfermode(new PorterDuffXfermode(DST_IN));
Add Comment
Please, Sign In to add comment