Class ChartGraphics_svg
java.lang.Object
eu.bandm.music.applications.tabstaff.ChartGraphics
eu.bandm.music.applications.tabstaff.ChartGraphics_svg
New implementation variant which uses the SVG library JSVG.
See JSVG homepage.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.music.applications.tabstaff.ChartGraphics
ChartGraphics.rank
-
Field Summary
Modifier and TypeFieldDescription(package private) float
Duration (in seconds) subtracted from the end of a keypress, to visually indicate key repetitions.(package private) Font
(package private) BasicStroke
(package private) BasicStroke
Fields inherited from class eu.bandm.music.applications.tabstaff.ChartGraphics
circleRadius, color_diatonic, color_keypress, color_notDiatonic, color_numberOnFill, dist_x, dist_y, linewidth_fat, linewidth_slim, majorMode, maxCol, maxRow, minorMode, msg, offset_x, offset_y, rotSquareSize, round_x, round_y, score, seconds_per_whole, size_x, size_y, squareSize
-
Constructor Summary
ConstructorDescriptionChartGraphics_svg
(int rows, int cols, Tabstaff score, SimpleMessage.Sender<eu.bandm.tools.util.xml.XMLDocumentIdentifier> msg) -
Method Summary
Modifier and TypeMethodDescription(package private) Path2D
diamond
(int x, int y) (package private) void
void
number
(Graphics2D gr, int column, int row, int finger, Color color) Generate the svg source for printing the finger number.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.(package private) void
tie
(Graphics2D gr, int column, int row) Generate an "arriving" tie symbol.void
writeSequenceOfSvgs
(String fileStem) Create one static SVG diagram for each time point.(package private) void
writeSvgEvent
(Graphics2D gr, Event e) Generate the graphic representation of one particular event from the score.void
writeToDynamicSVG
(File file) Create an animated SVG file which shows the sequence of key presses.void
x_circle
(Graphics2D gr, boolean attack, int column, int row) Generate the svg code for a diamond symbol for a key press.void
x_diamond
(Graphics2D gr, boolean attack, int column, int row) Generate the svg code for a diamond symbol for a key press.void
x_square
(Graphics2D gr, boolean attack, int column, int row) Generate the svg code for a diamond symbol for a key press.Methods inherited from class eu.bandm.music.applications.tabstaff.ChartGraphics
col2coord, coord2index, initialGridPattern, row2coord, scaleToButtons
-
Field Details
-
articulationDistance
float articulationDistanceDuration (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
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 classChartGraphics
-
writeToDynamicSVG
Create an animated SVG file which shows the sequence of key presses. Assumes BPM 60.- Specified by:
writeToDynamicSVG
in classChartGraphics
- Throws:
IOException
-
writeSvgEvent
Generate the graphic representation of one particular event from the score. -
initGraphics
void initGraphics() -
svg_fullGrid
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
-
x_diamond
Generate the svg code for a diamond symbol for a key press. -
x_square
Generate the svg code for a diamond symbol for a key press. -
x_circle
Generate the svg code for a diamond symbol for a key press. -
tie
Generate an "arriving" tie symbol. This decorates silent fingerchange events. -
number
Generate the svg source for printing the finger number.
-