@coderline/alphatab 1.3.0-alpha.135 → 1.3.0-alpha.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3978,6 +3978,18 @@ declare class Cursors {
3978
3978
  * provided whenever a part of of the music sheet is rendered.
3979
3979
  */
3980
3980
  declare class RenderFinishedEventArgs {
3981
+ /**
3982
+ * Gets or sets the unique id of this event args.
3983
+ */
3984
+ id: string;
3985
+ /**
3986
+ * Gets or sets the x position of the current rendering result.
3987
+ */
3988
+ x: number;
3989
+ /**
3990
+ * Gets or sets the y position of the current rendering result.
3991
+ */
3992
+ y: number;
3981
3993
  /**
3982
3994
  * Gets or sets the width of the current rendering result.
3983
3995
  */
@@ -4330,6 +4342,12 @@ interface IScoreRenderer {
4330
4342
  * @param trackIndexes The indexes of the tracks to draw.
4331
4343
  */
4332
4344
  renderScore(score: Score, trackIndexes: number[]): void;
4345
+ /**
4346
+ * Initiates the rendering of a partial render result which the renderer
4347
+ * should have layed out already.
4348
+ * @param resultId the result ID as provided by the {@link partialLayoutFinished} event.
4349
+ */
4350
+ renderResult(resultId: string): void;
4333
4351
  /**
4334
4352
  * Updates the settings to the given object.
4335
4353
  * @param settings
@@ -4351,6 +4369,10 @@ interface IScoreRenderer {
4351
4369
  * Occurs whenever a part of the whole music sheet is rendered and can be displayed.
4352
4370
  */
4353
4371
  readonly partialRenderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
4372
+ /**
4373
+ * Occurs whenever a part of the whole music sheet is layed out but not yet rendered.
4374
+ */
4375
+ readonly partialLayoutFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
4354
4376
  /**
4355
4377
  * Occurs when the whole rendering and layout process finished.
4356
4378
  */
@@ -4411,10 +4433,17 @@ interface IUiFacade<TSettings> {
4411
4433
  */
4412
4434
  initialRender(): void;
4413
4435
  /**
4414
- * Tells the UI layer to append the given render results to the UI.
4436
+ * Tells the UI layer to append the given render results to the UI. At this point
4437
+ * the partial result is not actually rendered yet, only the layouting process
4438
+ * completed.
4415
4439
  * @param renderResults The rendered partial that should be added to the UI.
4416
4440
  */
4417
4441
  beginAppendRenderResults(renderResults: RenderFinishedEventArgs | null): void;
4442
+ /**
4443
+ * Tells the UI layer to update the given render results within the UI.
4444
+ * @param renderResults The rendered partial that should be updated within the UI.
4445
+ */
4446
+ beginUpdateRenderResults(renderResults: RenderFinishedEventArgs): void;
4418
4447
  /**
4419
4448
  * Tells the UI layer to create the worker renderer. This method is the UI layer supports worker rendering and worker rendering is not disabled via setting.
4420
4449
  * @returns
@@ -4583,6 +4612,7 @@ declare class AlphaTabApiBase<TSettings> {
4583
4612
  */
4584
4613
  private triggerResize;
4585
4614
  private appendRenderResult;
4615
+ private updateRenderResult;
4586
4616
  /**
4587
4617
  * Tells alphaTab to render the given alphaTex.
4588
4618
  * @param tex The alphaTex code to render.
@@ -6395,9 +6425,16 @@ declare abstract class ScoreLayout {
6395
6425
  protected chordDiagrams: ChordDiagramContainerGlyph | null;
6396
6426
  protected tuningGlyph: TuningContainerGlyph | null;
6397
6427
  protected constructor(renderer: ScoreRenderer);
6428
+ abstract get padding(): number[];
6429
+ abstract get firstBarX(): number;
6398
6430
  abstract get supportsResize(): boolean;
6399
- abstract resize(): void;
6431
+ resize(): void;
6432
+ abstract doResize(): void;
6400
6433
  layoutAndRender(): void;
6434
+ private _lazyPartials;
6435
+ protected registerPartial(args: RenderFinishedEventArgs, callback: (canvas: ICanvas) => void): void;
6436
+ private internalRenderLazyPartial;
6437
+ renderLazyPartial(resultId: string): void;
6401
6438
  protected abstract doLayoutAndRender(): void;
6402
6439
  private createScoreInfoGlyphs;
6403
6440
  get scale(): number;
@@ -6407,7 +6444,7 @@ declare abstract class ScoreLayout {
6407
6444
  registerBarRenderer(key: string, renderer: BarRendererBase): void;
6408
6445
  unregisterBarRenderer(key: string, renderer: BarRendererBase): void;
6409
6446
  getRendererForBar(key: string, bar: Bar): BarRendererBase | null;
6410
- renderAnnotation(): void;
6447
+ layoutAndRenderAnnotation(y: number): number;
6411
6448
  }
6412
6449
 
6413
6450
  /**
@@ -6440,12 +6477,14 @@ declare class ScoreRenderer implements IScoreRenderer {
6440
6477
  */
6441
6478
  renderTracks(tracks: Track[]): void;
6442
6479
  updateSettings(settings: Settings): void;
6480
+ renderResult(resultId: string): void;
6443
6481
  render(): void;
6444
6482
  resizeRender(): void;
6445
6483
  private layoutAndRender;
6446
6484
  readonly preRender: IEventEmitterOfT<boolean>;
6447
6485
  readonly renderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
6448
6486
  readonly partialRenderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
6487
+ readonly partialLayoutFinished: IEventEmitterOfT<RenderFinishedEventArgs>;
6449
6488
  readonly postRenderFinished: IEventEmitter;
6450
6489
  readonly error: IEventEmitterOfT<Error>;
6451
6490
  private onRenderFinished;
@@ -6602,6 +6641,7 @@ declare class AlphaSynth implements IAlphaSynth {
6602
6641
  resetChannelStates(): void;
6603
6642
  setChannelSolo(channel: number, solo: boolean): void;
6604
6643
  setChannelVolume(channel: number, volume: number): void;
6644
+ private onAudioSettingsUpdate;
6605
6645
  private onSamplesPlayed;
6606
6646
  private checkForFinish;
6607
6647
  private updateTimePosition;