erase

fun erase(color: Int): Bitmap

Replaces pixel values with color, interpreted as being in the sRGB ColorSpace. All pixels contained by getBounds() are affected. If the getColorType() is ColorType.GRAY_8 or ColorType.RGB_565, then alpha is ignored; RGB is treated as opaque. If getColorType() is ColorType.ALPHA_8, then RGB is ignored.

Parameters

color

unpremultiplied color

See also


fun erase(color: Int, area: IRect): Bitmap

Replaces pixel values inside area with color, interpreted as being in the sRGB ColorSpace. If area does not intersect getBounds(), call has no effect.

If the getColorType() is ColorType.GRAY_8 or ColorType.RGB_565, then alpha is ignored; RGB is treated as opaque. If getColorType() is ColorType.ALPHA_8, then RGB is ignored.

Parameters

color

unpremultiplied color

area

rectangle to fill

See also