Class NkDrawList

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • CLIP_RECT, CIRCLE_VTX, CONFIG, BUFFER, VERTICES, ELEMENTS, ELEMENT_COUNT, VERTEX_COUNT, CMD_COUNT, CMD_OFFSET, PATH_COUNT, PATH_OFFSET, LINE_AA, SHAPE_AA, USERDATA

        The struct member offsets.
    • Constructor Detail

      • NkDrawList

        public NkDrawList​(java.nio.ByteBuffer container)
        Creates a NkDrawList 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
      • clip_rect

        public NkRect clip_rect()
        Returns a NkRect view of the clip_rect field.
      • clip_rect

        public NkDrawList clip_rect​(java.util.function.Consumer<NkRect> consumer)
        Passes the clip_rect field to the specified Consumer.
      • circle_vtx

        public NkVec2.Buffer circle_vtx()
        Returns a NkVec2.Buffer view of the circle_vtx field.
      • circle_vtx

        public NkVec2 circle_vtx​(int index)
        Returns a NkVec2 view of the struct at the specified index of the circle_vtx field.
      • config

        public NkDrawList config​(java.util.function.Consumer<NkConvertConfig> consumer)
        Passes the config field to the specified Consumer.
      • buffer

        @Nullable
        public NkBuffer buffer()
        Returns a NkBuffer view of the struct pointed to by the buffer field.
      • vertices

        @Nullable
        public NkBuffer vertices()
        Returns a NkBuffer view of the struct pointed to by the vertices field.
      • elements

        @Nullable
        public NkBuffer elements()
        Returns a NkBuffer view of the struct pointed to by the elements field.
      • element_count

        public int element_count()
        Returns the value of the element_count field.
      • vertex_count

        public int vertex_count()
        Returns the value of the vertex_count field.
      • cmd_count

        public int cmd_count()
        Returns the value of the cmd_count field.
      • cmd_offset

        public long cmd_offset()
        Returns the value of the cmd_offset field.
      • path_count

        public int path_count()
        Returns the value of the path_count field.
      • path_offset

        public int path_offset()
        Returns the value of the path_offset 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.
      • userdata

        public NkHandle userdata()
        Returns a NkHandle view of the userdata field.
      • userdata

        public NkDrawList userdata​(java.util.function.Consumer<NkHandle> consumer)
        Passes the userdata field to the specified Consumer.
      • malloc

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

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

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

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

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

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

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

        public static NkDrawList callocStack()
        Returns a new NkDrawList instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • callocStack

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

        public static NkDrawList.Buffer callocStack​(int capacity)
        Returns a new NkDrawList.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

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

        public static NkRect nclip_rect​(long struct)
        Unsafe version of clip_rect().
      • ncircle_vtx

        public static NkVec2 ncircle_vtx​(long struct,
                                         int index)
        Unsafe version of circle_vtx.
      • nbuffer

        @Nullable
        public static NkBuffer nbuffer​(long struct)
        Unsafe version of buffer().
      • nvertices

        @Nullable
        public static NkBuffer nvertices​(long struct)
        Unsafe version of vertices().
      • nelements

        @Nullable
        public static NkBuffer nelements​(long struct)
        Unsafe version of elements().
      • nelement_count

        public static int nelement_count​(long struct)
        Unsafe version of element_count().
      • nvertex_count

        public static int nvertex_count​(long struct)
        Unsafe version of vertex_count().
      • ncmd_count

        public static int ncmd_count​(long struct)
        Unsafe version of cmd_count().
      • ncmd_offset

        public static long ncmd_offset​(long struct)
        Unsafe version of cmd_offset().
      • npath_count

        public static int npath_count​(long struct)
        Unsafe version of path_count().
      • npath_offset

        public static int npath_offset​(long struct)
        Unsafe version of path_offset().
      • 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().
      • nuserdata

        public static NkHandle nuserdata​(long struct)
        Unsafe version of userdata().