Created
August 26, 2014 17:49
-
-
Save j-onathan/795eae495a00c9d3898d to your computer and use it in GitHub Desktop.
Android Code Example: Paint (from https://www.codota.com/android/scenarios/52fcbc9cda0adcb7b7fc3bff/android.graphics.Paint?tag=dragonfly)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paint paint = new Paint(); | |
paint.setAntiAlias(true); | |
paint.setColor(WHITE); | |
Bitmap clipped = Bitmap.createBitmap(width, height, ARGB_8888); | |
Canvas canvas = new Canvas(clipped); | |
canvas.drawRoundRect(new RectF(0, 0, width, height), radius, radius, paint); | |
paint.setXfermode(new PorterDuffXfermode(DST_IN)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment