Fix ASCII rasterizer scaling for CLI

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-16 16:29:08 +01:00
parent 5b417c9182
commit 400720a56e
4 changed files with 40 additions and 22 deletions

View File

@@ -47,19 +47,21 @@ class ColoredChar {
}
class AsciiRasterizer extends Rasterizer {
final AsciiTheme activeTheme = AsciiThemes.blocks;
AsciiRasterizer({
this.activeTheme = AsciiThemes.blocks,
this.aspectMultiplier = 1.0,
this.verticalStretch = 1.0,
});
AsciiTheme activeTheme = AsciiThemes.blocks;
late List<List<ColoredChar>> _screen;
late WolfEngine _engine;
// Terminal characters are usually twice as tall as they are wide.
// We override the base multiplier to squish sprites horizontally.
@override
double get aspectMultiplier => 1.0;
// Squish the entire 3D projection vertically by 50% to counteract tall terminal fonts
final double aspectMultiplier;
@override
double get verticalStretch => 1.0;
final double verticalStretch;
// Intercept the base render call to initialize our text grid
@override