source: imaps-frontend/node_modules/konva/lib/shapes/Text.d.ts@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 2.4 KB
Line 
1import { Context } from '../Context.js';
2import { Shape, ShapeConfig } from '../Shape.js';
3import { GetSet } from '../types.js';
4export declare function stringToArray(string: string): string[];
5export interface TextConfig extends ShapeConfig {
6 direction?: string;
7 text?: string;
8 fontFamily?: string;
9 fontSize?: number;
10 fontStyle?: string;
11 fontVariant?: string;
12 textDecoration?: string;
13 align?: string;
14 verticalAlign?: string;
15 padding?: number;
16 lineHeight?: number;
17 letterSpacing?: number;
18 wrap?: string;
19 ellipsis?: boolean;
20}
21export declare class Text extends Shape<TextConfig> {
22 textArr: Array<{
23 text: string;
24 width: number;
25 lastInParagraph: boolean;
26 }>;
27 _partialText: string;
28 _partialTextX: number;
29 _partialTextY: number;
30 textWidth: number;
31 textHeight: number;
32 constructor(config?: TextConfig);
33 _sceneFunc(context: Context): void;
34 _hitFunc(context: Context): void;
35 setText(text: string): this;
36 getWidth(): any;
37 getHeight(): any;
38 getTextWidth(): number;
39 getTextHeight(): number;
40 measureSize(text: any): {
41 actualBoundingBoxAscent: any;
42 actualBoundingBoxDescent: any;
43 actualBoundingBoxLeft: any;
44 actualBoundingBoxRight: any;
45 alphabeticBaseline: any;
46 emHeightAscent: any;
47 emHeightDescent: any;
48 fontBoundingBoxAscent: any;
49 fontBoundingBoxDescent: any;
50 hangingBaseline: any;
51 ideographicBaseline: any;
52 width: any;
53 height: number;
54 };
55 _getContextFont(): string;
56 _addTextLine(line: string): number;
57 _getTextWidth(text: string): number;
58 _setTextData(): void;
59 _shouldHandleEllipsis(currentHeightPx: number): boolean;
60 _tryToAddEllipsisToLastLine(): void;
61 getStrokeScaleEnabled(): boolean;
62 _useBufferCanvas(): boolean;
63 direction: GetSet<string, this>;
64 fontFamily: GetSet<string, this>;
65 fontSize: GetSet<number, this>;
66 fontStyle: GetSet<string, this>;
67 fontVariant: GetSet<string, this>;
68 align: GetSet<string, this>;
69 letterSpacing: GetSet<number, this>;
70 verticalAlign: GetSet<string, this>;
71 padding: GetSet<number, this>;
72 lineHeight: GetSet<number, this>;
73 textDecoration: GetSet<string, this>;
74 text: GetSet<string, this>;
75 wrap: GetSet<string, this>;
76 ellipsis: GetSet<boolean, this>;
77}
Note: See TracBrowser for help on using the repository browser.