Class NkConvertConfig

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class NkConvertConfig extends Struct<NkConvertConfig> implements NativeResource

 struct nk_convert_config {
     float global_alpha;
     enum nk_anti_aliasing line_AA;
     enum nk_anti_aliasing shape_AA;
     unsigned int circle_segment_count;
     unsigned int arc_segment_count;
     unsigned int curve_segment_count;
     struct nk_draw_null_texture tex_null;
     struct nk_draw_vertex_layout_element * vertex_layout;
     nk_size vertex_size;
     nk_size vertex_alignment;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • GLOBAL_ALPHA

      public static final int GLOBAL_ALPHA
      The struct member offsets.
    • LINE_AA

      public static final int LINE_AA
      The struct member offsets.
    • SHAPE_AA

      public static final int SHAPE_AA
      The struct member offsets.
    • CIRCLE_SEGMENT_COUNT

      public static final int CIRCLE_SEGMENT_COUNT
      The struct member offsets.
    • ARC_SEGMENT_COUNT

      public static final int ARC_SEGMENT_COUNT
      The struct member offsets.
    • CURVE_SEGMENT_COUNT

      public static final int CURVE_SEGMENT_COUNT
      The struct member offsets.
    • TEX_NULL

      public static final int TEX_NULL
      The struct member offsets.
    • VERTEX_LAYOUT

      public static final int VERTEX_LAYOUT
      The struct member offsets.
    • VERTEX_SIZE

      public static final int VERTEX_SIZE
      The struct member offsets.
    • VERTEX_ALIGNMENT

      public static final int VERTEX_ALIGNMENT
      The struct member offsets.
  • Constructor Details

    • NkConvertConfig

      public NkConvertConfig(ByteBuffer container)
      Creates a NkConvertConfig instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<NkConvertConfig>
    • global_alpha

      public float global_alpha()
      Returns:
      the value of the global_alpha field.
    • line_AA

      public int line_AA()
      Returns:
      the value of the line_AA field.
    • shape_AA

      public int shape_AA()
      Returns:
      the value of the shape_AA field.
    • circle_segment_count

      public int circle_segment_count()
      Returns:
      the value of the circle_segment_count field.
    • arc_segment_count

      public int arc_segment_count()
      Returns:
      the value of the arc_segment_count field.
    • curve_segment_count

      public int curve_segment_count()
      Returns:
      the value of the curve_segment_count field.
    • tex_null

      public NkDrawNullTexture tex_null()
      Returns:
      a NkDrawNullTexture view of the tex_null field.
    • vertex_layout

      public NkDrawVertexLayoutElement.Buffer vertex_layout(int capacity)
      Returns:
      a NkDrawVertexLayoutElement.Buffer view of the struct array pointed to by the vertex_layout field.
    • vertex_size

      public long vertex_size()
      Returns:
      the value of the vertex_size field.
    • vertex_alignment

      public long vertex_alignment()
      Returns:
      the value of the vertex_alignment field.
    • global_alpha

      public NkConvertConfig global_alpha(float value)
      Sets the specified value to the global_alpha field.
    • line_AA

      public NkConvertConfig line_AA(int value)
      Sets the specified value to the line_AA field.
    • shape_AA

      public NkConvertConfig shape_AA(int value)
      Sets the specified value to the shape_AA field.
    • circle_segment_count

      public NkConvertConfig circle_segment_count(int value)
      Sets the specified value to the circle_segment_count field.
    • arc_segment_count

      public NkConvertConfig arc_segment_count(int value)
      Sets the specified value to the arc_segment_count field.
    • curve_segment_count

      public NkConvertConfig curve_segment_count(int value)
      Sets the specified value to the curve_segment_count field.
    • tex_null

      public NkConvertConfig tex_null(NkDrawNullTexture value)
      Copies the specified NkDrawNullTexture to the tex_null field.
    • tex_null

      public NkConvertConfig tex_null(Consumer<NkDrawNullTexture> consumer)
      Passes the tex_null field to the specified Consumer.
    • vertex_layout

      public NkConvertConfig vertex_layout(NkDrawVertexLayoutElement.Buffer value)
      Sets the address of the specified NkDrawVertexLayoutElement.Buffer to the vertex_layout field.
    • vertex_size

      public NkConvertConfig vertex_size(long value)
      Sets the specified value to the vertex_size field.
    • vertex_alignment

      public NkConvertConfig vertex_alignment(long value)
      Sets the specified value to the vertex_alignment field.
    • set

      public NkConvertConfig set(float global_alpha, int line_AA, int shape_AA, int circle_segment_count, int arc_segment_count, int curve_segment_count, NkDrawNullTexture tex_null, NkDrawVertexLayoutElement.Buffer vertex_layout, long vertex_size, long vertex_alignment)
      Initializes this struct with the specified values.
    • set

      public NkConvertConfig set(NkConvertConfig src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static NkConvertConfig malloc()
      Returns a new NkConvertConfig instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static NkConvertConfig calloc()
      Returns a new NkConvertConfig instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static NkConvertConfig create()
      Returns a new NkConvertConfig instance allocated with BufferUtils.
    • create

      public static NkConvertConfig create(long address)
      Returns a new NkConvertConfig instance for the specified memory address.
    • createSafe

      public static @Nullable NkConvertConfig createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static NkConvertConfig.Buffer malloc(int capacity)
      Returns a new NkConvertConfig.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static NkConvertConfig.Buffer calloc(int capacity)
      Returns a new NkConvertConfig.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static NkConvertConfig.Buffer create(int capacity)
      Returns a new NkConvertConfig.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static NkConvertConfig.Buffer create(long address, int capacity)
      Create a NkConvertConfig.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable NkConvertConfig.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static NkConvertConfig malloc(MemoryStack stack)
      Returns a new NkConvertConfig instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static NkConvertConfig calloc(MemoryStack stack)
      Returns a new NkConvertConfig instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static NkConvertConfig.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new NkConvertConfig.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static NkConvertConfig.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new NkConvertConfig.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nglobal_alpha

      public static float nglobal_alpha(long struct)
      Unsafe version of global_alpha().
    • nline_AA

      public static int nline_AA(long struct)
      Unsafe version of line_AA().
    • nshape_AA

      public static int nshape_AA(long struct)
      Unsafe version of shape_AA().
    • ncircle_segment_count

      public static int ncircle_segment_count(long struct)
      Unsafe version of circle_segment_count().
    • narc_segment_count

      public static int narc_segment_count(long struct)
      Unsafe version of arc_segment_count().
    • ncurve_segment_count

      public static int ncurve_segment_count(long struct)
      Unsafe version of curve_segment_count().
    • ntex_null

      public static NkDrawNullTexture ntex_null(long struct)
      Unsafe version of tex_null().
    • nvertex_layout

      public static NkDrawVertexLayoutElement.Buffer nvertex_layout(long struct, int capacity)
      Unsafe version of vertex_layout(int).
    • nvertex_size

      public static long nvertex_size(long struct)
      Unsafe version of vertex_size().
    • nvertex_alignment

      public static long nvertex_alignment(long struct)
      Unsafe version of vertex_alignment().
    • nglobal_alpha

      public static void nglobal_alpha(long struct, float value)
      Unsafe version of global_alpha.
    • nline_AA

      public static void nline_AA(long struct, int value)
      Unsafe version of line_AA.
    • nshape_AA

      public static void nshape_AA(long struct, int value)
      Unsafe version of shape_AA.
    • ncircle_segment_count

      public static void ncircle_segment_count(long struct, int value)
      Unsafe version of circle_segment_count.
    • narc_segment_count

      public static void narc_segment_count(long struct, int value)
      Unsafe version of arc_segment_count.
    • ncurve_segment_count

      public static void ncurve_segment_count(long struct, int value)
      Unsafe version of curve_segment_count.
    • ntex_null

      public static void ntex_null(long struct, NkDrawNullTexture value)
      Unsafe version of tex_null.
    • nvertex_layout

      public static void nvertex_layout(long struct, NkDrawVertexLayoutElement.Buffer value)
      Unsafe version of vertex_layout.
    • nvertex_size

      public static void nvertex_size(long struct, long value)
      Unsafe version of vertex_size.
    • nvertex_alignment

      public static void nvertex_alignment(long struct, long value)
      Unsafe version of vertex_alignment.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate