Class Group
Defined in: groups.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Group()
Group is ONLY a logical grouping of some figures.
|
Field Attributes | Field Name and Description |
---|---|
Group's id
|
|
Serialization type
|
|
By default all groups are temporary.
|
|
An {Array} of 2 {Point}s that keeps the rotation of the Group
|
Method Attributes | Method Name and Description |
---|---|
clone()
Clone this group
|
|
contains(x, y)
See if a group contains a point
|
|
equals(group)
Compares to another Group
|
|
Get a group bounds
|
|
Get all points of a Group (collect them from all figures)
|
|
<static> |
Group.load(o)
Creates a {Group} out of JSON parsed object
|
<static> |
Group.loadArray(v)
Creates a new {Array} of {Group}s out of JSON parsed object
|
near(x, y, radius)
See if a point is near a group, within a radius
|
|
paint(context)
Group is not painted.
|
|
toString()
String representation of a Group
|
|
transform(matrix)
Transform the group
|
Class Detail
Group()
Group is ONLY a logical grouping of some figures.
It does not paint itself and it does not change the Z-Order of member figures
Author: Alex, Zack Newsham zack_newsham@yahoo.co.uk.
Author: Alex, Zack Newsham zack_newsham@yahoo.co.uk.
Field Detail
id
Group's id
oType
Serialization type
permanent
By default all groups are temporary....so it's up to you make them permanent
rotationCoords
An {Array} of 2 {Point}s that keeps the rotation of the Group
Method Detail
{Group}
clone()
Clone this group
- Returns:
- {Group} - the clone of current group
contains(x, y)
See if a group contains a point
- Parameters:
- {Number} x
- - the x coordinate of the point
- {Number} y
- - the y coordinate of the point
{Boolean}
equals(group)
Compares to another Group
- Parameters:
- {Group} group
- - - the other glue
- Returns:
- {Boolean} - true if equals, false otherwise
getBounds()
Get a group bounds
getPoints()
Get all points of a Group (collect them from all figures)
<static>
{Group}
Group.load(o)
Creates a {Group} out of JSON parsed object
Author: Alex Gheorghiu.
Author: Alex Gheorghiu
- Parameters:
- {JSONObject} o
- - the JSON parsed object
- Returns:
- {Group} a newly constructed Group
<static>
{Array}
Group.loadArray(v)
Creates a new {Array} of {Group}s out of JSON parsed object
Author: Alex Gheorghiu.
Author: Alex Gheorghiu
- Parameters:
- {JSONObject} v
- - the JSON parsed object
- Returns:
- {Array} of newly constructed {Group}s
near(x, y, radius)
See if a point is near a group, within a radius
- Parameters:
- {Number} x
- - the x coordinate of the point
- {Number} y
- - the y coordinate of the point
- {Number} radius
- - the radius to search for
paint(context)
Group is not painted. It is only a mental group
- Parameters:
- context
toString()
String representation of a Group
transform(matrix)
Transform the group
- Parameters:
- {Matrix} matrix
- - the transformation matrix