Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MusicSheetDrawer Abstract

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

Properties

bottomLineVisible: boolean = false
drawableBoundingBoxElement: string = "None"
drawingParameters: DrawingParameters
graphicalMusicSheet: GraphicalMusicSheet
midiPlaybackAvailable: boolean
phonicScoreMode: PhonicScoreModes = PhonicScoreModes.Manual
skyLineVisible: boolean = false
splitScreenLineColor: number
textMeasurer: ITextMeasurer

Accessors

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

Methods

  • activateSystemRendering(systemId: number, absBoundingRect: RectangleF2D, systemBoundingBoxInPixels: RectangleF2D, createNewImage: boolean): boolean
  • calculatePixelDistance(unitDistance: number): number
  • drawBoundingBox(bbox: BoundingBox, color?: string, drawCross?: boolean, labelText?: string, layer?: number): Node
  • 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

    • layer: number = 0

      Layer to draw to

    • type: string = "all"

      Type of element to show bounding boxes for as string.

    Returns void

  • drawGraphicalLine(graphicalLine: GraphicalLine, lineWidth: number, colorOrStyle?: string): Node
  • drawLine(start: PointF2D, stop: PointF2D, color?: string, lineWidth: number): Node
  • drawLineAsHorizontalRectangle(line: GraphicalLine, layer: number): void
  • drawLineAsVerticalRectangle(line: GraphicalLine, layer: number): void
  • drawScrollIndicator(): void
  • drawSplitScreenLine(): void
  • drawStaffLineSymbols(staffLine: StaffLine): void
  • drawSystemLineObject(systemLine: SystemLine): void
  • renderLabel(graphicalLabel: GraphicalLabel, layer: number, bitmapWidth: number, bitmapHeight: number, heightInPixel: number, screenPosition: PointF2D): Node
  • renderRectangle(rectangle: RectangleF2D, layer: number, styleId: number, colorHex?: string, alpha?: number): Node

Generated using TypeDoc