Class Point
				
				
			
				
				
				
					
Defined in:  primitives.js.
				
			
| Constructor Attributes | Constructor Name and Description | 
|---|---|
| 
								Point(x, y)
							 Creates an instance of Point | 
| Field Attributes | Field Name and Description | 
|---|---|
| Serialization type | |
| The Style of the Point | |
| The x coordinate of point | |
| The y coordinate of point | 
| Method Attributes | Method Name and Description | 
|---|---|
| clone()
								 Clone current Point | |
| <static> | Point.cloneArray(v)
								 Clones an array of points | 
| contains(x, y)
								 | |
| equals(anotherPoint)
								 Tests if this point is similar to other point | |
| <static> | Point.load(o)
								 Creates a {Point} out of JSON parsed object | 
| <static> | Point.loadArray(v)
								 Creates an array of points from an array of {JSONObject}s | 
| near(x, y, radius)
								 Tests to see if a point (x, y) is within a range of current Point | |
| paint(context)
								 Paint current {Point} withing a context
If you want to use a different style then the default one change the style | |
| toString()
								 | |
| toSVG()
								 We will draw a point a circle. | |
| transform(matrix)
								 | 
					Class Detail
				
				
				
						Point(x, y)
				
				
				
					Creates an instance of Point
					
Author: Alex Gheorghiu
Note: Even if it is named Point this class should be named Dot as Dot is closer
then Point from math perspective..
				 
				
				
				
				
					
						Author: Alex Gheorghiu
- Parameters:
- {Number} x
- The x coordinate of point.
- {Number} y
- The y coordinate of point.
					Field Detail
				
				
					 
					
					
					
					oType
					
					
					
						Serialization type
						
						
					
					
					
						
						
						
						
					
					
					
					style
					
					
					
						The Style of the Point
						
						
					
					
					
						
						
						
						
					
					
					
					x
					
					
					
						The x coordinate of point
						
						
					
					
					
						
						
						
						
					
					
					
					y
					
					
					
						The y coordinate of point
						
						
					
					
					
						
						
						
						
					
				
			
		
			
				
					Method Detail
				
				
					 
					
					
					
					clone()
					
					
					
						Clone current Point
						
						
					
					
					
					
						
						
						
						
						
						
						
					<static> 
					
					
					Point.cloneArray(v)
					
					
					
						Clones an array of points
						
						
					
					
					
					
						
							- Parameters:
- {Array} v
- - the array of {Point}s
- Returns:
- an {Array} of {Point}s
					
					
					contains(x, y)
					
					
					- Parameters:
- x
- y
					
					
					equals(anotherPoint)
					
					
					
						Tests if this point is similar to other point
						
						
					
					
					
					
						
							- Parameters:
- {Point} anotherPoint
- - the other point
					
					
					getBounds()
					
					
					
					
					
					getPoints()
					
					
					<static> 
					
					{Point}
					Point.load(o)
					
					
					
						Creates a {Point} out of JSON parsed object
						
						
Author: Alex Gheorghiu.
					 
					
					
					
						
							Author: Alex Gheorghiu
- Parameters:
- {JSONObject} o
- - the JSON parsed object
- Returns:
- {Point} a newly constructed Point
<static> 
					
					
					Point.loadArray(v)
					
					
					
						Creates an array of points from an array of {JSONObject}s
						
						
					
					
					
					
						
							- Parameters:
- {Array} v
- - the array of JSONObjects
- Returns:
- an {Array} of {Point}s
					
					
					near(x, y, radius)
					
					
					
						Tests to see if a point (x, y) is within a range of current Point
						
						
Author: Alex Gheorghiu.
					 
					
					
					
						
							Author: Alex Gheorghiu
- Parameters:
- {Numeric} x
- - the x coordinate of tested point
- {Numeric} y
- - the x coordinate of tested point
- {Numeric} radius
- - the radius of the vicinity
					
					
					paint(context)
					
					
					
						Paint current {Point} withing a context
If you want to use a different style then the default one change the style
						
						
					
					
					
					
						
							- Parameters:
- context
					
					
					toString()
					
					
					
					
					
					toSVG()
					
					
					
						We will draw a point a circle. The "visual" color and thicknes of the point will
be created by the SVG's element style
						
						
					
					
					
					
						
						
						
						
						
						
						
							- See:
- http://tutorials.jenkov.com/svg/circle-element.html
Example:
					
					
					transform(matrix)
					
					
					- Parameters:
- matrix