Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Point

Hierarchy

Index

Constructors

constructor

  • new Point(x?: number, y?: number): Point

Properties

Private _x

_x: number

Private _y

_y: number

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

contents

x

  • get x(): number
  • set x(value: number): void

y

  • get y(): number
  • set y(value: number): void

Methods

add

  • add(ax: number, ay: number): Point
  • Adds the point's coordinates with two addends

    Parameters

    • ax: number

      Addend in X direction

    • ay: number

      Addend in Y direction

    Returns Point

    A new point instance

addListener

  • addListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

appendChild

  • appendChild(child: Element): void

divide

  • divide(dx: number, dy: number): Point
  • Divides the point's coordinates by two divisors

    Parameters

    • dx: number

      Divisor in X direction

    • dy: number

      Divisor in Y direction

    Returns Point

    A new point instance

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns ( string | symbol ) []

getHref

  • getHref(): string | undefined

getID

  • getID(): string | undefined

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getOrigin

  • getOrigin(): string | undefined

getTuple

  • getTuple(): [number, number]

getTypeName

  • getTypeName(): string | undefined

getTypeURI

  • getTypeURI(): string | undefined

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

merge

multiply

  • multiply(fx: number, fy: number): Point
  • Multiplies the point's coordinates by two factors

    Parameters

    • fx: number

      Factor in X direction

    • fy: number

      Factor in Y direction

    Returns Point

    A new point instance

on

  • on(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

once

  • once(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeChild

  • removeChild(child: Element): boolean

removeListener

  • removeListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

setID

  • setID(ID: string | undefined): void

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setOrigin

  • setOrigin(origin: string): void

setTypeName

  • setTypeName(name: string | undefined): void

setTypeURI

  • setTypeURI(uri: string | undefined): void

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc