Class NkDrawList.Buffer

    • Constructor Detail

      • Buffer

        public Buffer​(java.nio.ByteBuffer container)
        Creates a new NkDrawList.Buffer instance backed by the specified container. Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by NkDrawList.SIZEOF, and its mark will be undefined.

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

      • Buffer

        public Buffer​(long address,
                      int cap)
    • Method Detail

      • clip_rect

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

        public NkDrawList.Buffer 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.
      • 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.Buffer userdata​(java.util.function.Consumer<NkHandle> consumer)
        Passes the userdata field to the specified Consumer.