Class Quad

All Implemented Interfaces:
PointerInterface

public class Quad extends Record
A 4 vertex quadrilateral, as represented by four #graphene_point_t.

The contents of a #graphene_quad_t are private and should never be
accessed directly.

https://ebassi.github.io/graphene/docs/

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • allocQuad

      public static Quad allocQuad()
      Allocates a new #graphene_quad_t instance.

      The contents of the returned instance are undefined.
      Returns:
      the newly created #graphene_quad_t instance
    • bounds

      public void bounds(@Nonnull Rect r)
      Computes the bounding rectangle of @q and places it into @r.
      Parameters:
      r - return location for a #graphene_rect_t
    • contains

      public boolean contains(@Nonnull Point p)
      Checks if the given #graphene_quad_t contains the given #graphene_point_t.
      Parameters:
      p - a #graphene_point_t
      Returns:
      `true` if the point is inside the #graphene_quad_t
    • free

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

      public Quad init(@Nonnull Point p1, @Nonnull Point p2, @Nonnull Point p3, @Nonnull Point p4)
      Initializes a #graphene_quad_t with the given points.
      Parameters:
      p1 - the first point of the quadrilateral
      p2 - the second point of the quadrilateral
      p3 - the third point of the quadrilateral
      p4 - the fourth point of the quadrilateral
      Returns:
      the initialized #graphene_quad_t
    • initFromRect

      public Quad initFromRect(@Nonnull Rect r)
      Initializes a #graphene_quad_t using the four corners of the
      given #graphene_rect_t.
      Parameters:
      r - a #graphene_rect_t
      Returns:
      the initialized #graphene_quad_t
    • 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()