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 Imagedata()
Image raw datadata
(MemorySegment value) Image raw databoolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalint
format()
Data format (PixelFormat type)format
(int value) Data format (PixelFormat type)getArrayElement
(int index) getData()
Image raw dataint
Data format (PixelFormat type)int
Image base heightint
Mipmap levels, 1 by defaultint
getWidth()
Image base widthint
hashCode()
int
height()
Image base heightheight
(int value) Image base heightint
mipmaps()
Mipmap levels, 1 by defaultmipmaps
(int value) Mipmap levels, 1 by defaultvoid
setData
(MemorySegment value) Image raw datavoid
setFormat
(int value) Data format (PixelFormat type)void
setHeight
(int value) Image base heightvoid
setMipmaps
(int value) Mipmap levels, 1 by defaultvoid
setWidth
(int value) Image base widthint
width()
Image base widthwidth
(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 -
data
Image raw data -
data
Image raw data -
getWidth
public int getWidth()Image base width -
setWidth
public void setWidth(int value) Image base width -
width
public int width()Image base width -
width
Image base width -
getHeight
public int getHeight()Image base height -
setHeight
public void setHeight(int value) Image base height -
height
public int height()Image base height -
height
Image base height -
getMipmaps
public int getMipmaps()Mipmap levels, 1 by default -
setMipmaps
public void setMipmaps(int value) Mipmap levels, 1 by default -
mipmaps
public int mipmaps()Mipmap levels, 1 by default -
mipmaps
Mipmap levels, 1 by default -
getFormat
public int getFormat()Data format (PixelFormat type) -
setFormat
public void setFormat(int value) Data format (PixelFormat type) -
format
public int format()Data format (PixelFormat type) -
format
Data format (PixelFormat type)
-