Gjsify LogoGjsify Logo

A point with two coordinates.

record

Hierarchy

  • Point

Index

Constructors

Properties

x: number

the X coordinate of the point

field
y: number

the Y coordinate of the point

field
name: string

Methods

  • Checks if the two points a and b point to the same coordinates.

    This function accounts for floating point fluctuations; if you want to control the fuzziness of the match, you can use graphene_point_near() instead.

    Parameters

    Returns boolean

  • free(): void
  • Checks whether the two points a and b are within the threshold of epsilon.

    Parameters

    • b: Graphene.Point

      a #graphene_point_t

    • epsilon: number

      threshold between the two points

    Returns boolean

  • Allocates a new #graphene_point_t structure.

    The coordinates of the returned point are (0, 0).

    It's possible to chain this function with graphene_point_init() or graphene_point_init_from_point(), e.g.:

      graphene_point_t *
    point_new (float x, float y)
    {
    return graphene_point_init (graphene_point_alloc (), x, y);
    }

    graphene_point_t *
    point_copy (const graphene_point_t *p)
    {
    return graphene_point_init_from_point (graphene_point_alloc (), p);
    }

    Returns Graphene.Point

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method