This file contains 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
// It's assumed this function is defined in a class extending 'ImageView' | |
void addEffectBrightness(){ | |
float brightness = mBrightnessValue; | |
mCm = new ColorMatrix(); | |
mCm.set(new float[] { 1, 0, 0, 0, brightness, | |
0, 1, 0, 0,brightness, | |
0, 0, 1, 0, brightness, | |
0, 0, 0, 1, 0 }); | |
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); |