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