sofia.graphics.ShapeQuerying |
Methods that query shapes based on position, intersection, or other properties.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract <MyShape extends Shape> MyShape |
getShapeAt(float x, float y, Class<MyShape> cls)
Get one shape of the specified type (if any) that overlaps the
specified location.
| ||||||||||
abstract Shape |
getShapeAt(float x, float y)
Get one shape (if any) that overlaps the specified location.
| ||||||||||
abstract <MyShape extends Shape> MyShape |
getShapeAt(PointF point, Class<MyShape> cls)
Get one shape of a specified type (if any) that overlaps the
specified location.
| ||||||||||
abstract Shape |
getShapeAt(PointF point)
Get one shape (if any) that overlaps the specified location.
| ||||||||||
abstract Set<Shape> |
getShapes()
Gets a set that represents all the shapes currently in this view.
| ||||||||||
abstract <MyShape extends Shape> Set<MyShape> |
getShapes(Class<MyShape> cls)
Get all the shapes of the specified type in this view.
| ||||||||||
abstract <MyShape extends Shape> Set<MyShape> |
getShapesAt(PointF point, Class<MyShape> cls)
Get all the shapes of the specified type overlapping the specified
location.
| ||||||||||
abstract Set<Shape> |
getShapesAt(float x, float y)
Get all the shapes overlapping the specified location.
| ||||||||||
abstract <MyShape extends Shape> Set<MyShape> |
getShapesAt(float x, float y, Class<MyShape> cls)
Get all the shapes of the specified type overlapping the specified
location.
| ||||||||||
abstract Set<Shape> |
getShapesAt(PointF point)
Get all the shapes overlapping the specified location.
|
Get one shape of the specified type (if any) that overlaps the specified location. If multiple shapes overlap that location, the one "in front" (drawn latest) is returned.
x | The x-coordinate of the location to check. |
---|---|
y | The y-coordinate of the location to check. |
cls | Class of shape to look for (passing 'null' will find any object). |
Get one shape (if any) that overlaps the specified location. If multiple shapes overlap that location, the one "in front" (drawn latest) is returned.
x | The x-coordinate of the location to check. |
---|---|
y | The y-coordinate of the location to check. |
Get one shape of a specified type (if any) that overlaps the specified location. If multiple shapes overlap that location, the one "in front" (drawn latest) is returned.
point | The location to check. |
---|---|
cls | Class of shape to look for (passing 'null' will find any object). |
Get one shape (if any) that overlaps the specified location. If multiple shapes overlap that location, the one "in front" (drawn latest) is returned.
point | The location to check. |
---|
Gets a set that represents all the shapes currently in this view. Note that this set is not a copy of the view's shape set; changes to this set will directly affect the view.
Get all the shapes of the specified type in this view.
cls | Class of objects to look for (passing 'null' will find all objects). |
---|
Get all the shapes of the specified type overlapping the specified location.
point | The location to check. |
---|---|
cls | Class of shape to look for (passing 'null' will find any object). |
Get all the shapes overlapping the specified location.
x | The x-coordinate of the location to check. |
---|---|
y | The y-coordinate of the location to check. |
Get all the shapes of the specified type overlapping the specified location.
x | The x-coordinate of the location to check. |
---|---|
y | The y-coordinate of the location to check. |
cls | Class of shape to look for (passing 'null' will find any object). |
Get all the shapes overlapping the specified location.
point | The location to check. |
---|