Class Dlaute.Renderer

java.lang.Object
eu.bandm.music.applications.deutscheLaute.Dlaute.Renderer
Enclosing class:
Dlaute

class Dlaute.Renderer extends Object
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 Details

    • stopcodeFont

      final Font stopcodeFont
      Font for durations symbols and finger symbols
    • technicalFont

      final Font technicalFont
      Font for editorial additions, eg. numbering.
    • Y_NOTEHEAD

      public static final int Y_NOTEHEAD
      Position of the "invisible note head" relative to the voice's "staff".
      See Also:
    • Y_TOPFLAG

      public static final int Y_TOPFLAG
      Position of the flag relative to the voice's "staff".
      See Also:
    • LEFT_MARGIN

      public static final int LEFT_MARGIN
      evident
      See Also:
    • VOICE_HEIGHT

      public static final int VOICE_HEIGHT
      Height of the "invisible staves" per voice.
      See Also:
    • TOPMARGIN

      public static final int TOPMARGIN
      evident
      See Also:
    • WIDTH_SHORT_BEAM

      int WIDTH_SHORT_BEAM
      evident
    • HEIGHT_BEAM

      int HEIGHT_BEAM
      evident
    • Y_BEAM_DISTANCE

      int Y_BEAM_DISTANCE
      evident
    • X_LONGDURA_DISTANCE

      int X_LONGDURA_DISTANCE
      X-distance of the dots for the long durations.
    • X_COLUMN_DISTANCE

      int X_COLUMN_DISTANCE
      evident
    • beamsRunning

      @Opt @Opt String beamsRunning
      Iff a beam is currently displayed, the duration symbol (T,F,E) of the beam.
    • beamstart

      int beamstart
      X-pos where the beam started, for drawing it a posteriori.
    • xpos

      int xpos
      Current position fo rendering.
    • stemStroke

      final Stroke stemStroke
      evident
    • beamStroke

      final Stroke beamStroke
      evident
    • gr

      final Graphics2D gr
      evident
    • imageWidth

      final int imageWidth
      evident
    • imageHeight

      final int imageHeight
      evident
    • ONE_HALF

      public final Rational ONE_HALF
  • Constructor Details

    • Renderer

      Renderer(Graphics2D gr, int imageWidth, int imageHeight)
      evident
  • Method Details

    • drawDuration

      void drawDuration(Event e, int ypos)
      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

      void render(@Opt @Opt Color backgroundColor)
      Do the complete rendering into the gr given on construction.