GpsGate Server JavaScript API

Geometry  1.0.0

GpsGate Server JavaScript API > Geometry > Franson.Geometry.Bounds
Search:
 
Filters

Class Franson.Geometry.Bounds - extends Bounds

similar to Google's GBounds todo: be able to take points[] as input also? (or Iterable)

Constructor

Franson.Geometry.Bounds(x, y, w, h)
Parameters:
x <number>
y <number>
w <number> width
h <number> height

Properties

h - number

height

w - number

width

x - number


y - number


Properties inherited from Bounds:

h, w, x, y

Methods

containsBounds

boolean containsBounds(bounds)
Parameters:
bounds <Franson.Geometry.Bounds>
Returns: boolean

containsPoint

boolean containsPoint(pos)
Parameters:
pos <(x,y)>
Returns: boolean

extend

self extend(point)
Parameters:
point <(x,y)>
Returns: self
Chainable: This method is chainable.

getCenter

Point getCenter()
Returns: Point

getPosition

(x,y) getPosition()
most functions needing (x,y) input should be able to take the entire bounds as input. but might sometimes be useful to isolate x,y
Returns: (x,y)

getSize

(w,h) getSize()
most functions needing (w,h) input should be able to take the entire bounds as input. but might sometimes be useful to isolate w,h
Returns: (w,h)

intersects

boolean intersects(bounds)
Parameters:
bounds <Franson.Geometry.Bounds>
Returns: boolean

isEmpty

boolean isEmpty()
Returns: boolean

max

(x,y) max()
Returns: (x,y)

min

(x,y) min()
Returns: (x,y)


Copyright © 2009 Franson Technology AB, Sweden. All rights reserved.