public class Curve extends DrawObject
Constructor and Description |
---|
Curve()
Object path under General Path
|
Curve(java.awt.Paint p) |
Curve(java.lang.String s) |
Curve(java.lang.String s,
java.awt.Paint p) |
Modifier and Type | Method and Description |
---|---|
void |
curveTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3) |
void |
draw(java.awt.Graphics2D g2) |
void |
lineTo(float x,
float y) |
void |
moveTo(float x,
float y)
Adds a point to the path by moving to the specified coordinates.
|
void |
quadTo(float x1,
float y1,
float x2,
float y2) |
void |
reset()
This method will reset the curve to empty.
|
void |
resetPath()
This method will reset the points in the to empty
|
public Curve()
public Curve(java.awt.Paint p)
p
- specifies colours for the graphpublic Curve(java.lang.String s)
s
- : specifies the curvepublic Curve(java.lang.String s, java.awt.Paint p)
s
- : curve specificationp
- : colour specificationpublic void lineTo(float x, float y)
x
- : x coordinatey
- : y coordinatepublic void moveTo(float x, float y)
x
- : x coordinatey
- : y coordinatepublic void reset()
reset
in class DrawObject
public void resetPath()
public void quadTo(float x1, float y1, float x2, float y2)
x1
- y1 x2 y2 : coordinate specifierspublic void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
x1
- y1 x2 y2 x3 y3 : curve's coordinate specifierspublic void draw(java.awt.Graphics2D g2)
draw
in class DrawObject
graph.DrawObject#draw(java.awt.Graphics2D)