Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MusicSheetDrawer

Draw a GraphicalMusicSheet (through the .drawSheet method)

The drawing is implemented with a top-down approach, starting from a music sheet, going through pages, systems, staffs... ... and ending in notes, beams, accidentals and other symbols. It's worth to say, that this class just draws the symbols and graphical elements, using the positions that have been computed before. But in any case, some of these previous positioning algorithms need the sizes of the concrete symbols (NoteHeads, sharps, flats, keys...). Therefore, there are some static functions on the 'Bounding Boxes' section used to compute these symbol boxes at the beginning for the later use in positioning algorithms.

This class also includes the resizing and positioning of the symbols due to user interaction like zooming or panning.

Hierarchy

Index

Constructors

constructor

Properties

bottomLineVisible

bottomLineVisible: boolean = false

drawableBoundingBoxElement

drawableBoundingBoxElement: string = process.env.DRAW_BOUNDING_BOX_ELEMENT

drawingParameters

drawingParameters: DrawingParameters

Protected graphicalMusicSheet

graphicalMusicSheet: GraphicalMusicSheet

midiPlaybackAvailable

midiPlaybackAvailable: boolean

Private phonicScoreMode

phonicScoreMode: PhonicScoreModes = PhonicScoreModes.Manual

Protected rules

skyLineVisible

skyLineVisible: boolean = false

splitScreenLineColor

splitScreenLineColor: number

Protected textMeasurer

textMeasurer: ITextMeasurer

Accessors

Mode

Protected leadSheet

  • get leadSheet(): boolean
  • set leadSheet(value: boolean): void

Methods

Protected activateSystemRendering

  • activateSystemRendering(systemId: number, absBoundingRect: RectangleF2D, systemBoundingBoxInPixels: RectangleF2D, createNewImage: boolean): boolean

Protected applyScreenTransformation

Protected applyScreenTransformationForRect

Protected applyScreenTransformations

calculatePixelDistance

  • calculatePixelDistance(unitDistance: number): number

Protected drawBottomLine

Private drawBoundingBoxes

  • drawBoundingBoxes(startBox: BoundingBox, layer?: number, type?: string): void
  • Draw bounding boxes aroung GraphicalObjects

    Parameters

    • startBox: BoundingBox

      Bounding Box that is used as a staring point to recursively go through all child elements

    • Default value layer: number = 0

      Layer to draw to

    • Default value type: string = "all"

      Type of element to show bounding boxes for as string.

    Returns void

Private drawComment

Protected drawContinuousDynamic

Protected drawDashes

Protected drawExpressions

  • drawExpressions(staffline: StaffLine): void

Protected drawGraphicalLine

  • drawGraphicalLine(graphicalLine: GraphicalLine, lineWidth: number, colorOrStyle?: string): void

Protected drawGroupBracket

Protected drawInstantaneousDynamic

Protected drawInstrumentBrace

drawLabel

drawLine

  • drawLine(start: PointF2D, stop: PointF2D, color?: string, lineWidth: number): void

drawLineAsHorizontalRectangle

  • drawLineAsHorizontalRectangle(line: GraphicalLine, layer: number): void

drawLineAsHorizontalRectangleWithOffset

drawLineAsVerticalRectangle

  • drawLineAsVerticalRectangle(line: GraphicalLine, layer: number): void

drawLineAsVerticalRectangleWithOffset

Protected drawLyricLines

Private drawMarkedAreas

Protected drawMeasure

Protected drawMusicSystem

Protected drawMusicSystemComponents

Protected drawOctaveShifts

  • drawOctaveShifts(staffLine: StaffLine): void

Private drawPage

drawRectangle

Protected drawScrollIndicator

  • drawScrollIndicator(): void

Protected drawSelectionEndSymbol

Protected drawSelectionStartSymbol

drawSheet

Protected drawSkyLine

Protected drawSplitScreenLine

  • drawSplitScreenLine(): void

Protected drawStaffLine

Private drawStaffLineSymbols

  • drawStaffLineSymbols(staffLine: StaffLine): void

Protected drawStaffLines

Protected drawSymbol

Protected drawSystemLineObject

  • drawSystemLineObject(systemLine: SystemLine): void

Protected getSystemAbsBoundingRect

Protected getSytemBoundingBoxInPixels

Protected isVisible

Protected renderLabel

  • renderLabel(graphicalLabel: GraphicalLabel, layer: number, bitmapWidth: number, bitmapHeight: number, heightInPixel: number, screenPosition: PointF2D): void

Protected renderRectangle

  • renderRectangle(rectangle: RectangleF2D, layer: number, styleId: number, alpha?: number): void

Protected renderSystemToScreen

Generated using TypeDoc