org.freehep.graphics2d
Class SymbolShape
java.lang.Object
org.freehep.graphics2d.SymbolShape
- All Implemented Interfaces:
- Shape
public class SymbolShape
- extends Object
- implements Shape
This class can be used to create and render simple shapes quickly and without
memory allocation. A common point array is used for all created shapes. The
factory methods don't return a new shape, but set the object to the selected
shape. Hence, the class is not thread-safe and only one PathIterator can be
used at the same time.
- Version:
- $Id: SymbolShape.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Simon Fischer
Method Summary |
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double w,
double h)
|
boolean |
contains(Point2D p)
|
boolean |
contains(Rectangle2D r)
|
void |
create(int symbol,
double x,
double y,
double size)
Type must be one of the symbols defined in VectorGraphicsConstants except
TYPE_CIRCLE. |
Rectangle |
getBounds()
|
Rectangle2D |
getBounds2D()
|
PathIterator |
getPathIterator(AffineTransform t)
|
PathIterator |
getPathIterator(AffineTransform at,
double flatness)
|
boolean |
intersects(double x,
double y,
double w,
double h)
Returns true, if at least one of the points is contained by the shape. |
boolean |
intersects(Rectangle2D r)
|
String |
toString()
|
SymbolShape
public SymbolShape()
contains
public boolean contains(double x,
double y)
- Specified by:
contains
in interface Shape
contains
public boolean contains(double x,
double y,
double w,
double h)
- Specified by:
contains
in interface Shape
contains
public boolean contains(Point2D p)
- Specified by:
contains
in interface Shape
contains
public boolean contains(Rectangle2D r)
- Specified by:
contains
in interface Shape
intersects
public boolean intersects(double x,
double y,
double w,
double h)
- Returns true, if at least one of the points is contained by the shape.
- Specified by:
intersects
in interface Shape
intersects
public boolean intersects(Rectangle2D r)
- Specified by:
intersects
in interface Shape
getPathIterator
public PathIterator getPathIterator(AffineTransform at,
double flatness)
- Specified by:
getPathIterator
in interface Shape
getBounds2D
public Rectangle2D getBounds2D()
- Specified by:
getBounds2D
in interface Shape
getBounds
public Rectangle getBounds()
- Specified by:
getBounds
in interface Shape
getPathIterator
public PathIterator getPathIterator(AffineTransform t)
- Specified by:
getPathIterator
in interface Shape
create
public void create(int symbol,
double x,
double y,
double size)
- Type must be one of the symbols defined in VectorGraphicsConstants except
TYPE_CIRCLE.
- See Also:
VectorGraphicsConstants
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012. All Rights Reserved.