Package io.github.humbleui.skija
Class PixelRef
- java.lang.Object
-
- io.github.humbleui.skija.impl.Native
-
- io.github.humbleui.skija.impl.Managed
-
- io.github.humbleui.skija.impl.RefCnt
-
- io.github.humbleui.skija.PixelRef
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class PixelRef extends RefCnt
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.github.humbleui.skija.impl.RefCnt
RefCnt._FinalizerHolder
-
Nested classes/interfaces inherited from class io.github.humbleui.skija.impl.Managed
Managed.CleanerThunk
-
-
Field Summary
-
Fields inherited from class io.github.humbleui.skija.impl.Managed
_cleanable
-
-
Constructor Summary
Constructors Constructor Description PixelRef(long ptr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int_nGetGenerationId(long ptr)static int_nGetHeight(long ptr)static long_nGetRowBytes(long ptr)static int_nGetWidth(long ptr)static boolean_nIsImmutable(long ptr)static void_nNotifyPixelsChanged(long ptr)static void_nSetImmutable(long ptr)intgetGenerationId()Returns a non-zero, unique value corresponding to the pixels in this pixelref.intgetHeight()longgetRowBytes()intgetWidth()booleanisImmutable()Returns true if this pixelref is marked as immutable, meaning that the contents of its pixels will not change for the lifetime of the pixelref.PixelRefnotifyPixelsChanged()Call this if you have changed the contents of the pixels.PixelRefsetImmutable()Marks this pixelref is immutable, meaning that the contents of its pixels will not change for the lifetime of the pixelref.-
Methods inherited from class io.github.humbleui.skija.impl.RefCnt
_nGetFinalizer, _nGetRefCount, getRefCount, toString
-
Methods inherited from class io.github.humbleui.skija.impl.Managed
_nInvokeFinalizer, close, isClosed
-
Methods inherited from class io.github.humbleui.skija.impl.Native
_nativeEquals, equals, getPtr, hashCode
-
-
-
-
Method Detail
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getRowBytes
public long getRowBytes()
-
getGenerationId
public int getGenerationId()
Returns a non-zero, unique value corresponding to the pixels in this pixelref. Each time the pixels are changed (and notifyPixelsChanged is called), a different generation ID will be returned.
-
notifyPixelsChanged
public PixelRef notifyPixelsChanged()
Call this if you have changed the contents of the pixels. This will in- turn cause a different generation ID value to be returned from getGenerationID().
-
isImmutable
public boolean isImmutable()
Returns true if this pixelref is marked as immutable, meaning that the contents of its pixels will not change for the lifetime of the pixelref.
-
setImmutable
public PixelRef setImmutable()
Marks this pixelref is immutable, meaning that the contents of its pixels will not change for the lifetime of the pixelref. This state can be set on a pixelref, but it cannot be cleared once it is set.
-
_nGetWidth
@Internal public static int _nGetWidth(long ptr)
-
_nGetHeight
@Internal public static int _nGetHeight(long ptr)
-
_nGetRowBytes
@Internal public static long _nGetRowBytes(long ptr)
-
_nGetGenerationId
@Internal public static int _nGetGenerationId(long ptr)
-
_nNotifyPixelsChanged
@Internal public static void _nNotifyPixelsChanged(long ptr)
-
_nIsImmutable
@Internal public static boolean _nIsImmutable(long ptr)
-
_nSetImmutable
@Internal public static void _nSetImmutable(long ptr)
-
-