public class Renderer
extends java.lang.Object
Score NoteSystem NoteSystem Measure Measure Measure tps, tp2abstractpos, tnum2finalPos,etc. Staff=Segment RPrefix first,last first,last RPrefix first,last Staff=Segment RPrefix first,last first,last RPrefix first,last
Modifier and Type | Class and Description |
---|---|
class |
Renderer.Inner
cf.
|
class |
Renderer.Measure
Calculates and stores all horizontal layout information for ONE measure and
ALL staffs.
|
class |
Renderer.NoteSystem
Represents the sequence of measures, plus initial prefix, which fill one
printable page width.
|
static class |
Renderer.PointwiseLinear
FIXME Abstrahieren !!
|
class |
Renderer.RunningPrefix
Store for the symbols standing at the beginning of a system, per Staff and
NoteSystem.
|
class |
Renderer.Segment
Realizes the geometric data related to one particular Staff of the input Score.
|
Modifier and Type | Field and Description |
---|---|
static StaffLines |
blankLines |
protected static CheckedList<java.lang.Float> |
clf_0 |
protected NoteHead |
custos_notehead |
static Extension |
emptyExtension |
Renderer.NoteSystem |
firstSystem
needed by Pager to start processing.
|
java.awt.Graphics2D |
graphics2D
Only needed for calculation of font metrics, see comment with constructor.
|
protected java.util.Map<MTree,java.lang.Integer> |
levels |
protected MTree |
metricTree |
protected MuLiMessageReceiver<XMLDocumentIdentifier> |
msg |
protected MTreeSpec |
mt0 |
Parameters |
params |
Score |
score |
protected java.util.Map<Staff,Renderer.Segment> |
segments
Map all Score Staff objects to one Segment object, which will hold its
graphic calculation results.
|
Constructor and Description |
---|
Renderer(Score score,
Parameters params,
MuLiMessageReceiver<XMLDocumentIdentifier> msg,
@Opt java.awt.Graphics2D graphics2D)
ATTENTION graphics2D needed ONLY for text measurement.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
assignLevels(MTree mt,
int l) |
int |
calculateTextAdvance(java.lang.String text,
int fontIndex,
Location<XMLDocumentIdentifier> loc,
int objIndex)
Calculate the text width in pixels (=physical unit)
(FONTSIZE WHERE??? FIXME)
|
void |
execute()
Calculates (a) width for all measures, (b) partitinoning of measures
to accolades (=NoteSystem), and (c) heights of all staffs.
|
(package private) @Opt java.math.BigDecimal |
findNextMeasureToRender() |
java.awt.Color |
resolveColor(int index,
Location<XMLDocumentIdentifier> loc,
int objIndex)
Deliver (physical) Color value.
|
float |
resolveSizeFactor(int logSize,
Location<XMLDocumentIdentifier> loc,
int objIndex)
Deliver a (physical) size factor.
|
public final Score score
public final Parameters params
protected MuLiMessageReceiver<XMLDocumentIdentifier> msg
public final java.awt.Graphics2D graphics2D
public Renderer.NoteSystem firstSystem
protected static final CheckedList<java.lang.Float> clf_0
public static final StaffLines blankLines
protected NoteHead custos_notehead
public static final Extension emptyExtension
protected java.util.Map<Staff,Renderer.Segment> segments
protected MTreeSpec mt0
protected MTree metricTree
protected java.util.Map<MTree,java.lang.Integer> levels
public Renderer(Score score, Parameters params, MuLiMessageReceiver<XMLDocumentIdentifier> msg, @Opt @Opt java.awt.Graphics2D graphics2D)
void assignLevels(MTree mt, int l)
public int calculateTextAdvance(java.lang.String text, int fontIndex, Location<XMLDocumentIdentifier> loc, int objIndex)
fontIndex
- must be resolved against params.loc
- for error message only.objIndex
- for error message only.@Opt @Opt java.math.BigDecimal findNextMeasureToRender()
Renderer.Segment.nextMeasureNum
in all Renderer.Segment
objects.public java.awt.Color resolveColor(int index, Location<XMLDocumentIdentifier> loc, int objIndex)
colorIndex
- must be resolved against params.loc
- for error message only.objIndex
- for error message only.public float resolveSizeFactor(int logSize, Location<XMLDocumentIdentifier> loc, int objIndex)
logSize
- must be resolved against params.loc
- for error message only.objIndex
- for error message only.public void execute()
Pager
.)