Package armyc2.c5isr.renderer.utilities
Class SVGPath
java.lang.Object
armyc2.c5isr.renderer.utilities.SVGPath
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic floatstatic floatstatic floatstatic floatstatic floatstatic floatstatic float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidarc(float x, float y, float r, float sAngle, float eAngle, boolean counterclockwise) The arc() method creates an arc/curve (use to create circles.voidarcTo(float x1, float y1, float x2, float y2, float r) The arcTo() method creates an arc/curve between two tangents on the canvas.voidbezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y) Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates (x,y), using the specified points (cp1x,xp1y) and (cp2x,cp2y) as Bézier control points.intThe number of this._actions on the pathvoidlineTo(float x, float y) Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specifiedvoidmoveTo(float x, float y) Adds a point to the path by moving to the specified coordinates specifiedvoidquadraticCurveTo(float cpx, float cpy, float x, float y) Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates (x,y), using the specified point (cpx,cpy) as a quadratic parametric control point.voidsetLineDash(String dashArray) voidshift(float x, float y) toSVGElement(String stroke, float strokeWidth, String fill, float strokeOpacity, float fillOpacity, String lineCap) Arc and ArcTo do not covert currently
-
Field Details
-
ACTION_MOVE_TO
-
ACTION_LINE_TO
-
ACTION_CURVE_TO
-
ACTION_QUAD_TO
-
ACTION_ARC_TO
-
ACTION_ARC
-
ACTION_DASHED_LINE_TO
-
-
Constructor Details
-
SVGPath
public SVGPath()
-
-
Method Details
-
setLineDash
-
getBounds
-
shift
-
getLength
The number of this._actions on the path -
moveTo
Adds a point to the path by moving to the specified coordinates specified- Parameters:
x-y-
-
lineTo
Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified- Parameters:
x-y-
-
bezierCurveTo
Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates (x,y), using the specified points (cp1x,xp1y) and (cp2x,cp2y) as Bézier control points.- Parameters:
cp1x-cp1y-cp2x-cp2y-x-y-
-
quadraticCurveTo
Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates (x,y), using the specified point (cpx,cpy) as a quadratic parametric control point.- Parameters:
cpx-cpy-x-y-
-
arcTo
The arcTo() method creates an arc/curve between two tangents on the canvas.- Parameters:
x1- The x-coordinate of the beginning of the arcy1- The y-coordinate of the beginning of the arcx2- The x-coordinate of the end of the arcy2- The y-coordinate of the end of the arcr- The radius of the arc
-
arc
The arc() method creates an arc/curve (use to create circles. or parts of circles).- Parameters:
x- The x-coordinate of the center of the circley- The y-coordinate of the center of the circler- The radius of the circlesAngle- The starting angle, in degrees (0 is at the 3 -'clock position of the arc's circle)eAngle- The ending angle, in degreescounterclockwise- Optional. Specifies wheter the drawing should be counterclockwise or clockwise. False=clockwise, true=counter-clockwise;
-
toSVGElement
public String toSVGElement(String stroke, float strokeWidth, String fill, float strokeOpacity, float fillOpacity, String lineCap) Arc and ArcTo do not covert currently
-