core-ktx / androidx.graphics / android.graphics.PorterDuff.Mode

Extensions for android.graphics.PorterDuff.Mode

toColorFilter

fun Mode.toColorFilter(color: Int): PorterDuffColorFilter

Creates a new PorterDuffColorFilter that uses this PorterDuff.Mode as the alpha compositing or blending mode, and the specified color.

toXfermode

fun Mode.toXfermode(): PorterDuffXfermode

Creates a new PorterDuffXfermode that uses this PorterDuff.Mode as the alpha compositing or blending mode.