Class ChartGraphics_byStrings

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

public class ChartGraphics_byStrings extends ChartGraphics
Old implementation variant which generates SVG text by directly constructing Java String values.
  • Field Details

    • xmlDeclaration

      public static final String xmlDeclaration
      First line of any XML file, declaring version = 1.0 and encoding = utf8.
      See Also:
    • articulationDistance

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

  • Method Details

    • svgStartTag

      public static String svgStartTag(int width, int height)
      Start tag which also gives the physical size of the graphic. Width and height are given in pixels.
    • svgStartTag

      public String svgStartTag()
      Start tag which also gives the physical size of the graphic. Width and height are fixed to (8 1/2) times button size, plus the left/top offset.
    • 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(Event e, Writer w) throws IOException
      Generate the graphic representation of one particular event from the score.
      Throws:
      IOException
    • svg_fullGrid

      public String svg_fullGrid(ChartGraphics.rank[] ranks)
      Construct the code for a complete key display, with the pre-selected count 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)
    • x_diamond

      public String x_diamond(boolean attack, int column, int row)
    • x_square

      public String x_square(boolean attack, int column, int row)
      Generate the svg code for a square symbol for pressing a particular key.
    • x_circle

      String x_circle(boolean attack, int column, int row)
    • tie

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

      String number(int column, int row, int finger, Color color)
      Generate the svg source for printing the finger number.