Class Point

Adaptation of work of Kevin Lindsey(kevin@kevlindev.com)

Hierarchy

  • Point

Implements

Constructors

Properties

x: number
y: number

Methods

  • Adds another point to this one and returns another one

    Parameters

    • that: XY

    Returns Point

    new Point instance with added values

  • Adds another point to this one

    Parameters

    • that: XY

    Returns Point

    thisArg

    Chainable

    Deprecated

  • Returns distance from this point and another one

    Parameters

    • that: XY

    Returns number

  • Returns true if this point is equal to another one

    Parameters

    • that: XY

    Returns boolean

  • Returns true if this point is greater another one

    Parameters

    • that: XY

    Returns boolean

  • Returns true if this point is greater than or equal to another one

    Parameters

    • that: XY

    Returns boolean

  • Returns new point which is the result of linear interpolation with this one and another one

    Parameters

    • that: XY
    • t: number = 0.5

      , position of interpolation, between 0 and 1 default 0.5

    Returns Point

  • Returns true if this point is less than another one

    Parameters

    • that: XY

    Returns boolean

  • Returns true if this point is less than or equal to another one

    Parameters

    • that: XY

    Returns boolean

  • Returns a new point which is the max of this and another one

    Parameters

    • that: XY

    Returns Point

  • Returns the point between this point and another one

    Parameters

    • that: XY

    Returns Point

  • Returns a new point which is the min of this and another one

    Parameters

    • that: XY

    Returns Point

  • Multiplies this point by another value and returns a new one

    Parameters

    • that: XY

    Returns Point

  • Rotates point around origin with radians

    Parameters

    • radians: TRadian

      The radians of the angle for the rotation

    • origin: XY = originZero

      The origin of the rotation

    Returns Point

    The new rotated point

    Static

    Member Of

    fabric.util

  • Adds value to this point and returns a new one

    Parameters

    • scalar: number

    Returns Point

    new Point with added value

  • Adds value to this point

    Parameters

    • scalar: number

    Returns Point

    thisArg

    Chainable

    Deprecated

  • Divides this point by a value and returns a new one

    Parameters

    • scalar: number

    Returns Point

  • Divides this point by a value

    Parameters

    • scalar: number

    Returns Point

    thisArg

    Chainable

    Deprecated

  • Multiplies this point by a value and returns a new one

    Parameters

    • scalar: number

    Returns Point

  • Multiplies this point by a value

    Parameters

    • scalar: number

    Returns Point

    thisArg

    Chainable

    Deprecated

  • Subtracts value from this point and returns a new one

    Parameters

    • scalar: number

    Returns Point

  • Subtracts value from this point

    Parameters

    • scalar: number

    Returns Point

    thisArg

    Chainable

    Deprecated

  • Sets x/y of this point from another point

    Parameters

    • that: XY

    Returns Point

    Chainable

  • Subtracts another point from this point and returns a new one

    Parameters

    • that: XY

    Returns Point

    new Point object with subtracted values

  • Subtracts another point from this point

    Parameters

    • that: XY

    Returns Point

    thisArg

    Chainable

    Deprecated

  • Swaps x/y of this point and another point

    Parameters

    • that: XY

    Returns void

  • Returns string representation of this point

    Returns string

  • Apply transform t to point p

    Parameters

    • t: TMat2D

      The transform

    • Optional ignoreOffset: boolean = false

      Indicates that the offset should not be applied

    Returns Point

    The transformed point

    Static

    Member Of

    fabric.util

Generated using TypeDoc