Package com.softsynth.jmsl.score
Interface MusicCurveRenderer
- All Known Implementing Classes:
MusicCurveRendererTest
,MusicGlyphRendererTest
public interface MusicCurveRenderer
-
Method Summary
Modifier and Type Method Description void
draw(java.awt.Graphics g, java.lang.String graphicsCommand, java.util.Hashtable properties)
Here's what you get in the hashtable when this callback happens:
-
Method Details
-
draw
void draw(java.awt.Graphics g, java.lang.String graphicsCommand, java.util.Hashtable properties)Here's what you get in the hashtable when this callback happens:
STAFF LINES properties.put("zoom", new Double(zoom)); properties.put("x1", new Double(drawingAnchor.x)); properties.put("y1", new Double(y)); properties.put("x2", new Double(drawingAnchor.x + w)); properties.put("y2", new Double(y)); properties.put("StaffLineIndex", new Double(i)); properties.put("staff", this); properties.put("selected", isSelected); String graphicsCommand = "StaffLine"; LEDGER LINES properties.put("zoom", new Double(zoom)); properties.put("x1", new Double(xPosLeft)); properties.put("y1", new Double(yPos)); properties.put("x2", new Double(xPosRight)); properties.put("y2", new Double(yPos)); properties.put("LedgerLineIndex", new Double(i)); properties.put("note", note); String graphicsCommand = "LedgerLine"; For ties and slurs imagine an arc bounded by a wide flat rectangle SLURS properties.put("zoom", new Double(zoom)); properties.put("x", new Double(rectX)); properties.put("y", new Double(rectY)); properties.put("width", new Double(rectWidth)); properties.put("height", new Double(rectHeight)); properties.put("curvature", "down" : "up"); properties.put("note1", firstNoteOfSlur); properties.put("note2", lastNoteOfSlur); String graphicsCommand = "Slur"; TIE properties.put("zoom", new Double(zoom)); properties.put("x", new Double(rectX)); properties.put("y", new Double(rectY)); properties.put("width", new Double(rectWidth)); properties.put("height", new Double(rectHeight)); properties.put("curvature", "down" : "up"); properties.put("note1", n1); properties.put("note2", n2); String graphicsCommand = "Tie"; TIED OUT (when the note is tied to the next but is the last in a system) properties.put("zoom", new Double(zoom)); properties.put("x", new Double(rectX)); properties.put("y", new Double(rectY)); properties.put("height", new Double(rectHeight)); properties.put("width", new Double(rectWidth)); properties.put("curvature", "down" : "up"); properties.put("note", n1); String graphicsCommand = "TieOut"; TIED IN (when the note is tied in from the previous but is the first note in a system) properties.put("zoom", new Double(zoom)); properties.put("x", new Double(n1.getDrawingAnchor().x)); properties.put("y", new Double(n1.getDrawingAnchor().y)); properties.put("height", new Double(rectHeight)); properties.put("curvature", "down" : "up"); properties.put("note", n1); String graphicsCommand = "TieIn"; CRESC/DECRESC properties.put("zoom", new Double(zoom)); properties.put("x1", new Double(x1)); properties.put("x2", new Double(x2)); properties.put("y", new Double(y)); properties.put("startContinued", new Boolean(startContinued)); properties.put("endContinued", new Boolean(endContinued)); properties.put("n1", n1); properties.put("n2", n2); String graphicsCommand = "decresc"; if (isCresc) { graphicsCommand = "cresc"; } BARLINES properties.put("zoom", new Double(zoom)); properties.put("x", new Double(x)); properties.put("barTop", new Double(barTop)); properties.put("barBottom", new Double(barBottom)); properties.put("barThickness", new Double(thickness)); properties.put("measure", measure); String graphicsCommand = "barline"; REPEATDOTS properties.put("zoom", new Double(zoom)); properties.put("x", new Double(x)); properties.put("y", new Double(y)); properties.put("levelOfTopLine", new Double(staff.levelOfTopLine())); properties.put("staff", staff); String graphicsCommand = "RepeatDots"; GLISS properties.put("zoom", new Double(zoom)); properties.put("x1", new Double(fromPoint.getX())); properties.put("y1", new Double(fromPoint.getY())); properties.put("x2", new Double(toPoint.getX())); properties.put("y2", new Double(toPoint.getY())); properties.put("note1", glissOutNote); properties.put("note2", glissInNote); String graphicsCommand = "Gliss"; BEAM properties.put("zoom", new Double(zoom)); properties.put("x", new Double(xPos)); properties.put("y", new Double(beamPositionY)); properties.put("width", new Double(rectWidth)); properties.put("height", new Double(rectHeight)); properties.put("note1", firstnoteOfBeam); properties.put("note2", lastnoteOfBeam == null ? firstnoteOfBeam : lastnoteOfBeam); String graphicsCommand = "Beam";
-