Class NkConvertConfig

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class NkConvertConfig
    extends Struct
    implements NativeResource

    Member documentation

    • global_alpha – global alpha value
    • line_AA – line anti-aliasing flag can be turned off if you are tight on memory. One of:
    • shape_AA – shape anti-aliasing flag can be turned off if you are tight on memory. One of:
    • circle_segment_count – number of segments used for circles: default to 22
    • arc_segment_count – number of segments used for arcs: default to 22
    • curve_segment_count – number of segments used for curves: default to 22
    • null_texture – handle to texture with a white pixel for shape drawing
    • vertex_layout – describes the vertex output format and packing
    • vertex_size – sizeof one vertex for vertex packing
    • vertex_alignment – vertex alignment: Can be optained by NK_ALIGNOF


     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 null_texture;
         struct nk_draw_vertex_layout_element * vertex_layout;
         nk_size vertex_size;
         nk_size vertex_alignment;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • NkConvertConfig

        public NkConvertConfig​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • 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.
      • null_texture

        public NkConvertConfig null_texture​(java.util.function.Consumer<NkDrawNullTexture> consumer)
        Passes the null_texture field to the specified Consumer.
      • 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.
      • 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 null_texture,
                                   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.
        src - the source struct
        this struct
      • createSafe

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

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

        public static NkConvertConfig.Buffer createSafe​(long address,
                                                        int capacity)
        Like create, but returns null if address is NULL.
      • 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().
      • 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.
      • 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.
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        array - the struct array to validate
        count - the number of structs in array