@Deprecated public class IltLogicalPolygon extends IltLogicalPolyPoints implements Shape, IlpPosition, Cloneable
IltLogicalPolyPoints.PointAndDirection, IltLogicalPolyPoints.TwoPolylines
Constructor and Description |
---|
IltLogicalPolygon()
Deprecated.
Creates a new
IltLogicalPolygon instance. |
IltLogicalPolygon(IlvPoint[] points)
Deprecated.
Creates a new
IltLogicalPolygon instance, connecting given
points. |
IltLogicalPolygon(IlvPoint[] points,
boolean removeRedundant)
Deprecated.
Creates a new
IltLogicalPolygon instance, connecting given
points. |
Modifier and Type | Method and Description |
---|---|
void |
applyTransform(IlvTransformer t)
Deprecated.
Applies a transform to the points, thereby destructively modifying the
polyline and its segments.
|
Object |
clone()
Deprecated.
Creates a copy of this polyline.
|
IltLogicalPolygon |
computeHull()
Deprecated.
Computes the exterior border of the polygon, as a left-turning polygon.
|
IltLogicalPolygon |
computeParallel(double apart,
double miterlimit)
Deprecated.
Returns a parallel polygon.
|
IltLogicalPolyPoints.TwoPolylines |
computeThickLinkShape(double thickness,
double miterlimit)
Deprecated.
Returns the two polylines bounding the result of blowing up this
polyline to a given thickness.
|
static IltLogicalPolygon |
computeUnionHull(IltLogicalPolygon polygon1,
IltLogicalPolygon polygon2)
Deprecated.
Computes the exterior border of the union of two polygons, as a
left-turning polygon.
|
boolean |
contains(double x,
double y)
Deprecated.
|
boolean |
contains(double x,
double y,
double width,
double height)
Deprecated.
|
boolean |
contains(Point2D p)
Deprecated.
|
boolean |
contains(Rectangle2D r)
Deprecated.
|
boolean |
containsInClosure(double x,
double y)
Deprecated.
Determines whether a point is contained in this polygon (inside or
on the border).
|
boolean |
containsInConvexHull(IlvPoint p)
Deprecated.
Determines whether a point is contained in the convex hull of this
polygon.
|
boolean |
containsInInterior(double x,
double y)
Deprecated.
Determines whether a point is contained in the inside area of this
polygon.
|
IltPolygon |
floor()
Deprecated.
Returns a polygon formed by the integers corresponding to this polygon.
|
double |
getArea()
Deprecated.
Returns the area covered by the polygon.
|
IlvPoint |
getGravity2()
Deprecated.
Returns the gravity center of the area covered by the polygon.
|
IltLogicalPolyPoints.PointAndDirection |
getMedian()
Deprecated.
Returns the "midpoint" of the polyline, and the direction of the
segment containing it.
|
int |
getNumberOfPoints()
Deprecated.
Returns the number of points in the polyline.
|
PathIterator |
getPathIterator(AffineTransform transform)
Deprecated.
|
PathIterator |
getPathIterator(AffineTransform at,
double flatness)
Deprecated.
|
void |
insertPoint(IlvPoint p)
Deprecated.
Inserts a point into the nearest segment.
|
void |
insertPoint(int index,
IlvPoint p)
Deprecated.
Inserts a point into a specific segment.
|
boolean |
intersects(double x,
double y,
double width,
double height)
Deprecated.
|
boolean |
intersects(Rectangle2D r)
Deprecated.
|
void |
movePoint(int index,
IlvPoint p)
Deprecated.
Moves a specific point to a new location.
|
void |
removePoint(int index)
Deprecated.
Removes a specific point.
|
void |
removeRedundantPoints()
Deprecated.
Removes all redundant points (points which are between their neighbors).
|
void |
reverse()
Deprecated.
Reverses the order of the points, the order of the segments, and the
directions of the segments.
|
void |
setNumberOfSegments(int numsegs)
Deprecated.
During construction of an instance, this sets the number of segments.
|
void |
setSegment(int index,
IlvPoint from,
IlvPoint to)
Deprecated.
During construction of an instance, this sets a specified segment.
|
IlpPolygon |
upgrade()
Deprecated.
Creates a new
IlpPolyline from this deprecated instance. |
equals, getBounds, getBounds2D, getClosestSegment, getGravity0, getGravity1, getNumberOfSegments, getPoint, getPoints, getPointsCloned, getSegment, getSegments, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
getBounds, getBounds2D
public IltLogicalPolygon()
IltLogicalPolygon
instance. The segments
must be added afterwards.public IltLogicalPolygon(IlvPoint[] points, boolean removeRedundant)
IltLogicalPolygon
instance, connecting given
points.points
- A non-empty array of points.removeRedundant
- Indicates whether redundant points shall be removed.public IltLogicalPolygon(IlvPoint[] points)
IltLogicalPolygon
instance, connecting given
points.points
- A non-empty array of points.public void setNumberOfSegments(int numsegs)
IltLogicalPolyPoints
setNumberOfSegments
in class IltLogicalPolyPoints
public void setSegment(int index, IlvPoint from, IlvPoint to)
IltLogicalPolyPoints
setSegment
in class IltLogicalPolyPoints
index
- satisfies 0 <= index < getNumberOfSegments()public Object clone()
public IlpPolygon upgrade()
IlpPolyline
from this deprecated instance.public int getNumberOfPoints()
getNumberOfPoints
in class IltLogicalPolyPoints
public boolean containsInInterior(double x, double y)
x
- The x coordinate of the point to be tested.y
- The y coordinate of the point to be tested.public boolean containsInClosure(double x, double y)
x
- The x coordinate of the point to be tested.y
- The y coordinate of the point to be tested.public boolean contains(double x, double y)
public boolean contains(Point2D p)
public boolean intersects(double x, double y, double width, double height)
intersects
in interface Shape
public boolean intersects(Rectangle2D r)
intersects
in interface Shape
public boolean contains(double x, double y, double width, double height)
public boolean contains(Rectangle2D r)
public PathIterator getPathIterator(AffineTransform transform)
getPathIterator
in interface Shape
public PathIterator getPathIterator(AffineTransform at, double flatness)
getPathIterator
in interface Shape
public boolean containsInConvexHull(IlvPoint p)
p
- the point to be testedpublic double getArea()
public IlvPoint getGravity2()
public IltLogicalPolyPoints.PointAndDirection getMedian()
getMedian
in class IltLogicalPolyPoints
public IltLogicalPolygon computeParallel(double apart, double miterlimit)
apart
- distance (positive for a parallel to the right of the
polygon, negative for a parallel to the left of the polygon)miterlimit
- see comments in class IltGraphicUtilpublic IltLogicalPolyPoints.TwoPolylines computeThickLinkShape(double thickness, double miterlimit)
This is the same as: new IlpPolyTwoPolylines(computeParallel(-0.5*thickness,miterlimit), computeParallel(0.5*thickness,miterlimit)).
computeThickLinkShape
in class IltLogicalPolyPoints
miterlimit
- see comments in class IltGraphicUtilpublic void applyTransform(IlvTransformer t)
applyTransform
in class IltLogicalPolyPoints
public void reverse()
reverse
in class IltLogicalPolyPoints
public void insertPoint(int index, IlvPoint p)
insertPoint
in class IltLogicalPolyPoints
index
- Satisfies 0 <= index < getNumberOfSegments().p
- The point to be inserted.public void insertPoint(IlvPoint p)
insertPoint
in class IltLogicalPolyPoints
p
- The point to be inserted.public void movePoint(int index, IlvPoint p)
movePoint
in class IltLogicalPolyPoints
index
- Satisfies 0 <= index < getNumberOfPoints().p
- The point to be moved.public void removePoint(int index)
removePoint
in class IltLogicalPolyPoints
index
- Satisfies 0 <= index < getNumberOfPoints().public void removeRedundantPoints()
removeRedundantPoints
in class IltLogicalPolyPoints
public IltLogicalPolygon computeHull()
public static IltLogicalPolygon computeUnionHull(IltLogicalPolygon polygon1, IltLogicalPolygon polygon2)
public IltPolygon floor()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.