java.lang.Object
overrungl.Pointer
overrungl.Struct
overrungl.glfw.GLFWImage
overrungl.glfw.GLFWImage.Buffer
- All Implemented Interfaces:
Addressable
,ArrayPointer
- Enclosing class:
GLFWImage
Buffer
relies on preview features of the Java platform:
Buffer
refers to one or more preview APIs:MemorySegment
,SegmentAllocator
.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
This describes 2D images.
- Since:
- 0.1.0
- Author:
- squid233
-
Nested Class Summary
Nested classes/interfaces inherited from class overrungl.glfw.GLFWImage
GLFWImage.Buffer
-
Field Summary
Fields inherited from class overrungl.Pointer
address, allocator, managedSegment
-
Constructor Summary
ConstructorDescriptionBuffer
(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator, long elementCount) Create aGLFWImage.Buffer
instance. -
Method Summary
Modifier and TypeMethodDescriptionint
height()
Gets the image height.height
(int height) Sets the image height.height
(long index, int height) Sets the image height at the given index.int
heightAt
(long index) Gets the image height at the given index.pixels()
Gets the image pixels address.pixels
(long index, MemorySegmentPREVIEW pixels) Sets the image pixels address at the given index.pixels
(MemorySegmentPREVIEW pixels) Sets the image pixels address.pixelsAt
(long index) Gets the image pixels address at the given index.int
width()
Gets the image width.width
(int width) Sets the image width.width
(long index, int width) Sets the image width at the given index.int
widthAt
(long index) Gets the image width at the given index.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface overrungl.Addressable
address
Methods inherited from interface overrungl.ArrayPointer
elementCount
-
Constructor Details
-
Buffer
Create aGLFWImage.Buffer
instance.- Parameters:
address
- the address.allocator
- the allocator of this address.elementCount
- the element count
-
-
Method Details
-
width
Sets the image width at the given index.- Parameters:
index
- the indexwidth
- The width, in pixels, of this image.- Returns:
- this
-
height
Sets the image height at the given index.- Parameters:
index
- the indexheight
- The height, in pixels, of this image.- Returns:
- this
-
pixels
Sets the image pixels address at the given index.- Parameters:
index
- the indexpixels
- The pixel data address of this image, arranged left-to-right, top-to-bottom.- Returns:
- this
-
width
Description copied from class:GLFWImage
Sets the image width. -
height
Description copied from class:GLFWImage
Sets the image height. -
pixels
Description copied from class:GLFWImage
Sets the image pixels address. -
widthAt
public int widthAt(long index) Gets the image width at the given index.- Parameters:
index
- the index- Returns:
- The width, in pixels, of this image.
-
heightAt
public int heightAt(long index) Gets the image height at the given index.- Parameters:
index
- the index- Returns:
- The height, in pixels, of this image.
-
pixelsAt
Gets the image pixels address at the given index.- Parameters:
index
- the index- Returns:
- The pixel data address of this image, arranged left-to-right, top-to-bottom.
-
width
public int width()Description copied from class:GLFWImage
Gets the image width. -
height
public int height()Description copied from class:GLFWImage
Gets the image height. -
pixels
Description copied from class:GLFWImage
Gets the image pixels address.
-
Buffer
when preview features are enabled.