Replaces pixel values with color, interpreted as being in the sRGB. 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
(@NotNull Color4f color)
| 731 | * @see <a href="https://fiddle.skia.org/c/@Bitmap_eraseColor">https://fiddle.skia.org/c/@Bitmap_eraseColor</a> |
| 732 | */ |
| 733 | @NotNull @Contract("_ -> this") |
| 734 | public Bitmap erase(@NotNull Color4f color) { |
| 735 | try { |
| 736 | assert color != null : "Bitmap::erase expected color != null"; |
| 737 | Stats.onNativeCall(); |
| 738 | _nErase4f(_ptr, color._r, color._g, color._b, color._a); |
| 739 | return this; |
| 740 | } finally { |
| 741 | ReferenceUtil.reachabilityFence(this); |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | /** |
| 746 | * Replaces pixel values with color, interpreted as being in the sRGB. |