com.sencha.gxt.chart.client.draw.path
Class EllipticalArc

java.lang.Object
  extended by com.sencha.gxt.chart.client.draw.path.PathCommand
      extended by com.sencha.gxt.chart.client.draw.path.EndPointCommand
          extended by com.sencha.gxt.chart.client.draw.path.EllipticalArc

public class EllipticalArc
extends EndPointCommand

A PathCommand that represents a segment of an ellipse.


Constructor Summary
EllipticalArc()
          Creates an elliptical arc PathCommand.
EllipticalArc(double radiusX, double radiusY, double xAxisRotation, int largeArcFlag, int sweepFlag, double x, double y)
          Creates an elliptical arc PathCommand using the given values.
EllipticalArc(double radiusX, double radiusY, double xAxisRotation, int largeArcFlag, int sweepFlag, double x, double y, boolean relative)
          Creates an elliptical arc PathCommand using the given values.
EllipticalArc(EllipticalArc command)
          Creates a copy of the given elliptical arc.
 
Method Summary
 EllipticalArc copy()
          Returns a copy of the path command.
 int getLargeArcFlag()
          Returns the large arc flag of the arc.
 double getRadiusX()
          Returns the radius of the ellipse on its x-axis.
 double getRadiusY()
          Returns the radius of the ellipse on its y-axis.
 int getSweepFlag()
          Returns the sweep flag of the arc.
 double getxAxisRotation()
          Returns the rotation of the ellipse in relation to the current coordinate system.
 boolean nearEqual(PathCommand command)
          Determines equality of two commands using rounded values.
 void setLargeArcFlag(int largeArcFlag)
          Sets the large arc flag of the arc.
 void setRadiusX(double radiusX)
          Sets the radius of the ellipse on its x-axis.
 void setRadiusY(double radiusY)
          Sets the radius of the ellipse on its y-axis.
 void setSweepFlag(int sweepFlag)
          Sets the sweep flag of the arc.
 void setxAxisRotation(double xAxisRotation)
          Sets the rotation of the ellipse in relation to the current coordinate system
 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, toAbsolute
 
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

EllipticalArc

public EllipticalArc()
Creates an elliptical arc PathCommand. Defaults to absolute.


EllipticalArc

public EllipticalArc(double radiusX,
                     double radiusY,
                     double xAxisRotation,
                     int largeArcFlag,
                     int sweepFlag,
                     double x,
                     double y)
Creates an elliptical arc PathCommand using the given values. Defaults to absolute.

Parameters:
radiusX - the radius of the ellipse on its x-axis
radiusY - the radius of the ellipse on its y-axis
xAxisRotation - the rotation of the ellipse in relation to the current coordinate system
largeArcFlag - if 0 then the smaller arc will be used, if 1 then the larger
sweepFlag - if 0 then the arc will be in a negative angle, if 1 then in a positive angle
x - the x-coordinate of the end of the segment
y - the y-coordinate of the end of the segment

EllipticalArc

public EllipticalArc(double radiusX,
                     double radiusY,
                     double xAxisRotation,
                     int largeArcFlag,
                     int sweepFlag,
                     double x,
                     double y,
                     boolean relative)
Creates an elliptical arc PathCommand using the given values.

Parameters:
radiusX - the radius of the ellipse on its x-axis
radiusY - the radius of the ellipse on its y-axis
xAxisRotation - the rotation of the ellipse in relation to the current coordinate system
largeArcFlag - if 0 then the smaller arc will be used, if 1 then the larger
sweepFlag - if 0 then the arc will be in a negative angle, if 1 then in a positive angle
x - the x-coordinate of the end of the segment
y - the y-coordinate of the end of the segment
relative - true if the command is relative

EllipticalArc

public EllipticalArc(EllipticalArc command)
Creates a copy of the given elliptical arc.

Parameters:
command - the arc to be copied
Method Detail

copy

public EllipticalArc copy()
Description copied from class: PathCommand
Returns a copy of the path command.

Specified by:
copy in class PathCommand
Returns:
a copy of the path command

getLargeArcFlag

public int getLargeArcFlag()
Returns the large arc flag of the arc.

Returns:
the large arc flag of the arc

getRadiusX

public double getRadiusX()
Returns the radius of the ellipse on its x-axis.

Returns:
the radius of the ellipse on its x-axis

getRadiusY

public double getRadiusY()
Returns the radius of the ellipse on its y-axis.

Returns:
the radius of the ellipse on its y-axis

getSweepFlag

public int getSweepFlag()
Returns the sweep flag of the arc.

Returns:
the sweep flag of the arc

getxAxisRotation

public double getxAxisRotation()
Returns the rotation of the ellipse in relation to the current coordinate system.

Returns:
the rotation of the ellipse in relation to the current coordinate system

nearEqual

public boolean nearEqual(PathCommand command)
Description copied from class: PathCommand
Determines equality of two commands using rounded values.

Specified by:
nearEqual in class PathCommand
Parameters:
command - the command to compare
Returns:
true if equal and false otherwise

setLargeArcFlag

public void setLargeArcFlag(int largeArcFlag)
Sets the large arc flag of the arc.

Parameters:
largeArcFlag - if 0 then the smaller arc will be used, if 1 then the larger

setRadiusX

public void setRadiusX(double radiusX)
Sets the radius of the ellipse on its x-axis.

Parameters:
radiusX - the radius of the ellipse on its x-axis

setRadiusY

public void setRadiusY(double radiusY)
Sets the radius of the ellipse on its y-axis.

Parameters:
radiusY - the radius of the ellipse on its y-axis

setSweepFlag

public void setSweepFlag(int sweepFlag)
Sets the sweep flag of the arc.

Parameters:
sweepFlag - if 0 then the arc will be in a negative angle, if 1 then in a positive angle

setxAxisRotation

public void setxAxisRotation(double xAxisRotation)
Sets the rotation of the ellipse in relation to the current coordinate system

Parameters:
xAxisRotation - the rotation of the ellipse in relation to the current coordinate system

toCurve

public CurveTo toCurve(PrecisePoint currentPoint,
                       PrecisePoint movePoint,
                       PrecisePoint curvePoint,
                       PrecisePoint quadraticPoint)
Description copied from class: PathCommand
Converts the PathCommand to a CurveTo command. If a MoveTo no conversion takes place, but the current move point is updated.

Specified by:
toCurve in class PathCommand
Parameters:
currentPoint - the current point of the path
movePoint - the frame of reference for the path
curvePoint - the frame of reference for the Bézier
quadraticPoint - the beginning of the last quadratic curve
Returns:
the converted command

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.