OpenSheetMusicDisplay
    Preparing search index...

    Class GeometricSkyBottomLineCaches

    Caches and shared helper objects for GeometricSkyBottomLineContext. All cached values are pure functions of their keys (font + character, glyph outline + scale), so they could in principle be shared globally - but they are kept as an instanced object (owned by EngravingRules, like e.g. NoteToGraphicalNoteMap) to avoid mutable static state, so that multiple OSMD instances on one page stay fully independent (and the caches are freed with the instance).

    Index

    Constructors

    Properties

    characterExtents: Map<string, ICharacterExtents> = ...

    Character ink extents, cached by font + character (see measureCharacter()).

    characterProbeCanvas: HTMLCanvasElement

    Tiny hidden canvas used to probe the exact rasterized ink extents of single characters (once per font + character, then cached in characterExtents).

    characterProbeContext: CanvasRenderingContext2D
    characterProbeCreationFailed: boolean = false
    glyphSegments: WeakMap<object, Map<number, Float64Array<ArrayBufferLike>>> = ...

    Flattened line segments of glyph outlines (quadruples x0,y0,x1,y1, relative to the glyph origin, already scaled and y-inverted), cached per outline (by reference) and scale, see drawCachedGlyphOutline(). VexFlow caches the outline arrays on its font glyph entries, so they are stable keys that live as long as the font.

    glyphSegmentsScratch: GeometricSkyBottomLineContext

    Scratch context used to flatten glyph outlines (reused, see computeGlyphSegments()).

    measureTextWarningLogged: boolean = false
    textMeasureContext: CanvasRenderingContext2D

    Shared hidden canvas context used only for measureText() (cheap, no pixel readback).

    textMeasureContextCreationFailed: boolean = false