textmode.js / export / SVGExportOptions
Type Alias: SVGExportOptions
ts
type SVGExportOptions = object;
Options for exporting the textmode content to SVG format.
Properties
backgroundColor?
ts
optional backgroundColor: [number, number, number, number];
Background color for the SVG as RGBA array [r, g, b, a]
.
Default is transparent black [0, 0, 0, 0]
.
drawMode?
ts
optional drawMode: "fill" | "stroke";
The drawing mode for ASCII characters.
When set to 'fill'
, characters are rendered as filled shapes.
When set to 'stroke'
, characters are rendered as outlines.
Default is 'fill'
.
filename?
ts
optional filename: string;
The filename to save the SVG file as.
If not provided, a default filename is used.
includeBackgroundRectangles?
ts
optional includeBackgroundRectangles: boolean;
Whether to include cell background rectangles in the SVG output.
When false
, only the character paths are included, creating a more compact SVG.
Default is true
.
strokeWidth?
ts
optional strokeWidth: number;
The stroke width to use when drawMode is set to 'stroke'
.
Default is 1.0
.