Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GrapheneQuad

[14:7] extends: object

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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GrapheneQuad (Handle = null)

    Allocates a new #graphene_quad_t instance. The contents of the returned instance are undefined.

    • @p Handle is an optional native handle or wrapper whose handle to adopt; when the native constructor is called.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • bounds ()

    Computes the bounding rectangle of @q and places it into @r.

    • @p r is return location for a #graphene_rect_t.
    • @r None.
  • contains (object p)

    Checks if the given #graphene_quad_t contains the given #graphene_point_t.

    • @p p is a #graphene_point_t.
    • @r true if the point is inside the #graphene_quad_t.
  • free ()

    Frees the resources allocated by graphene_quad_alloc()

    • @r None.
  • get_point (int index_)

    Retrieves the point of a #graphene_quad_t at the given index.

    • @p index_ is the index of the point to retrieve.
    • @r a #graphene_point_t.
  • init (object p1, object p2, object p3, object p4)

    Initializes a #graphene_quad_t with the given points.

    • @p p1 is the first point of the quadrilateral.
    • @p p2 is the second point of the quadrilateral.
    • @p p3 is the third point of the quadrilateral.
    • @p p4 is the fourth point of the quadrilateral.
    • @r the initialized #graphene_quad_t.
  • init_from_points (list points)

    Initializes a #graphene_quad_t using an array of points.

    • @p points is an array of 4 #graphene_point_t.
    • @r the initialized #graphene_quad_t.
  • init_from_rect (object r)

    Initializes a #graphene_quad_t using the four corners of the given #graphene_rect_t.

    • @p r is a #graphene_rect_t.
    • @r the initialized #graphene_quad_t.