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
public ColorFilter duotoneColorFilter(@ColorInt int colorBlack, @ColorInt int colorWhite, float contrast) { | |
ColorMatrix cm = new ColorMatrix(); | |
ColorMatrix cmBlackWhite = new ColorMatrix(); | |
float lumR = 0.2125f; | |
float lumG = 0.7154f; | |
float lumB = 0.0721f; | |
float[] blackWhiteArray = new float[]{ | |
lumR, lumG, lumB, 0, 0, | |
lumR, lumG, lumB, 0, 0, |
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
package com.pixplicity.gist.ui.views; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.PathDashPathEffect; | |
import android.util.AttributeSet; |