OpenSheetMusicDisplay
    Preparing search index...

    Class VexFlowMusicSheetDrawer

    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 (View Summary)

    Index

    Constructors

    Properties

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

    Accessors

    Methods

    • Lets a user/developer draw an overlay line on the score. Use this instead of drawLine, which is for OSMD internally only. The MusicPage has to be specified, because each page and Vexflow backend has its own relative coordinates. (the AbsolutePosition of a GraphicalNote is relative to its backend) To get a MusicPage, use GraphicalNote.ParentMusicPage.

      Parameters

      Returns Node

    • Renders a Label to the screen (e.g. Title, composer..)

      Parameters

      • graphicalLabel: GraphicalLabel

        holds the label string, the text height in units and the font parameters

      • layer: number

        is the current rendering layer. There are many layers on top of each other to which can be rendered. Not needed for now.

      • bitmapWidth: number

        Not needed for now.

      • bitmapHeight: number

        Not needed for now.

      • fontHeightInPixel: number
      • screenPosition: PointF2D

        the position of the lower left corner of the text in screen coordinates

      Returns Node

    • Renders a rectangle with the given style to the screen. It is given in screen coordinates.

      Parameters

      • rectangle: RectangleF2D

        the rect in screen coordinates

      • layer: number

        is the current rendering layer. There are many layers on top of each other to which can be rendered. Not needed for now.

      • styleId: number

        the style id

      • colorHex: string
      • alpha: number

        alpha value between 0 and 1

      Returns Node