Class ChartGraphics_svg

java.lang.Object
eu.bandm.music.applications.tabstaff.ChartGraphics
eu.bandm.music.applications.tabstaff.ChartGraphics_svg

public class ChartGraphics_svg extends ChartGraphics
New implementation variant which uses the SVG library JSVG. See JSVG homepage.
  • Field Details Link icon

    • svgDocument Link icon

      com.jsevy.jsvg.SVGDocument svgDocument
      Needed as global reference for adding the transparency animation.
    • start Link icon

      float start
      Global input register for adding the transparency animation.
    • end Link icon

      float end
      Global input register for adding the transparency animation.
    • articulationDistance Link icon

      float articulationDistance
      Duration (in seconds) subtracted from the end of a keypress, to visually indicate key repetitions.
    • stroke_slim Link icon

      BasicStroke stroke_slim
    • stroke_fat Link icon

      BasicStroke stroke_fat
    • boldFont Link icon

      Font boldFont
  • Constructor Details Link icon

  • Method Details Link icon

    • writeSequenceOfSvgs Link icon

      public void writeSequenceOfSvgs(String fileStem)
      Create one static SVG diagram for each time point. The rational value of the time point is encoded in the file name and shown above the key grid.
      Specified by:
      writeSequenceOfSvgs in class ChartGraphics
    • writeToDynamicSVG Link icon

      public void writeToDynamicSVG(File file) throws IOException
      Create an animated SVG file which shows the sequence of key presses. Assumes BPM 60.
      Specified by:
      writeToDynamicSVG in class ChartGraphics
      Throws:
      IOException
    • writeSvgEvent Link icon

      void writeSvgEvent(Graphics2D gr, Event e)
      Generate the graphic representation of one particular event from the score.
      Parameters:
      end - if ==FLOAT.POSITIVE_INFINITY then NO ANUMATION AD ALL shall be applied.
    • putAnimation Link icon

      void putAnimation()
      Set the last created svg element to non-transparent (= visible) only for the time interval from start to end. Add no animation att all iff end == POSITIVE_INFINITY.
    • initGraphics Link icon

      void initGraphics()
      Initialize the resources needed for drawing.
    • svg_fullGrid Link icon

      public void svg_fullGrid(Graphics2D gr, ChartGraphics.rank[] ranks)
      Construct the code for a complete key display, with the pre-selected coun of rows and columns.
      Parameters:
      ranks - give how to paint the squares representing the keys at the coordinates (1,1) (1,2) .. (1,8) (2,1) .. (8,8)
    • diamond Link icon

      Path2D diamond(double x, double y)
    • x_diamond Link icon

      public void x_diamond(Graphics2D gr, boolean attack, int column, int row)
      Generate the svg code for a diamond symbol for a key press.
    • x_square Link icon

      public void x_square(Graphics2D gr, boolean attack, int column, int row)
      Generate the svg code for a diamond symbol for a key press.
    • x_circle Link icon

      public void x_circle(Graphics2D gr, boolean attack, int column, int row)
      Generate the svg code for a diamond symbol for a key press.
    • tie Link icon

      void tie(Graphics2D gr, int column, int row)
      Generate an "arriving" tie symbol. This decorates silent fingerchange events.
    • number Link icon

      public void number(Graphics2D gr, int column, int row, int finger, Color color)
      Generate the svg source for printing the finger number.