Code example for Paint

Methods: clearShadowLayer, setAlpha, setColor, setShadowLayer

0
            mMediumPaint.setShadowLayer(2.5f, 0.0f, 0.0f, 0xff000000);
            canvas.drawText("Hello OpenGL renderer!", 100, 150, mMediumPaint);
            mMediumPaint.clearShadowLayer();
            canvas.drawText("Hello OpenGL renderer!", 100, 200, mLargePaint);
 
            mLargePaint.setShadowLayer(2.5f, 3.0f, 3.0f, 0xff000000);
            canvas.drawText("Hello OpenGL renderer!", 100, 400, mLargePaint);
            mLargePaint.setShadowLayer(3.0f, 3.0f, 3.0f, 0xff00ff00);
            mLargePaint.setAlpha(100);
            canvas.drawText("Hello OpenGL renderer!", 100, 500, mLargePaint);
            mLargePaint.setAlpha(255);
            mLargePaint.setShadowLayer(3.0f, 3.0f, 3.0f, 0xd000ff00);
            mLargePaint.setColor(0x00ffff00);
            canvas.drawText("Hello OpenGL renderer!", 100, 600, mLargePaint);
            mLargePaint.setShadowLayer(3.0f, 3.0f, 3.0f, 0x80000000);
            mLargePaint.setColor(0x4dffffff);
            canvas.drawText("Hello OpenGL renderer!", 100, 650, mLargePaint);
            mLargePaint.setAlpha(255);
            mLargePaint.setColor(0xff000000);
            mLargePaint.clearShadowLayer();
 
            canvas.drawText("Hello!", 500, 600, mHugePaint);
 
            canvas.drawText("Hello OpenGL renderer!", 500, 40, mStrikePaint);
            mStrikePaint.setStrikeThruText(true);