com.approximatrix.charting.render.shape
Class Triangle2D
java.lang.Object
java.awt.geom.RectangularShape
com.approximatrix.charting.render.shape.Triangle2D
- All Implemented Interfaces:
- java.awt.Shape, java.lang.Cloneable
public class Triangle2D
- extends java.awt.geom.RectangularShape
This class implements a triangular shape.
- Author:
- smueller
|
Field Summary |
protected double |
height
|
protected boolean |
upsidedown
|
protected double |
width
|
protected double |
x
|
protected double |
y
|
|
Constructor Summary |
Triangle2D(double x,
double y,
double width,
double height,
boolean upsidedown)
Creates a new instance of Triangle2D |
|
Method Summary |
boolean |
contains(double param,
double param1)
|
boolean |
contains(double param,
double param1,
double param2,
double param3)
|
java.awt.geom.Rectangle2D |
getBounds2D()
|
double |
getHeight()
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform affineTransform)
|
double |
getWidth()
|
double |
getX()
|
double |
getY()
|
boolean |
intersects(double x,
double y,
double w,
double h)
|
boolean |
isEmpty()
|
void |
setFrame(double x,
double y,
double width,
double height)
|
| Methods inherited from class java.awt.geom.RectangularShape |
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x
protected double x
y
protected double y
width
protected double width
height
protected double height
upsidedown
protected boolean upsidedown
Triangle2D
public Triangle2D(double x,
double y,
double width,
double height,
boolean upsidedown)
- Creates a new instance of Triangle2D
contains
public boolean contains(double param,
double param1)
contains
public boolean contains(double param,
double param1,
double param2,
double param3)
intersects
public boolean intersects(double x,
double y,
double w,
double h)
getBounds2D
public java.awt.geom.Rectangle2D getBounds2D()
getHeight
public double getHeight()
- Specified by:
getHeight in class java.awt.geom.RectangularShape
getPathIterator
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform affineTransform)
getWidth
public double getWidth()
- Specified by:
getWidth in class java.awt.geom.RectangularShape
getX
public double getX()
- Specified by:
getX in class java.awt.geom.RectangularShape
getY
public double getY()
- Specified by:
getY in class java.awt.geom.RectangularShape
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in class java.awt.geom.RectangularShape
setFrame
public void setFrame(double x,
double y,
double width,
double height)
- Specified by:
setFrame in class java.awt.geom.RectangularShape