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

    • articulationDistance

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

      BasicStroke stroke_slim
    • stroke_fat

      BasicStroke stroke_fat
    • boldFont

      Font boldFont
  • Constructor Details

    • ChartGraphics_svg

      public ChartGraphics_svg(int rows, int cols, Tabstaff score, SimpleMessage.Sender<eu.bandm.tools.util.xml.XMLDocumentIdentifier> msg)
  • Method Details

    • writeSequenceOfSvgs

      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

      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

      void writeSvgEvent(Graphics2D gr, Event e)
      Generate the graphic representation of one particular event from the score.
    • initGraphics

      void initGraphics()
    • svg_fullGrid

      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

      Path2D diamond(int x, int y)
    • x_diamond

      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

      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

      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

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

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