public final class VennLayoutImpl extends Object implements VennLayout
Constructor and Description |
---|
VennLayoutImpl(List<? extends Shape> shapes,
Rectangle2D boundingRectangle)
Create a new venn layout with the specified list of shapes and bounding rectangle.
|
Modifier and Type | Method and Description |
---|---|
void |
addLuneCenter(Point2D luneCenter,
int index,
int... additional)
Add the specified lune center.
|
Rectangle2D |
boundingRectangle()
Return the bounding rectangle of this venn layout.
|
Shape |
get(int index)
Return the shape at the specified index in this venn layout.
|
Point2D |
luneCenter(int index,
int... additional)
Return the lune center of the intersecting area defined by the specified indices.
|
int |
size()
Return the number of shapes in this venn layout.
|
public VennLayoutImpl(List<? extends Shape> shapes, Rectangle2D boundingRectangle)
shapes
- list of shapes, must not be nullboundingRectangle
- bounding rectangle, must not be nullpublic int size()
size
in interface VennLayout
public Shape get(int index)
get
in interface VennLayout
index
- indexpublic Point2D luneCenter(int index, int... additional)
luneCenter
in interface VennLayout
index
- first indexadditional
- variable number of additional indices, if anypublic Rectangle2D boundingRectangle()
boundingRectangle
in interface VennLayout
public void addLuneCenter(Point2D luneCenter, int index, int... additional)
luneCenter
- lune center to add, must not be nullindex
- indexadditional
- variable number of additional indicesCopyright (c) 2009-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).