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

Method extractSubset

shared/java/Bitmap.java:908–916  ·  view source on GitHub ↗

Shares PixelRef with dst. Pixels are not copied; this and dst point to the same pixels; dst.getBounds() are set to the intersection of subset and the original getBounds(). subset may be larger than getBounds(). Any area outside of getBounds() is ignored. Any contents of dst are di

(@NotNull Bitmap dst, @NotNull IRect subset)

Source from the content-addressed store, hash-verified

906 * @see <a href="https://fiddle.skia.org/c/@Bitmap_extractSubset">https://fiddle.skia.org/c/@Bitmap_extractSubset</a>
907 */
908 public boolean extractSubset(@NotNull Bitmap dst, @NotNull IRect subset) {
909 try {
910 Stats.onNativeCall();
911 return _nExtractSubset(_ptr, Native.getPtr(dst), subset._left, subset._top, subset._right, subset._bottom);
912 } finally {
913 ReferenceUtil.reachabilityFence(this);
914 ReferenceUtil.reachabilityFence(dst);
915 }
916 }
917
918 @Nullable
919 public byte[] readPixels() {

Calls 4

onNativeCallMethod · 0.95
_nExtractSubsetMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected