Skip to main content

alphaTab.rendering.BoundsLookup

(no description)

 class BoundsLookup

Properties​

isFinished​

Gets or sets a value indicating whether this lookup was finished already.

isFinished: boolean;

staffSystems​

Gets a list of all individual staff systems contained in the rendered music notation.

staffSystems: StaffSystemBounds[];

Methods​

addBeat​

Adds a new beat to the lookup.

addBeat(bounds: BeatBounds): void
ParameterSummary
boundsAll

The beat bounds to add.

addMasterBar​

Adds a new master bar to the lookup.

addMasterBar(bounds: MasterBarBounds): void
ParameterSummary
boundsAll

The master bar bounds to add.

addStaffSystem​

Adds a new staff sytem to the lookup.

addStaffSystem(bounds: StaffSystemBounds): void
ParameterSummary
boundsAll

The staff system bounds to add.

findBeat​

Tries to find the bounds of a given beat.

findBeat(beat: Beat): BeatBounds | null
ParameterSummary
beatAll

The beat to find.

Returns​

The beat bounds if it was rendered, or null if no boundary information is available.

findBeats​

Tries to find the bounds of a given beat.

findBeats(beat: Beat): BeatBounds[] | null
ParameterSummary
beatAll

The beat to find.

Returns​

The beat bounds if it was rendered, or null if no boundary information is available.

findMasterBar​

Tries to find the master bar bounds by a given master bar.

findMasterBar(bar: MasterBar): MasterBarBounds | null
ParameterSummary
barAll

The master bar to find.

Returns​

The master bar bounds if it was rendered, or null if no boundary information is available.

findMasterBarByIndex​

Tries to find the master bar bounds by a given index.

findMasterBarByIndex(index: number): MasterBarBounds | null
ParameterSummary
indexAll

The index of the master bar to find.

Returns​

The master bar bounds if it was rendered, or null if no boundary information is available.

finish​

Finishes the lookup for optimized access.

finish(scale?: number): void
ParameterSummary
scaleAll

(no description)

fromJson​

(no description)

static fromJson(json: unknown, score: Score): BoundsLookup
ParameterSummary
jsonAll

(no description)

scoreAll

(no description)

getBeatAtPos​

Tries to find a beat at the given absolute position.

getBeatAtPos(x: number, y: number): Beat | null
ParameterSummary
xAll

The absolute X-position of the beat to find.

yAll

The absolute Y-position of the beat to find.

Returns​

The beat found at the given position or null if no beat could be found.

getNoteAtPos​

Tries to find the note at the given position using the given beat for fast access. Use findBeat to find a beat for a given position first.

getNoteAtPos(beat: Beat, x: number, y: number): Note | null
ParameterSummary
beatAll

The beat containing the note.

xAll

The X-position of the note.

yAll

The Y-position of the note.

Returns​

The note at the given position within the beat.

toJson​

(no description)

toJson(): unknown