Class Dlaute.Renderer
java.lang.Object
eu.bandm.music.applications.deutscheLaute.Dlaute.Renderer
- Enclosing class:
- Dlaute
Creates one single image as CONTROL output only.
The dimensions are as follows
leftMargin <---> <---> columnDistance (can be constant or variable: log or lin <--><--><--> (0,0)*-----------------------------------------------------------+ | > topmargin | ^ | [0] [1] | | F E E E ypos = 0 |_ ystart (for the first voice) | a b E c d = 1 | | f 0 k i x _ = 2 | | x x _ > voiceheight | _ lowesty | | +-----------------------------------------------------------+ ATTENTION the technical ypos increases downwards! All graphics are output CENTERED to the current x position.
-
Field Summary
Modifier and TypeFieldDescriptionIff a beam is currently displayed, the duration symbol (T,F,E) of the beam.(package private) int
X-pos where the beam started, for drawing it a posteriori.(package private) final Stroke
evident(package private) final Graphics2D
evident(package private) int
evident(package private) final int
evident(package private) final int
evidentstatic final int
evidentfinal Rational
(package private) final Stroke
evident(package private) final Font
Font for durations symbols and finger symbols(package private) final Font
Font for editorial additions, eg.static final int
evidentstatic final int
Height of the "invisible staves" per voice.(package private) int
evident(package private) int
evident(package private) int
X-distance of the dots for the long durations.(package private) int
Current position fo rendering.(package private) int
evidentstatic final int
Position of the "invisible note head" relative to the voice's "staff".static final int
Position of the flag relative to the voice's "staff". -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
drawDuration
(Event e, int ypos) Draw the duration symbol of the event.(package private) void
drawFlag
(int x, int y) evident(package private) void
Do the complete rendering into thegr
given on construction.
-
Field Details
-
stopcodeFont
Font for durations symbols and finger symbols -
technicalFont
Font for editorial additions, eg. numbering. -
Y_NOTEHEAD
public static final int Y_NOTEHEADPosition of the "invisible note head" relative to the voice's "staff".- See Also:
-
Y_TOPFLAG
public static final int Y_TOPFLAGPosition of the flag relative to the voice's "staff".- See Also:
-
LEFT_MARGIN
public static final int LEFT_MARGINevident- See Also:
-
VOICE_HEIGHT
public static final int VOICE_HEIGHTHeight of the "invisible staves" per voice.- See Also:
-
TOPMARGIN
public static final int TOPMARGINevident- See Also:
-
WIDTH_SHORT_BEAM
int WIDTH_SHORT_BEAMevident -
HEIGHT_BEAM
int HEIGHT_BEAMevident -
Y_BEAM_DISTANCE
int Y_BEAM_DISTANCEevident -
X_LONGDURA_DISTANCE
int X_LONGDURA_DISTANCEX-distance of the dots for the long durations. -
X_COLUMN_DISTANCE
int X_COLUMN_DISTANCEevident -
beamsRunning
Iff a beam is currently displayed, the duration symbol (T,F,E) of the beam. -
beamstart
int beamstartX-pos where the beam started, for drawing it a posteriori. -
xpos
int xposCurrent position fo rendering. -
stemStroke
evident -
beamStroke
evident -
gr
evident -
imageWidth
final int imageWidthevident -
imageHeight
final int imageHeightevident -
ONE_HALF
-
-
Constructor Details
-
Renderer
Renderer(Graphics2D gr, int imageWidth, int imageHeight) evident
-
-
Method Details
-
drawDuration
Draw the duration symbol of the event.- Parameters:
ypos
- = the LOWER edge of the drawing area (numerically an upper bound).
-
drawFlag
void drawFlag(int x, int y) evident -
render
Do the complete rendering into thegr
given on construction.
-