Class SVGPath

java.lang.Object
armyc2.c5isr.renderer.utilities.SVGPath

public class SVGPath extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static float
     
    static float
     
    static float
     
    static float
     
    static float
     
    static float
     
    static float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    arc(float x, float y, float r, float sAngle, float eAngle, boolean counterclockwise)
    The arc() method creates an arc/curve (use to create circles.
    void
    arcTo(float x1, float y1, float x2, float y2, float r)
    The arcTo() method creates an arc/curve between two tangents on the canvas.
    void
    bezierCurveTo(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.
     
    int
    The number of this._actions on the path
    void
    lineTo(float x, float y)
    Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified
    void
    moveTo(float x, float y)
    Adds a point to the path by moving to the specified coordinates specified
    void
    quadraticCurveTo(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.
    void
    setLineDash(String dashArray)
     
    void
    shift(int x, int y)
     
    toSVGElement(String stroke, float strokeWidth, String fill, float strokeOpacity, float fillOpacity, String lineCap)
    Arc and ArcTo do not covert currently

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • setLineDash

      public void setLineDash(String dashArray)
    • getBounds

      public Rect getBounds()
    • shift

      public void shift(int x, int y)
    • getLength

      public int getLength()
      The number of this._actions on the path
    • moveTo

      public void moveTo(float x, float y)
      Adds a point to the path by moving to the specified coordinates specified
      Parameters:
      x -
      y -
    • lineTo

      public void lineTo(float x, float y)
      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

      public void bezierCurveTo(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.
      Parameters:
      cp1x -
      cp1y -
      cp2x -
      cp2y -
      x -
      y -
    • quadraticCurveTo

      public void quadraticCurveTo(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.
      Parameters:
      cpx -
      cpy -
      x -
      y -
    • arcTo

      public void arcTo(float x1, float y1, float x2, float y2, float r)
      The arcTo() method creates an arc/curve between two tangents on the canvas.
      Parameters:
      x1 - The x-coordinate of the beginning of the arc
      y1 - The y-coordinate of the beginning of the arc
      x2 - The x-coordinate of the end of the arc
      y2 - The y-coordinate of the end of the arc
      r - The radius of the arc
    • arc

      public void arc(float x, float y, float r, float sAngle, float eAngle, boolean counterclockwise)
      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 circle
      y - The y-coordinate of the center of the circle
      r - The radius of the circle
      sAngle - The starting angle, in degrees (0 is at the 3 -'clock position of the arc's circle)
      eAngle - The ending angle, in degrees
      counterclockwise - 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