• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

excaliburjs / Excalibur / 14804036802

02 May 2025 09:58PM UTC coverage: 5.927% (-83.4%) from 89.28%
14804036802

Pull #3404

github

web-flow
Merge 5c103d7f8 into 0f2ccaeb2
Pull Request #3404: feat: added Graph module to Math

234 of 8383 branches covered (2.79%)

229 of 246 new or added lines in 1 file covered. (93.09%)

13145 existing lines in 208 files now uncovered.

934 of 15759 relevant lines covered (5.93%)

4.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/engine/Graphics/Context/transform-stack.ts
1
import { AffineMatrix } from '../../Math/affine-matrix';
2
import { RentalPool } from '../../Util/RentalPool';
3

4
export class TransformStack {
UNCOV
5
  private _pool = new RentalPool(
×
UNCOV
6
    () => AffineMatrix.identity(),
×
UNCOV
7
    (mat) => mat.reset(),
×
8
    100
9
  );
UNCOV
10
  private _transforms: AffineMatrix[] = [];
×
11

UNCOV
12
  private _currentTransform: AffineMatrix = this._pool.rent(true);
×
13

14
  public save(): void {
UNCOV
15
    this._transforms.push(this._currentTransform);
×
UNCOV
16
    this._currentTransform = this._currentTransform.clone(this._pool.rent());
×
17
  }
18

19
  public restore(): void {
UNCOV
20
    this._pool.return(this._currentTransform);
×
UNCOV
21
    this._currentTransform = this._transforms.pop()!;
×
22
  }
23

24
  public translate(x: number, y: number): AffineMatrix {
UNCOV
25
    return this._currentTransform.translate(x, y);
×
26
  }
27

28
  public rotate(angle: number): AffineMatrix {
UNCOV
29
    return this._currentTransform.rotate(angle);
×
30
  }
31

32
  public scale(x: number, y: number): AffineMatrix {
UNCOV
33
    return this._currentTransform.scale(x, y);
×
34
  }
35

36
  public reset(): void {
UNCOV
37
    this._currentTransform.reset();
×
38
  }
39

40
  public set current(matrix: AffineMatrix) {
UNCOV
41
    this._currentTransform = matrix;
×
42
  }
43

44
  public get current(): AffineMatrix {
UNCOV
45
    return this._currentTransform;
×
46
  }
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc