Package com.softsynth.jmsl.score
Class NoteRenderer
java.lang.Object
com.softsynth.jmsl.score.NoteRenderer
public class NoteRenderer
extends java.lang.Object
A class with static methods to draw Note objects. Keeps Note thinner. JMSL Notation Project
- Author:
- Nick Didkovsky , copyright 2000 Nick Didkovsky
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
copyright
static int[]
dotXSeries
static int[]
dotYSeries
static java.lang.String
LINE_BREAK_DELIMITTER
Used in text attached to a Note to signal line break.static int
NOTE_HEAD_HEIGHT
static int
NOTE_HEAD_WIDTH
static int[]
smallDotXSeries
static int[]
smallDotYSeries
static double
STANDARD_STEM_LENGTH_IN_SPACES
-
Constructor Summary
Constructors Constructor Description NoteRenderer()
-
Method Summary
Modifier and Type Method Description static void
buildNoteheadArrays(double zoom)
Called by ScorePainter once for a given zoom valuestatic double
calcDistanceBetweenTopAndBottomNotesInChord(Note note, double zoom)
static void
clearStaffVectors(Score score)
static void
drawNoteHead(java.awt.Graphics g, double x, double y, double zoom, Note note, java.awt.Color overrideColorForFlash)
static void
render(java.awt.Graphics g, double zoom, Note note)
static void
render(java.awt.Graphics g, double zoom, Note note, boolean oppositeSideOfStem, boolean renderTails)
static void
renderRemainingStaffVectors(java.awt.Graphics g, double zoom)
Some cresc, decresc, 8va, 8vb groups might be loaded up but renders were not triggered because their terminating notes are on the next page.static boolean
renderTupletNumber(java.awt.Graphics g, int tuplet, double x, double y, Note note, double zoom)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
STANDARD_STEM_LENGTH_IN_SPACES
public static final double STANDARD_STEM_LENGTH_IN_SPACES- See Also:
- Constant Field Values
-
NOTE_HEAD_WIDTH
public static final int NOTE_HEAD_WIDTH- See Also:
- Constant Field Values
-
NOTE_HEAD_HEIGHT
public static final int NOTE_HEAD_HEIGHT- See Also:
- Constant Field Values
-
smallDotXSeries
public static final int[] smallDotXSeries -
smallDotYSeries
public static final int[] smallDotYSeries -
dotXSeries
public static final int[] dotXSeries -
dotYSeries
public static final int[] dotYSeries -
LINE_BREAK_DELIMITTER
public static final java.lang.String LINE_BREAK_DELIMITTERUsed in text attached to a Note to signal line break. Line height is g.getFontMetrics().getMaxAscent()- See Also:
- Constant Field Values
-
copyright
public static final java.lang.String copyright- See Also:
- Constant Field Values
-
-
Constructor Details
-
NoteRenderer
public NoteRenderer()
-
-
Method Details
-
clearStaffVectors
-
render
-
render
public static void render(java.awt.Graphics g, double zoom, Note note, boolean oppositeSideOfStem, boolean renderTails) -
renderRemainingStaffVectors
public static void renderRemainingStaffVectors(java.awt.Graphics g, double zoom)Some cresc, decresc, 8va, 8vb groups might be loaded up but renders were not triggered because their terminating notes are on the next page. This method runs through all of them and renders any that are not empty -
drawNoteHead
public static void drawNoteHead(java.awt.Graphics g, double x, double y, double zoom, Note note, java.awt.Color overrideColorForFlash) -
renderTupletNumber
public static boolean renderTupletNumber(java.awt.Graphics g, int tuplet, double x, double y, Note note, double zoom) -
buildNoteheadArrays
public static void buildNoteheadArrays(double zoom)Called by ScorePainter once for a given zoom value -
calcDistanceBetweenTopAndBottomNotesInChord
-