Class hb_glyph_extents_t

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<hb_glyph_extents_t>
org.lwjgl.util.harfbuzz.hb_glyph_extents_t
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class hb_glyph_extents_t extends org.lwjgl.system.Struct<hb_glyph_extents_t> implements org.lwjgl.system.NativeResource
Glyph extent values, measured in font units.

Note that height is negative, in coordinate systems that grow up.

Layout


 struct hb_glyph_extents_t {
     hb_position_t x_bearing();
     hb_position_t y_bearing();
     hb_position_t width();
     hb_position_t height();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int X_BEARING
      The struct member offsets.
    • Y_BEARING

      public static final int Y_BEARING
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

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

    • hb_glyph_extents_t

      public hb_glyph_extents_t(ByteBuffer container)
      Creates a hb_glyph_extents_t 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<hb_glyph_extents_t>
    • x_bearing

      public int x_bearing()
      distance from the x-origin to the left extremum of the glyph
    • y_bearing

      public int y_bearing()
      distance from the top extremum of the glyph to the y-origin
    • width

      public int width()
      distance from the left extremum of the glyph to the right extremum
    • height

      public int height()
      distance from the top extremum of the glyph to the bottom extremum
    • x_bearing

      public hb_glyph_extents_t x_bearing(int value)
      Sets the specified value to the x_bearing() field.
    • y_bearing

      public hb_glyph_extents_t y_bearing(int value)
      Sets the specified value to the y_bearing() field.
    • width

      public hb_glyph_extents_t width(int value)
      Sets the specified value to the width() field.
    • height

      public hb_glyph_extents_t height(int value)
      Sets the specified value to the height() field.
    • set

      public hb_glyph_extents_t set(int x_bearing, int y_bearing, int width, int height)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static hb_glyph_extents_t.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new hb_glyph_extents_t.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
    • nx_bearing

      public static int nx_bearing(long struct)
      Unsafe version of x_bearing().
    • ny_bearing

      public static int ny_bearing(long struct)
      Unsafe version of y_bearing().
    • nwidth

      public static int nwidth(long struct)
      Unsafe version of width().
    • nheight

      public static int nheight(long struct)
      Unsafe version of height().
    • nx_bearing

      public static void nx_bearing(long struct, int value)
      Unsafe version of x_bearing.
    • ny_bearing

      public static void ny_bearing(long struct, int value)
      Unsafe version of y_bearing.
    • nwidth

      public static void nwidth(long struct, int value)
      Unsafe version of width.
    • nheight

      public static void nheight(long struct, int value)
      Unsafe version of height.