@mescius/dsimageviewer
Version:
Document Solutions Image Viewer
36 lines (35 loc) • 1.5 kB
TypeScript
//@ts-ignore
import { Color } from '@grapecity/core-ui';
import { IPaintObject, PaintObjectParameters, PaintObjectPropertyName } from "../../../ImageViewer/Layers/types";
import { Bounds, PointLocation, Size } from "../../../ImageViewer/Models/SelectionBoxTypes";
interface DrawTextParams {
text: string;
x?: number;
y?: number;
maxWidth?: number;
lineHeight?: number;
calcSizeOnly?: boolean;
wordWrap?: boolean;
}
export declare class TextPaintObject implements IPaintObject {
text: string;
position: PointLocation;
textColor: Color;
fontSize: number;
fontName: string;
fontBold: boolean;
fontItalic: boolean;
opacity: number;
private _bounds;
constructor(text: string, position: PointLocation, textColor: Color, fontSize: number, fontName: string, fontBold: boolean, fontItalic: boolean, opacity: number);
name: "TextPaintObject";
get bounds(): Bounds;
set bounds(bounds: Bounds);
setFontStyle(ctx: CanvasRenderingContext2D): void;
draw(destCtx: CanvasRenderingContext2D, mainCtx: CanvasRenderingContext2D, backCtx: CanvasRenderingContext2D, params?: PaintObjectParameters): void;
drawTextWithLineBreaks(context: CanvasRenderingContext2D, args: DrawTextParams): Size;
getContentSize(ctx: CanvasRenderingContext2D): Size;
getProperty(propertyName: PaintObjectPropertyName): any;
setProperty(propertyName: PaintObjectPropertyName, value: any): boolean;
}
export {};