Class NPatchInfo

java.lang.Object
com.raylib.NPatchInfo

public class NPatchInfo extends Object
NPatchInfo, n-patch layout info
  • Field Details

    • memorySegment

      public final MemorySegment memorySegment
      The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Details

    • NPatchInfo

      public NPatchInfo()
      Construct with auto memory allocator and fields initialized to zero.
    • NPatchInfo

      public NPatchInfo(SegmentAllocator arena)
      Construct with your owm memory allocator and fields not initialized
    • NPatchInfo

      public NPatchInfo(MemorySegment memorySegment)
      Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    • NPatchInfo

      public NPatchInfo(Rectangle source, int left, int top, int right, int bottom, int layout)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      source - Texture source rectangle
      left - Left border offset
      top - Top border offset
      right - Right border offset
      bottom - Bottom border offset
      layout - Layout of the n-patch: 3x3, 1x3 or 3x1
    • NPatchInfo

      public NPatchInfo(SegmentAllocator arena, Rectangle source, int left, int top, int right, int bottom, int layout)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      source - Texture source rectangle
      left - Left border offset
      top - Top border offset
      right - Right border offset
      bottom - Bottom border offset
      layout - Layout of the n-patch: 3x3, 1x3 or 3x1
  • Method Details

    • equals

      public boolean equals(Object o)
      Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getArrayElement

      public NPatchInfo getArrayElement(int index)
    • allocateArray

      public static NPatchInfo allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of NPatchInfo
    • allocateArray

      public static NPatchInfo allocateArray(long elementCount)
      Allocate an array of NPatchInfo
    • getSource

      public Rectangle getSource()
      Texture source rectangle
    • setSource

      public void setSource(Rectangle value)
      Texture source rectangle
    • source

      public Rectangle source()
      Texture source rectangle
    • source

      public NPatchInfo source(Rectangle value)
      Texture source rectangle
    • getLeft

      public int getLeft()
      Left border offset
    • setLeft

      public void setLeft(int value)
      Left border offset
    • left

      public int left()
      Left border offset
    • left

      public NPatchInfo left(int value)
      Left border offset
    • getTop

      public int getTop()
      Top border offset
    • setTop

      public void setTop(int value)
      Top border offset
    • top

      public int top()
      Top border offset
    • top

      public NPatchInfo top(int value)
      Top border offset
    • getRight

      public int getRight()
      Right border offset
    • setRight

      public void setRight(int value)
      Right border offset
    • right

      public int right()
      Right border offset
    • right

      public NPatchInfo right(int value)
      Right border offset
    • getBottom

      public int getBottom()
      Bottom border offset
    • setBottom

      public void setBottom(int value)
      Bottom border offset
    • bottom

      public int bottom()
      Bottom border offset
    • bottom

      public NPatchInfo bottom(int value)
      Bottom border offset
    • getLayout

      public int getLayout()
      Layout of the n-patch: 3x3, 1x3 or 3x1
    • setLayout

      public void setLayout(int value)
      Layout of the n-patch: 3x3, 1x3 or 3x1
    • layout

      public int layout()
      Layout of the n-patch: 3x3, 1x3 or 3x1
    • layout

      public NPatchInfo layout(int value)
      Layout of the n-patch: 3x3, 1x3 or 3x1