|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsm.SMShape
sm.SMPolyLine
An arbitrary shape for use with an SMCanvas
.
If filled, the fill paint is used to paint the interior.
If outlined, the outline paint and stroke are used to draw the boundary.
The shape is build using path operators such as lineTo
.
Field Summary |
Fields inherited from class sm.SMShape |
cptId |
Constructor Summary | |
SMPolyLine(double x,
double y)
Builds a SMPolyLine with an initial point (x, y). |
|
SMPolyLine(double x,
double y,
java.awt.Paint p)
Builds a SMPolyLine with an initial point (x, y). |
|
SMPolyLine(double x,
double y,
java.awt.Paint p,
java.awt.Paint o)
Builds a SMPolyLine with an initial point (x, y). |
|
SMPolyLine(double x,
double y,
java.awt.Paint p,
java.awt.Paint o,
java.awt.Stroke str)
Builds a SMPolyLine with an initial point (x, y). |
|
SMPolyLine(double x,
double y,
java.awt.Paint p,
java.awt.Stroke str)
Builds a SMPolyLine with an initial point (x, y). |
|
SMPolyLine(double x,
double y,
java.awt.Stroke str)
Builds a SMPolyLine with an initial point (x, y). |
|
SMPolyLine(java.awt.geom.Point2D pt)
Builds a SMPolyLine with an initial point pt. |
|
SMPolyLine(java.awt.geom.Point2D pt,
java.awt.Paint p)
Builds a SMPolyLine with an initial point pt. |
|
SMPolyLine(java.awt.geom.Point2D pt,
java.awt.Paint p,
java.awt.Paint o)
Builds a SMPolyLine with an initial point pt. |
|
SMPolyLine(java.awt.geom.Point2D pt,
java.awt.Paint p,
java.awt.Paint o,
java.awt.Stroke str)
Builds a SMPolyLine with an initial point pt. |
|
SMPolyLine(java.awt.geom.Point2D pt,
java.awt.Paint p,
java.awt.Stroke str)
Builds a SMPolyLine with an initial point pt. |
|
SMPolyLine(java.awt.geom.Point2D pt,
java.awt.Stroke str)
Builds a SMPolyLine with an initial point pt. |
Method Summary | |
SMPolyLine |
arcTo(double start,
double extent,
double rx,
double ry)
Adds an arc segment to this polyline. |
SMPolyLine |
close()
Closes this polyLine by drawing a straight line from the current point to the starting point. |
SMShape |
copyTo(SMShape sms)
Copies this shape into a destination shape. |
SMPolyLine |
curveTo(double ctrlx1,
double ctrly1,
double ctrlx2,
double ctrly2,
double xEnd,
double yEnd)
Adds a cubic curve segment to this polyline. |
SMPolyLine |
curveTo(java.awt.geom.Point2D ptCtrl1,
java.awt.geom.Point2D ptCtrl2,
java.awt.geom.Point2D ptEnd)
Adds a cubic curve segment to this polyline. |
SMShape |
duplicate()
Creates a new copy of this shape and returns it. |
java.awt.geom.Point2D |
getCurrentPoint()
|
SMPolyLine |
lineTo(double x,
double y)
Adds a line segment to this polyline from the current point to point (x, y). |
SMPolyLine |
lineTo(java.awt.geom.Point2D pt)
Adds a line segment to this polyline from the current point to point pt. |
SMPolyLine |
moveTo(double x,
double y)
Sets the current point of this polyLine to point (x, y). |
SMPolyLine |
moveTo(java.awt.geom.Point2D pt)
Sets the current point of this polyLine to point pt. |
SMPolyLine |
quadTo(double ctrlx1,
double ctrly1,
double xEnd,
double yEnd)
Adds a quadric curve segment to this polyline. |
SMPolyLine |
quadTo(java.awt.geom.Point2D ptCtrl,
java.awt.geom.Point2D ptEnd)
Adds a quadric curve segment to this polyline. |
SMPolyLine |
removeLastSegment()
Removes the last segment of this polyline, if any. |
SMPolyLine |
reset(double x,
double y)
Resets this polyline to the unique point (x, y). |
SMPolyLine |
reset(java.awt.geom.Point2D pt)
Resets this polyline to the unique point pt. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SMPolyLine(double x, double y, java.awt.Paint p, java.awt.Paint o, java.awt.Stroke str)
x
- The x coordinate of the initial pointy
- The y coordinate of the initial pointp
- The fill paint style of this SMPolyLineo
- The outline paint style of this SMPolyLinestr
- The outline style of this SMPolyLinepublic SMPolyLine(java.awt.geom.Point2D pt, java.awt.Paint p, java.awt.Paint o, java.awt.Stroke str)
pt
- The initial pointp
- The fill paint style of this SMPolyLineo
- The outline paint style of this SMPolyLinestr
- The outline style of this SMPolyLinepublic SMPolyLine(double x, double y, java.awt.Paint p, java.awt.Paint o)
x
- The x coordinate of the initial pointy
- The y coordinate of the initial pointp
- The fill paint style of this SMPolyLineo
- The outline paint style of this SMPolyLinepublic SMPolyLine(java.awt.geom.Point2D pt, java.awt.Paint p, java.awt.Paint o)
pt
- The initial pointp
- The fill paint style of this SMPolyLineo
- The outline paint style of this SMPolyLinepublic SMPolyLine(double x, double y, java.awt.Paint p, java.awt.Stroke str)
x
- The x coordinate of the initial pointy
- The y coordinate of the initial pointp
- The fill paint style of this SMPolyLinestr
- The outline style of this SMPolyLinepublic SMPolyLine(java.awt.geom.Point2D pt, java.awt.Paint p, java.awt.Stroke str)
pt
- The initial pointp
- The fill paint style of this SMPolyLinestr
- The outline style of this SMPolyLinepublic SMPolyLine(double x, double y, java.awt.Paint p)
x
- The x coordinate of the initial pointy
- The y coordinate of the initial pointp
- The fill paint style of this SMPolyLinepublic SMPolyLine(java.awt.geom.Point2D pt, java.awt.Paint p)
pt
- The initial pointp
- The fill paint style of this SMPolyLinepublic SMPolyLine(double x, double y, java.awt.Stroke str)
x
- The x coordinate of the initial pointy
- The y coordinate of the initial pointstr
- The outline style of this SMPolyLinepublic SMPolyLine(java.awt.geom.Point2D pt, java.awt.Stroke str)
pt
- The initial pointstr
- The outline style of this SMPolyLinepublic SMPolyLine(double x, double y)
x
- The x coordinate of the initial pointy
- The y coordinate of the initial pointpublic SMPolyLine(java.awt.geom.Point2D pt)
pt
- The initial pointMethod Detail |
public SMPolyLine reset(double x, double y)
x
- The x coordinate of the initial pointy
- The y coordinate of the initial point
public SMPolyLine reset(java.awt.geom.Point2D pt)
pt
- The point
public SMPolyLine lineTo(double x, double y)
x
- The x coordinate of the last pointy
- the y coordinate of the last point
public SMPolyLine lineTo(java.awt.geom.Point2D pt)
pt
- The point
public SMPolyLine moveTo(double x, double y)
x
- The x coordinate of the current point to sety
- the y coordinate of the current point to set
public SMPolyLine moveTo(java.awt.geom.Point2D pt)
pt
- The point
public SMPolyLine arcTo(double start, double extent, double rx, double ry)
start
- The starting angle of the ellipseextent
- The extent angle of the arcrx
- The x radius of the ellipsery
- The y radius of the ellipse
public java.awt.geom.Point2D getCurrentPoint()
public SMPolyLine quadTo(double ctrlx1, double ctrly1, double xEnd, double yEnd)
ctrlx1
- The x coordinate of the first Bezier control pointctrly1
- The y coordinate of the first Bezier control pointxEnd
- The x coordinate of the end pointyEnd
- The y coordinate of the end point
public SMPolyLine quadTo(java.awt.geom.Point2D ptCtrl, java.awt.geom.Point2D ptEnd)
ptCtrl
- The first Bezier control pointptEnd
- The end point
public SMPolyLine curveTo(double ctrlx1, double ctrly1, double ctrlx2, double ctrly2, double xEnd, double yEnd)
ctrlx1
- The x coordinate of the first Bezier control pointctrly1
- The y coordinate of the first Bezier control pointctrlx2
- The x coordinate of the second Bezier control pointctrly2
- The y coordinate of the second Bezier control pointxEnd
- The x coordinate of the ending pointyEnd
- The y coordinate of the ending point
public SMPolyLine curveTo(java.awt.geom.Point2D ptCtrl1, java.awt.geom.Point2D ptCtrl2, java.awt.geom.Point2D ptEnd)
ptCtrl1
- The first Bezier control pointptCtrl2
- The second Bezier control pointptEnd
- The ending point
public SMPolyLine close()
public SMPolyLine removeLastSegment()
public SMShape copyTo(SMShape sms)
SMShape
copyTo
in class SMShape
sms
- The destination shape
public SMShape duplicate()
duplicate
in class SMShape
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |