import type { ReadonlyColor } from "../../render/ReadonlyColor"; import { CssRenderer } from "./CssRenderer"; /** * css text align enum */ export declare enum TextAlign { Left = "left", Center = "center", Right = "right" } /** * css text weight enum */ export declare enum FontWeight { Normal = "normal", Bold = "bold" } /** * css text renderer */ export declare class CssTextRenderer extends CssRenderer { private _textWidth; private _textHeight; private _autoSize; private _fontSize; private _fontWeight; private _fontFamily; private _textalign; private readonly _textColor; private _text; private _initializeFunction; private static readonly _defaultText; protected renderInitialize(): void; protected updateCenterOffset(updateTransform: boolean): void; protected updateViewScale(updateTransform: boolean): void; /** * text that is displayed (default: null) */ get text(): string | null; /** * text that is displayed (default: null) */ set text(value: string | null); private setTextInternal; /** * text render width (default: 2) * * this property is modifiable only when autoSize is false * * Outside of this range, css text will be overflowed */ get textWidth(): number; /** * text render width (default: 2) * * this property is modifiable only when autoSize is false * * Outside of this range, css text will be overflowed */ set textWidth(value: number); /** * text render height (default: 1) * * this property is modifiable only when autoSize is false * * Outside of this range, css text will be overflowed */ get textHeight(): number; /** * text render height (default: 1) * * this property is modifiable only when autoSize is false * * Outside of this range, css text will be overflowed */ set textHeight(value: number); /** * if this value is true, the textWidth and textHeight will be automatically calculated (default: false) */ get autoSize(): boolean; /** * if this value is true, the textWidth and textHeight will be automatically calculated (default: false) */ set autoSize(value: boolean); /** * font size as pixel value (default: 8) */ get fontSize(): number; /** * font size as pixel value (default: 8) */ set fontSize(value: number); /** * font weight (default: `FontWeight.Normal`) */ get fontWeight(): FontWeight; /** * font weight (default: `FontWeight.Normal`) */ set fontWeight(value: FontWeight); /** * font family (default: "Arial") */ get fontFamily(): string; /** * font family (default: "Arial") */ set fontFamily(value: string); /** * text align (default: `TextAlign.Left`) */ get textAlign(): TextAlign; /** * text align (default: `TextAlign.Left`) */ set textAlign(value: TextAlign); /** * text color (default: "black") */ get textColor(): ReadonlyColor; /** * text color (default: "black") */ set textColor(value: ReadonlyColor); }