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:
Bufferrefers 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
ConstructorsConstructorDescriptionBuffer(MemorySegmentPREVIEW address, SegmentAllocatorPREVIEW allocator, long elementCount) Create aGLFWImage.Bufferinstance. - 
Method Summary
Modifier and TypeMethodDescriptionintheight()Gets the image height.height(int height) Sets the image height.height(long index, int height) Sets the image height at the given index.intheightAt(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.intwidth()Gets the image width.width(int width) Sets the image width.width(long index, int width) Sets the image width at the given index.intwidthAt(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, waitMethods inherited from interface overrungl.Addressable
addressMethods inherited from interface overrungl.ArrayPointer
elementCount 
- 
Constructor Details
- 
Buffer
Create aGLFWImage.Bufferinstance.- 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:GLFWImageSets the image width. - 
height
Description copied from class:GLFWImageSets the image height. - 
pixels
Description copied from class:GLFWImageSets 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:GLFWImageGets the image width. - 
height
public int height()Description copied from class:GLFWImageGets the image height. - 
pixels
Description copied from class:GLFWImageGets the image pixels address. 
 - 
 
Bufferwhen preview features are enabled.