|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.chart.client.draw.path.PathCommand
com.sencha.gxt.chart.client.draw.path.EndPointCommand
com.sencha.gxt.chart.client.draw.path.CurveToSmooth
public class CurveToSmooth
A PathCommand that represents a shorthand cubic Bézier segment. The
first control point is assumed to be the reflection of the second control
point on the previous command relative to the current point.
| Constructor Summary | |
|---|---|
CurveToSmooth()
Creates a shorthand curve PathCommand. |
|
CurveToSmooth(CurveToSmooth curveto)
Creates a copy of the given shorthand curve PathCommand. |
|
CurveToSmooth(double x2,
double y2,
double x,
double y)
Creates a shorthand curve PathCommand with the given points. |
|
CurveToSmooth(double x2,
double y2,
double x,
double y,
boolean relative)
Creates a curve PathCommand with the given points. |
|
| Method Summary | |
|---|---|
CurveToSmooth |
copy()
Returns a copy of the path command. |
double |
getX2()
Returns the x-coordinate of the ending control point of the curve |
double |
getY2()
Returns the y-coordinate of the ending control point of the curve |
boolean |
nearEqual(PathCommand command)
Determines equality of two commands using rounded values. |
void |
setX2(double x2)
Sets the x-coordinate of the ending control point of the curve. |
void |
setY2(double y2)
Sets the y-coordinate of the ending control point of the curve. |
void |
toAbsolute(PrecisePoint currentPoint,
PrecisePoint movePoint)
Converts the path commands to absolute coordinates using the given frame of reference and the last move. |
CurveTo |
toCurve(PrecisePoint currentPoint,
PrecisePoint movePoint,
PrecisePoint curvePoint,
PrecisePoint quadraticPoint)
Converts the PathCommand to a CurveTo command. |
String |
toString()
|
| Methods inherited from class com.sencha.gxt.chart.client.draw.path.EndPointCommand |
|---|
getX, getY, setX, setY |
| Methods inherited from class com.sencha.gxt.chart.client.draw.path.PathCommand |
|---|
isRelative, setRelative |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CurveToSmooth()
PathCommand. Defaults to absolute.
public CurveToSmooth(CurveToSmooth curveto)
PathCommand.
curveto - the shorthand curve to copy
public CurveToSmooth(double x2,
double y2,
double x,
double y)
PathCommand with the given points.
Defaults to absolute.
x2 - the x-coordinate of the ending control point of the curvey2 - the y-coordinate of the ending control point of the curvex - the x-coordinate of the end of the segmenty - the y-coordinate of the end of the segment
public CurveToSmooth(double x2,
double y2,
double x,
double y,
boolean relative)
PathCommand with the given points. Defaults to
absolute.
x2 - the x-coordinate of the ending control point of the curvey2 - the y-coordinate of the ending control point of the curvex - the x-coordinate of the end of the segmenty - the y-coordinate of the end of the segmentrelative - true if the command is relative| Method Detail |
|---|
public CurveToSmooth copy()
PathCommand
copy in class PathCommandpublic double getX2()
public double getY2()
public boolean nearEqual(PathCommand command)
PathCommand
nearEqual in class PathCommandcommand - the command to compare
public void setX2(double x2)
x2 - the x-coordinate of the ending control point of the curvepublic void setY2(double y2)
y2 - the y-coordinate of the ending control point of the curve
public void toAbsolute(PrecisePoint currentPoint,
PrecisePoint movePoint)
PathCommand
toAbsolute in class EndPointCommandcurrentPoint - frame of referencemovePoint - last move point
public CurveTo toCurve(PrecisePoint currentPoint,
PrecisePoint movePoint,
PrecisePoint curvePoint,
PrecisePoint quadraticPoint)
PathCommandPathCommand to a CurveTo command. If a
MoveTo no conversion takes place, but the current move point is
updated.
toCurve in class PathCommandcurrentPoint - the current point of the pathmovePoint - the frame of reference for the pathcurvePoint - the frame of reference for the BézierquadraticPoint - the beginning of the last quadratic curve
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||