import { Polygon } from "./polygon.js";
/**
* Represents a rendered glyph.
*
* A glyph is represented as a series of {@link Polygon} instances.
* The contained {@link Polygon}'s can be accessed by the {@link array} property.
*/
export declare class Polygons {
/**
* Stores the rendered glyph as an array of {@link Polygon} instances.
* @example
* ```ts
* const polygons = new Polygons();
* kage.makeGlyph(polygons, someGlyphName);
* for (const poly of polygons.array) {
* let first = true;
* for (const { x, y } of poly.array) {
* if (first) ctx.moveTo(x, y);
* else ctx.lineTo(x, y);
* first = false;
* }
* ctx.closePath();
* }
* ```
*/
array: Polygon[];
constructor();
/** Clears the content. */
clear(): void;
/**
* Appends a new {@link Polygon} to the end of the array.
* Does nothing if `polygon` is not a valid polygon.
* @param polygon - A {@link Polygon} instance to be appended.
*/
push(polygon: Polygon): void;
/**
* Generates a string in SVG format that represents the rendered glyph.
* @param curve - Set to true to use the `` format, or set to false to
* use the `` format. Must be set to true if the glyph was rendered
* with `kage.kFont.kUseCurve = true`. Defaults to false (the `` format
* is used).
* @returns The string representation of the rendered glyph in SVG format.
*/
generateSVG(curve?: boolean): string;
/**
* Generates a string in EPS format that represents the rendered glyph.
* @returns The string representation of the rendered glyph in EPS format.
*/
generateEPS(): string;
/**
* Iterates over its contours.
* @returns An iterator of its {@link Polygon} elements.
* @example
* ```ts
* for (const polygon of polygons) {
* // ...
* }
* ```
*/
[Symbol.iterator]: (this: this) => Iterator;
}