Class Size

All Implemented Interfaces:
PointerInterface

public class Size extends Record
  • Field Details

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setFieldWidth

      public void setFieldWidth(float width)
      the width
    • getFieldWidth

      public float getFieldWidth()
      the width
    • setFieldHeight

      public void setFieldHeight(float height)
      the height
    • getFieldHeight

      public float getFieldHeight()
      the height
    • allocSize

      public static Size allocSize()
      Allocates a new #graphene_size_t.

      The contents of the returned value are undefined.
      Returns:
      the newly allocated #graphene_size_t
    • equal

      public boolean equal(@Nonnull Size b)
      Checks whether the two give #graphene_size_t are equal.
      Parameters:
      b - a #graphene_size_t
      Returns:
      `true` if the sizes are equal
    • free

      public void free()
      Frees the resources allocated by graphene_size_alloc().
    • init

      public Size init(float width, float height)
      Initializes a #graphene_size_t using the given @width and @height.
      Parameters:
      width - the width
      height - the height
      Returns:
      the initialized #graphene_size_t
    • initFromSize

      public Size initFromSize(@Nonnull Size src)
      Initializes a #graphene_size_t using the width and height of
      the given @src.
      Parameters:
      src - a #graphene_size_t
      Returns:
      the initialized #graphene_size_t
    • interpolate

      public void interpolate(@Nonnull Size b, double factor, @Nonnull Size res)
      Linearly interpolates the two given #graphene_size_t using the given
      interpolation @factor.
      Parameters:
      b - a #graphene_size_t
      factor - the linear interpolation factor
      res - return location for the interpolated size
    • scale

      public void scale(float factor, @Nonnull Size res)
      Scales the components of a #graphene_size_t using the given @factor.
      Parameters:
      factor - the scaling factor
      res - return location for the scaled size
    • zero

      public static Size zero()
      A constant pointer to a zero #graphene_size_t, useful for
      equality checks and interpolations.
      Returns:
      a constant size
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()