Slide 27
Slide 27 text
#DV13 #FilthyRichAndroid
Vignette
14
RadialGradient vignette = new RadialGradient(
mRect.centerX(), mRect.centerY(), radius,
new int[] { 0, 0, 0x7f000000 },
new float[] { 0.0f, 0.7f, 1.0f },
Shader.TileMode.CLAMP);
Matrix oval = new Matrix();
oval.setScale(1.0f, 0.7f);
vignette.setLocalMatrix(oval);
mPaint.setShader(new ComposeShader(
mBitmapShader, vignette, PorterDuff.Mode.SRC_OVER));