BrushPaint.ColorFunction.ReplaceColor


public final class BrushPaint.ColorFunction.ReplaceColor extends BrushPaint.ColorFunction


A ColorFunction that ignores the input color and replaces it with the specified color.

Summary

Public methods

boolean
equals(Object other)
final @ColorInt int

The color that will replace the input color, as a @ColorInt.

final @ColorLong long

The color that will replace the input color, as a @ColorLong.

int
@NonNull String
static final @NonNull BrushPaint.ColorFunction.ReplaceColor
withColorIntArgb(@ColorInt int colorIntArgb)

Returns a color function that will replace its input color with the given color.

static final @NonNull BrushPaint.ColorFunction.ReplaceColor
withColorLong(@ColorLong long colorLong)

Returns a color function that will replace its input color with the given color.

Inherited methods

From androidx.ink.brush.BrushPaint.ColorFunction
final @ColorInt int
transformColorIntArgb(@ColorInt int colorIntArgb)

Transforms the input color into a new color.

Public methods

equals

public boolean equals(Object other)

getColorIntArgb

Added in 1.1.0-alpha03
public final @ColorInt int getColorIntArgb()

The color that will replace the input color, as a @ColorInt.

getColorLong

Added in 1.1.0-alpha03
public final @ColorLong long getColorLong()

The color that will replace the input color, as a @ColorLong.

hashCode

public int hashCode()

toString

public @NonNull String toString()

withColorIntArgb

Added in 1.1.0-alpha03
public static final @NonNull BrushPaint.ColorFunction.ReplaceColor withColorIntArgb(@ColorInt int colorIntArgb)

Returns a color function that will replace its input color with the given color.

withColorLong

Added in 1.1.0-alpha03
public static final @NonNull BrushPaint.ColorFunction.ReplaceColor withColorLong(@ColorLong long colorLong)

Returns a color function that will replace its input color with the given color.