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

Method setPixelRef

shared/java/Bitmap.java:659–669  ·  view source on GitHub ↗

Replaces pixelRef and origin in Bitmap. dx and dy specify the offset within the PixelRef pixels for the top-left corner of the bitmap. Asserts in debug builds if dx or dy are out of range. Pins dx and dy to legal range in release builds. The caller is responsible for ensuring that

(@Nullable PixelRef pixelRef, int dx, int dy)

Source from the content-addressed store, hash-verified

657 * @see <a href="https://fiddle.skia.org/c/@Bitmap_setPixelRef">https://fiddle.skia.org/c/@Bitmap_setPixelRef</a>
658 */
659 @NotNull @Contract("_, _, _ -> this")
660 public Bitmap setPixelRef(@Nullable PixelRef pixelRef, int dx, int dy) {
661 try {
662 _imageInfo = null;
663 Stats.onNativeCall();
664 _nSetPixelRef(_ptr, Native.getPtr(pixelRef), dx, dy);
665 return this;
666 } finally {
667 ReferenceUtil.reachabilityFence(pixelRef);
668 }
669 }
670
671 /**
672 * Returns true if Bitmap can be drawn.

Calls 4

onNativeCallMethod · 0.95
_nSetPixelRefMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected