public class Renderer.Segment extends Renderer.Inner
Extensions
of a Visual Object given by position index,
based on the currently valid staff line distance.Modifier and Type | Field and Description |
---|---|
(package private) @Opt java.math.BigDecimal |
nextMeasureNum
Running value: the bar number of the next measure waiting for processing.
|
(package private) int |
position
Running value: the index number of the next visible to process.
|
(package private) int |
size
number of elements in staff; for convenience only.
|
(package private) Staff |
staff |
(package private) java.util.SortedMap<java.lang.Integer,java.lang.Float> |
staffLineDistances
The line distances are defined by the
StaffLines objects
contained in the timed data. |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
acceptPrefixComponents(Renderer.NoteSystem sys,
Renderer.RunningPrefix pref)
Test for prefix components and memorize them for the current/the next
opening accolade.
|
(package private) Extension |
getExtension_acc(Accidental a,
float factor) |
(package private) Extension |
getExtension_barLine(BarLine bl)
Simply multiplies the raw extent with the standard bar line distance from
the
Parameters . |
(package private) Extension |
getExtension_chord(Chord e,
float linedistance,
float sizefactor) |
(package private) Extension |
getExtension_cluster(Cluster cluster,
float linedistance,
float sizefactor) |
(package private) Extension |
getExtension_nh(NoteHead nh,
float factor) |
(package private) Extension |
getExtension_staffLines(StaffLines sl,
int pos) |
(package private) Extension |
getExtension(int pos)
Gets PHYSICAL extensions using dedicated routines for Barline and StaffLine,
and
getExtension(int,Visible) for all others. |
(package private) Extension |
getExtension(int pos,
Visible go)
Gets PHYSICAL extensions for
getExtension(int,Visible) , mulitplying
the RAW extents with the currently valid Staff line distance. |
(package private) void |
init()
Read the very first object, which must be a MeasureMark, and
initialize nextMeasureNum.
|
(package private) void |
shuffleMeasureContents(Renderer.RunningPrefix currentPrefix,
Renderer.NoteSystem nextSys,
Renderer.RunningPrefix nextPrefix,
Renderer.Measure measure)
Scan all objects (starting with current position, up to next MeasureMark)
(iff they belong to the current measure number) and add the
positions and time values to the Measure object.
|
(package private) void |
shufflePrefix_firstMeasureInAccolade(Renderer.NoteSystem sys,
Renderer.RunningPrefix pref,
java.math.BigDecimal nextMeasureToRender)
Differences of the very first measure in NoteSystem to all
to subsequent measures is that clefs, keys and metre will
be printed globally and aligned, not as part of Prepended/Postpended
contents of measure stuff,
and that labels and opening brackets must be known before starting the
layout of the rest.
|
get_renderer
final Staff staff
final int size
final java.util.SortedMap<java.lang.Integer,java.lang.Float> staffLineDistances
StaffLines
objects
contained in the timed data. They are defined as "logical" distance indexes,
which must be looked-up in Param.
Every StaffLines
object is valid up to the next instance in the
same staff. Line distances are the basis for calculating
logical distances. Therefore this map is for convenience and optimization and
delivers the resolved line distance which is valid at any position number.int position
Segment(Staff staff)
void init()
StaffLines
for later size calculation.Extension getExtension(int pos)
getExtension(int,Visible)
for all others.Extension getExtension(int pos, Visible go)
getExtension(int,Visible)
, mulitplying
the RAW extents with the currently valid Staff line distance.
Calls special routines for Chords and Clusters, and simply multiplies
the raw extent with the current line distance for all others.
ASSUME all StaffLines in this Staff have been collected into staffLineDistances.Extension getExtension_barLine(BarLine bl)
Parameters
.Extension getExtension_staffLines(StaffLines sl, int pos)
Extension getExtension_acc(Accidental a, float factor)
Extension getExtension_cluster(Cluster cluster, float linedistance, float sizefactor)
boolean acceptPrefixComponents(Renderer.NoteSystem sys, Renderer.RunningPrefix pref)
sys
- the staff to parse, and where to set the "<>changed" flag.
(Optimization for #allocateHeader(boolean)
.)pref
- where to store the accepted objectsvoid shufflePrefix_firstMeasureInAccolade(Renderer.NoteSystem sys, Renderer.RunningPrefix pref, java.math.BigDecimal nextMeasureToRender)
nextMeasureNum
has been set before by "init()" or "shuffleMeasureContents(...)"
Store the values of prefix objects and advance, until the first non-prefix
visual object is found.void shuffleMeasureContents(Renderer.RunningPrefix currentPrefix, Renderer.NoteSystem nextSys, Renderer.RunningPrefix nextPrefix, Renderer.Measure measure)
currentPrefix
- for to clear "accoladeEmpty"nextSys
- for to store the "clef changed" flags, etcnextPrefix
- for to store the "clef" index number, etc.measure
- where to store the indexes and time points passed.