Modifier and Type | Method and Description |
---|---|
void |
add(Area area)
Adds the given shape of the specified area to the shape of this area.
|
boolean |
clean(double tolerance)
Cleans the area from near points based on the given tolerance value.
|
static MArea |
create()
Returns an empty area.
|
static MArea |
create(Area area)
Creates an area with the given area.
|
static MArea |
create(Collection<? extends Area> areas)
Creates an union area with the given areas.
|
static MArea |
create(List<? extends Vector2d> polygonPoints)
Creates an area with the given polygon points.
|
static MArea |
create(Polygon2d polygon,
double offset)
Creates an area with the given polygon and resize value.
|
static MArea |
create(Shape shape)
Creates an area with the given
Shape . |
void |
intersect(Area area)
Sets the shape of this area to the intersection of its current shape and
the shape of the given specified area.
|
void |
removeHoles()
Removes the holes from this area.
|
void |
reset()
Removes all of the geometry from this area and restores it to an empty
area.
|
void |
resize(double offset)
Resizes the area with the given offset value.
|
void |
resize(double offset,
boolean roundCorners)
Resizes the area with the given offset value.
|
void |
scale(double multiplier)
Scales the area with the given value.
|
void |
subtract(Area area)
Subtracts the shape of the specified area from the shape of this area.
|
contains, getBoundingRectangle, getCentroid, getHoles, getLargestPolygon, getMinimumBoundingRectangle, getPolygons, getSize, getVertices, isEmpty, isSingular
static MArea create()
static MArea create(List<? extends Vector2d> polygonPoints)
static MArea create(Area area)
static MArea create(Collection<? extends Area> areas)
static MArea create(Polygon2d polygon, double offset)
static MArea create(Shape shape)
Shape
. The returned area does not take
ownership of the given area.void add(Area area)
area
- the area to be added to the current areaNullPointerException
- if area is nullboolean clean(double tolerance)
tolerance
- the tolerance between points and segments of the area
that is used to clean the areavoid intersect(Area area)
area
- the area to be intersected with current areaNullPointerException
- if area is nullvoid reset()
void scale(double multiplier)
multiplier
- the value that is used to scale the areavoid resize(double offset)
offset
- the offset that is used to resize the areavoid resize(double offset, boolean roundCorners)
offset
- the offset that is used to resize the arearoundCorners
- if true, use an intermediate point to round sharp cornersvoid subtract(Area area)
area
- the area to be subtracted from the current areaNullPointerException
- if area is nullvoid removeHoles()
Copyright © 2019 Solibri, Inc.. All rights reserved.