Package com.raylib
Class Image
java.lang.Object
com.raylib.Image
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionImage()
Construct with auto memory allocator and fields initialized to zero.Image
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectImage
(MemorySegment data, int width, int height, int mipmaps, int format) Construct with auto memory allocator and fields initialized as specifiedImage
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedImage
(SegmentAllocator arena, MemorySegment data, int width, int height, int mipmaps, int format) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Image
allocateArray
(long elementCount) Allocate an array of Imagestatic Image
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Imageboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalgetArrayElement
(int index) getData()
Image raw dataint
Data format (PixelFormat type)int
Image base heightint
Mipmap levels, 1 by defaultint
getWidth()
Image base widthint
hashCode()
setData
(MemorySegment value) Image raw datasetFormat
(int value) Data format (PixelFormat type)setHeight
(int value) Image base heightsetMipmaps
(int value) Mipmap levels, 1 by defaultsetWidth
(int value) Image base width
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Image
public Image()Construct with auto memory allocator and fields initialized to zero. -
Image
Construct with your owm memory allocator and fields not initialized -
Image
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Image
Construct with auto memory allocator and fields initialized as specified- Parameters:
data
- Image raw datawidth
- Image base widthheight
- Image base heightmipmaps
- Mipmap levels, 1 by defaultformat
- Data format (PixelFormat type)
-
Image
public Image(SegmentAllocator arena, MemorySegment data, int width, int height, int mipmaps, int format) Construct with your own memory allocator and fields initialized as specified- Parameters:
data
- Image raw datawidth
- Image base widthheight
- Image base heightmipmaps
- Mipmap levels, 1 by defaultformat
- Data format (PixelFormat type)
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Image -
allocateArray
Allocate an array of Image -
getData
Image raw data -
setData
Image raw data -
getWidth
public int getWidth()Image base width -
setWidth
Image base width -
getHeight
public int getHeight()Image base height -
setHeight
Image base height -
getMipmaps
public int getMipmaps()Mipmap levels, 1 by default -
setMipmaps
Mipmap levels, 1 by default -
getFormat
public int getFormat()Data format (PixelFormat type) -
setFormat
Data format (PixelFormat type)
-