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
FieldsModifier and TypeFieldDescriptionIff a beam is currently displayed, the duration symbol (T,F,E) of the beam.(package private) intX-pos where the beam started, for drawing it a posteriori.(package private) final Strokeevident(package private) final Graphics2Devident(package private) intevident(package private) final intevident(package private) final intevidentstatic final intevidentfinal Rational(package private) final Strokeevident(package private) final FontFont for durations symbols and finger symbols(package private) final FontFont for editorial additions, eg.static final intevidentstatic final intHeight of the "invisible staves" per voice.(package private) intevident(package private) intevident(package private) intX-distance of the dots for the long durations.(package private) intCurrent position fo rendering.(package private) intevidentstatic final intPosition of the "invisible note head" relative to the voice's "staff".static final intPosition of the flag relative to the voice's "staff". -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voiddrawDuration(Event e, int ypos) Draw the duration symbol of the event.(package private) voiddrawFlag(int x, int y) evident(package private) voidDo the complete rendering into thegrgiven 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 thegrgiven on construction.
-