MCPcopy Create free account
hub / github.com/JetBrains/skija / setPixelRef

Method setPixelRef

shared/java/Bitmap.java:633–643  ·  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

631 * @see <a href="https://fiddle.skia.org/c/@Bitmap_setPixelRef">https://fiddle.skia.org/c/@Bitmap_setPixelRef</a>
632 */
633 @NotNull @Contract("_, _, _ -> this")
634 public Bitmap setPixelRef(@Nullable PixelRef pixelRef, int dx, int dy) {
635 try {
636 _imageInfo = null;
637 Stats.onNativeCall();
638 _nSetPixelRef(_ptr, Native.getPtr(pixelRef), dx, dy);
639 return this;
640 } finally {
641 Reference.reachabilityFence(pixelRef);
642 }
643 }
644
645 /**
646 * Returns true if Bitmap can be drawn.

Callers 2

drawPixelRefMethod · 0.80

Calls 3

onNativeCallMethod · 0.95
_nSetPixelRefMethod · 0.95
getPtrMethod · 0.95

Tested by

no test coverage detected