import * as em from "./Enums"; import * as ds from "./Types"; import { ObjectManager } from "./ObjectManager"; import { DrawingContext } from "./DrawingContext"; import { type SvgDocument } from "./SvgDocument"; /** * Represents a drawing context for a new {@link SvgDocument}. **/ export declare class SvgContext extends DrawingContext { /** * Creates an {@link SvgContext} for drawing graphics and converting to {@link SvgDocument}. * @param width The width of the image, in device-independent pixels. * @param height The height of the image, in device-independent pixels. * @param svgContextProperties The settings for creating a {@link DrawingContext} for SVG. **/ constructor(width: number, height: number, svgContextProperties?: ds.SvgContextProperties); /** * Creates an {@link SvgContext} for drawing graphics and converting to {@link SvgDocument}. * @param om An object manager that controls the lifetime of the {@link SvgContext} object. * @param width The width of the image, in device-independent pixels. * @param height The height of the image, in device-independent pixels. * @param svgContextProperties The settings for creating a {@link DrawingContext} for SVG. **/ constructor(om: ObjectManager, width: number, height: number, svgContextProperties?: ds.SvgContextProperties); /** * Gets the type of {@link DrawingContext}. **/ get type(): em.ContextType; /** * Gets the resolution of the {@link DrawingContext}, in dots per Inch. **/ get resolution(): number; /** * Gets or sets the width of the image, in device-independent pixels. **/ get width(): number; /** * Gets or sets the width of the image, in device-independent pixels. **/ set width(value: number); /** * Gets or sets the height of the image, in device-independent pixels. **/ get height(): number; /** * Gets or sets the height of the image, in device-independent pixels. **/ set height(value: number); /** * Gets or sets the title of the SVG document. **/ get title(): string; /** * Gets or sets the title of the SVG document. **/ set title(value: string); /** * Gets or sets the description of the SVG document. **/ get description(): string; /** * Gets or sets the description of the SVG document. **/ set description(value: string); /** * Gets or sets a string to be appended to the auto-generated ID values. **/ get idSuffix(): string; /** * Gets or sets a string to be appended to the auto-generated ID values. **/ set idSuffix(value: string); /** * Gets or sets a hint to the implementation about what tradeoffs to make as it renders vector graphics elements. **/ get shapeRendering(): em.ShapeRendering; /** * Gets or sets a hint to the implementation about what tradeoffs to make as it renders vector graphics elements. **/ set shapeRendering(shapeRendering: em.ShapeRendering); /** * Gets or sets a hint to the implementation about how to make speed vs. quality tradeoffs as it performs image processing. **/ get imageRendering(): em.ImageRendering; /** * Gets or sets a hint to the implementation about how to make speed vs. quality tradeoffs as it performs image processing. **/ set imageRendering(imageRendering: em.ImageRendering); /** * Gets or sets a value indicating whether the positions are set for each individual character within the 'text' element. **/ get preciseCharPositions(): boolean; /** * Gets or sets a value indicating whether the positions are set for each individual character within the 'text' element. **/ set preciseCharPositions(value: boolean); /** * Gets or sets a value indicating whether fonts used in 'text' elements should be embedded. **/ get embedFonts(): boolean; /** * Gets or sets a value indicating whether fonts used in 'text' elements should be embedded. **/ set embedFonts(value: boolean); /** * Starts a group ('g') element with custom attributes in the SVG document. * Call the {@link SvgContext#popGroup} method to end the group. * @param attributeName The name of the attribute, including the optional prefix. * @param value A string value of the attribute. * @param namespace The optional namespace of the attribute. **/ pushGroup(attributeName: string, value: string, namespace?: string): void; /** * Starts a group ('g') element with custom attributes in the SVG document. * Call the {@link SvgContext#popGroup} method to end the group. * @param attributes The list of attributes to be associated with the group. **/ pushGroup(attributes: ds.SvgAttribute[]): void; /** * Ends the group that was created by the last {@link SvgContext#pushGroup} call. **/ popGroup(): void; /** * Generates a {@link SvgDocument} from this context, and clears the context's command list afterwards. * @returns The resulting {@link SvgDocument}. **/ toSvgDocument(): SvgDocument; }