public class Pie extends AbstractRectangleBasedGeometry<T,S> implements IShape
Pie is a closed AbstractArcBasedGeometry. It is the
complement of the Arc, which is an open
AbstractArcBasedGeometry.
The Pie covers an area, therefore it implements the IShape
interface.| Modifier and Type | Field and Description |
|---|---|
protected Angle |
angularExtent
The counter-clockwise (CCW)
Angle that spans this
AbstractArcBasedGeometry. |
protected Angle |
startAngle
The counter-clockwise (CCW)
Angle to the x-axis at which this
AbstractArcBasedGeometry begins. |
| Constructor and Description |
|---|
Pie(AbstractRectangleBasedGeometry<?,?> r,
Angle startAngle,
Angle angularExtent)
Constructs a new
Pie from the given values. |
Pie(Arc arc)
|
Pie(double x,
double y,
double width,
double height,
Angle startAngle,
Angle angularExtent)
Constructs a new
Pie from the given values. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Overridden with public visibility as recommended within
Cloneable
. |
protected CubicCurve[] |
computeBezierApproximation()
Computes a
CubicCurve approximation for this
AbstractArcBasedGeometry. |
boolean |
contains(IGeometry g)
|
boolean |
contains(Point p)
|
Angle |
getAngularExtent()
|
Rectangle |
getBounds()
|
Pie |
getCopy()
Returns a new identical copy of this
IGeometry. |
PolyBezier |
getOutline()
|
BezierCurve[] |
getOutlineSegments()
|
Point |
getP1()
Returns the start
Point of this AbstractArcBasedGeometry. |
Point |
getP2()
Returns the end
Point of this AbstractArcBasedGeometry. |
Point |
getPoint(Angle angularExtent)
Computes a
Point on this AbstractArcBasedGeometry. |
Path |
getRotatedCCW(Angle angle)
|
Path |
getRotatedCCW(Angle angle,
double cx,
double cy)
|
Path |
getRotatedCCW(Angle angle,
Point center)
|
Path |
getRotatedCW(Angle angle)
|
Path |
getRotatedCW(Angle angle,
double cx,
double cy)
|
Path |
getRotatedCW(Angle angle,
Point center)
|
Angle |
getStartAngle()
Returns this
AbstractArcBasedGeometry's start Angle. |
CurvedPolygon |
getTransformed(AffineTransform t)
|
double |
getX1()
Returns the x coordinate of the start
Point of this
AbstractArcBasedGeometry. |
double |
getX2()
Returns the x coordinate of the end
Point of this
AbstractArcBasedGeometry. |
double |
getY1()
Returns the y coordinate of the start
Point of this
AbstractArcBasedGeometry. |
double |
getY2()
Returns the y coordinate of the end
Point of this
AbstractArcBasedGeometry. |
int |
hashCode() |
T |
setAngularExtent(Angle angularExtent)
Sets the extension
Angle of this AbstractArcBasedGeometry
. |
T |
setStartAngle(Angle startAngle)
Sets the start
Angle of this AbstractArcBasedGeometry. |
Path |
toPath()
|
boolean |
touches(IGeometry g)
|
expand, expand, getCenter, getExpanded, getExpanded, getHeight, getLocation, getScaled, getScaled, getScaled, getScaled, getScaled, getScaled, getShrinked, getShrinked, getSize, getTranslated, getTranslated, getWidth, getX, getY, scale, scale, scale, scale, scale, scale, setBounds, setBounds, setBounds, setHeight, setLocation, setLocation, setSize, setSize, setWidth, setX, setY, shrink, shrink, translate, translateprotected Angle startAngle
Angle to the x-axis at which this
AbstractArcBasedGeometry begins.public Pie(AbstractRectangleBasedGeometry<?,?> r, Angle startAngle, Angle angularExtent)
Pie from the given values.public Pie(Arc arc)
public Pie(double x,
double y,
double width,
double height,
Angle startAngle,
Angle angularExtent)
Pie from the given values.x - The x-coordinate of the rectangular area which encloses thie
Pie.y - The y-coordinate of the rectangular area which encloses thie
Pie.width - The width of the rectangular area which encloses thie
Pie.height - The height of the rectangular area which encloses thie
Pie.startAngle - The counter-clockwise (CCW) Angle to the x-axis at
which this Pie begins.angularExtent - The counter-clockwise (CCW) Angle that spans this
Pie.AbstractArcBasedGeometry.AbstractArcBasedGeometry(double, double,
double, double, Angle, Angle)public Pie getCopy()
IGeometryIGeometry.getCopy in interface IGeometryIGeometryIGeometry.getCopy()public PolyBezier getOutline()
IShapegetOutline in interface IShapeICurve representing this IShape's outline.public BezierCurve[] getOutlineSegments()
IShapegetOutlineSegments in interface IShapeICurve segments of this IShape's outline.public Path getRotatedCCW(Angle angle)
IRotatableAngle counter-clock-wise
(CCW) around its center Point. Does not necessarily return an
object of the same type.getRotatedCCW in interface IRotatable<Path>angle - rotation AngleIGeometry representing the result of the rotationpublic Path getRotatedCCW(Angle angle, double cx, double cy)
IRotatableAngle
counter-clock-wise (CCW) around the specified center Point (cx,
cy). Does not necessarily return an object of the same type.getRotatedCCW in interface IRotatable<Path>angle - rotation Anglecx - x-coordinate of the relative Point for the rotationcy - y-coordinate of the relative Point for the rotationIGeometry representing the result of the rotationpublic Path getRotatedCCW(Angle angle, Point center)
IRotatableAngle
counter-clock-wise (CCW) around the specified center Point. Does
not necessarily return an object of the same type.getRotatedCCW in interface IRotatable<Path>angle - rotation Anglecenter - relative Point for the rotationIGeometry representing the result of the rotationpublic Path getRotatedCW(Angle angle)
IRotatableAngle clock-wise (CW)
around its center Point. Does not necessarily return an object of
the same type.getRotatedCW in interface IRotatable<Path>angle - rotation AngleIGeometry representing the result of the rotationpublic Path getRotatedCW(Angle angle, double cx, double cy)
IRotatableAngle clock-wise (CW)
around the specified center Point (cx, cy). Does not necessarily
return an object of the same type.getRotatedCW in interface IRotatable<Path>angle - rotation Anglecx - x-coordinate of the relative Point for the rotationcy - y-coordinate of the relative Point for the rotationIGeometry representing the result of the rotationpublic Path getRotatedCW(Angle angle, Point center)
IRotatableAngle clock-wise (CW)
around the specified center Point. Does not necessarily return an
object of the same type.getRotatedCW in interface IRotatable<Path>angle - rotation Anglecenter - relative Point for the rotationIGeometry representing the result of the rotationpublic CurvedPolygon getTransformed(AffineTransform t)
Path
representation of this IGeometry. Subclasses may override this
method to return a more specific representation.getTransformed in interface IGeometrygetTransformed in interface IShapet - The AffineTransform to be appliedPath representation of this
IGeometryIGeometry.getTransformed(AffineTransform)public Path toPath()
IGeometrytoPath in interface IGeometryPath representation for this IGeometry.IGeometry.toPath()protected CubicCurve[] computeBezierApproximation()
CubicCurve approximation for this
AbstractArcBasedGeometry. It is approximated by a maximum of four
CubicCurves, each of which covers a maximum of 90 degrees.CubicCurve approximation for this
AbstractArcBasedGeometrypublic Angle getAngularExtent()
Angle of this
AbstractArcBasedGeometry, i.e. the Angle defining the
span of this AbstractArcBasedGeometry.Angle of this
AbstractArcBasedGeometrypublic Point getP1()
Point of this AbstractArcBasedGeometry.Point of this AbstractArcBasedGeometrypublic Point getP2()
Point of this AbstractArcBasedGeometry.Point of this AbstractArcBasedGeometrypublic Angle getStartAngle()
AbstractArcBasedGeometry's start Angle.AbstractArcBasedGeometry's start Anglepublic double getX1()
Point of this
AbstractArcBasedGeometry.Point of this
AbstractArcBasedGeometrypublic double getX2()
Point of this
AbstractArcBasedGeometry.Point of this
AbstractArcBasedGeometrypublic double getY1()
Point of this
AbstractArcBasedGeometry.Point of this
AbstractArcBasedGeometrypublic double getY2()
Point of this
AbstractArcBasedGeometry.Point of this
AbstractArcBasedGeometrypublic T setAngularExtent(Angle angularExtent)
Angle of this AbstractArcBasedGeometry
.angularExtent - the new extension Angle for this
AbstractArcBasedGeometrythis for conveniencepublic T setStartAngle(Angle startAngle)
Angle of this AbstractArcBasedGeometry.startAngle - the new start Angle for this
AbstractArcBasedGeometrythis for conveniencepublic java.lang.Object clone()
Cloneable
.clone in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()Copyright (c) 2014 itemis AG, and others. All rights reserved.