MCPcopy Create free account
hub / github.com/HumbleUI/Skija / erase

Method erase

shared/java/Bitmap.java:733–743  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Calls 6

onNativeCallMethod · 0.95
_nErase4fMethod · 0.95
reachabilityFenceMethod · 0.95
_nEraseRect4fMethod · 0.95
_nEraseMethod · 0.95
_nEraseRectMethod · 0.95

Tested by 1

executeMethod · 0.36