import * as em from "./Enums"; import * as ds from "./Types"; import { ObjectManager } from "./ObjectManager"; import { ObjectBase } from "./ObjectBase"; import { type FontCollection } from "./FontCollection"; import { type Font } from "./Font"; /** * Represents an SVG document. **/ export declare class SvgDocument extends ObjectBase { /** * Loads a {@link SvgDocument} from a byte array. * @param svgBytes The binary data of the SVG document. * @returns A new instance of the SVG document. **/ static load(svgBytes: Uint8Array): SvgDocument; /** * Loads a {@link SvgDocument} from a byte array. * @param om An object manager that controls the lifetime of the {@link SvgDocument} object. * @param svgBytes The binary data of the SVG document. * @returns A new instance of the SVG document. **/ static load(om: ObjectManager, svgBytes: Uint8Array): SvgDocument; /** * Loads a {@link SvgDocument} from a byte array with gzipped SVG data. * @param gzSvgBytes The binary data of the gzipped SVG document. * @returns A new instance of the SVG document. **/ static loadGz(gzSvgBytes: Uint8Array): SvgDocument; /** * Loads a {@link SvgDocument} from a byte array with gzipped SVG data. * @param om An object manager that controls the lifetime of the {@link SvgDocument} object. * @param gzSvgBytes The binary data of the gzipped SVG document. * @returns A new instance of the SVG document. **/ static loadGz(om: ObjectManager, gzSvgBytes: Uint8Array): SvgDocument; /** * Saves the current {@link SvgDocument} to a byte array. * @param options The settings for saving the document. * @returns A byte array with UTF8-encoded SVG data. **/ save(options?: ds.SaveSvgOptions): Uint8Array; /** * Saves the current {@link SvgDocument} to a byte array in SVG.GZ format. **/ saveGz(): Uint8Array; /** * Gets the title of the SVG document. **/ get title(): string; /** * Gets the description of the SVG document. **/ get description(): string; /** * Sets the 'currentColor' value used by the SVG renderer. **/ setCurrentColor(color: ds.Color | null): void; /** * Sets the list of cultures to match values of the 'systemLanguage' attribute of SVG elements. **/ setLanguageTags(langTags: string[] | null): void; /** * Gets or sets the custom {@link FontCollection} used for searching fonts and font fallbacks. **/ get fontCollection(): FontCollection | null; /** * Gets or sets the custom {@link FontCollection} used for searching fonts and font fallbacks. **/ set fontCollection(coll: FontCollection | null); /** * Gets or sets a value indicating whether the fonts should be searched in * the custom collection only, if any specified. The default is false. **/ get restrictedFontLookup(): boolean; /** * Gets or sets a value indicating whether the fonts should be searched in * the custom collection only, if any specified. The default is false. **/ set restrictedFontLookup(value: boolean); /** * Gets or sets a value specifying the scope for searching fallback fonts * for the glyphs missing in the mentioned type faces. **/ get fontFallbackScope(): em.FontFallbackScope; /** * Gets or sets a value specifying the scope for searching fallback fonts * for the glyphs missing in the mentioned type faces. **/ set fontFallbackScope(fallbackScope: em.FontFallbackScope); /** * Gets or sets the font belonging to the Serif font family. **/ get serifFont(): Font | null; /** * Gets or sets the font belonging to the Serif font family. **/ set serifFont(font: Font | null); /** * Adds a font belonging to the Serif font family. **/ addSerifFont(font: Font): void; /** * Clears the list of fonts belonging to the Serif font family. **/ clearSerifFonts(): void; /** * Gets or sets the font belonging to the SansSerif font family. **/ get sansSerifFont(): Font | null; /** * Gets or sets the font belonging to the SansSerif font family. **/ set sansSerifFont(font: Font | null); /** * Adds a font belonging to the SansSerif font family. **/ addSansSerifFont(font: Font): void; /** * Clears the list of fonts belonging to the SansSerif font family. **/ clearSansSerifFonts(): void; /** * Gets or sets the font belonging to the Cursive font family. **/ get cursiveFont(): Font | null; /** * Gets or sets the font belonging to the Cursive font family. **/ set cursiveFont(font: Font | null); /** * Adds a font belonging to the Cursive font family. **/ addCursiveFont(font: Font): void; /** * Clears the list of fonts belonging to the Cursive font family. **/ clearCursiveFonts(): void; /** * Gets or sets the font belonging to the Fantasy font family. **/ get fantasyFont(): Font | null; /** * Gets or sets the font belonging to the Fantasy font family. **/ set fantasyFont(font: Font | null); /** * Adds a font belonging to the Fantasy font family. **/ addFantasyFont(font: Font): void; /** * Clears the list of fonts belonging to the Fantasy font family. **/ clearFantasyFonts(): void; /** * Gets or sets the font belonging to the Monospace font family. **/ get monospaceFont(): Font | null; /** * Gets or sets the font belonging to the Monospace font family. **/ set monospaceFont(font: Font | null); /** * Adds a font belonging to the Monospace font family. **/ addMonospaceFont(font: Font): void; /** * Clears the list of fonts belonging to the Monospace font family. **/ clearMonospaceFonts(): void; /** * Gets the intrinsic size of SVG viewport. * @returns The intrinsic size of SVG viewport, or null if the size is undefined. **/ getIntrinsicSize(): ds.Size | null; /** * Calculates the content bounds of an SVG document when its viewport is drawn at a specified point. * @param x The X coordinate of SVG viewport. * @param y The Y coordinate of SVG viewport. * @returns The content rectangle of the resulting image. **/ measure(x: number, y: number): ds.Rect; /** * Calculates the content bounds of an SVG document, resizing the SVG viewport to fit into a specified rectangle. * @param x The X coordinate of the target rectangle for SVG viewport. * @param y The Y coordinate of the target rectangle for SVG viewport. * @param width The width of the target rectangle for SVG viewport. * @param height The height of the target rectangle for SVG viewport. * @returns The content rectangle of the resulting image. **/ measureToRect(x: number, y: number, width: number, height: number): ds.Rect; /** * Calculates the content bounds of an SVG document, resizing the SVG viewport to fit into a specified rectangle. * @param bounds The target rectangle for SVG viewport. * @returns The content rectangle of the resulting image. **/ measureToRect(bounds: ds.Bounds): ds.Rect; }