bd028579
易尊强
2/28
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import Displayable, { DisplayableProps, DisplayableStatePropNames } from './Displayable';
import BoundingRect from '../core/BoundingRect';
import { PathStyleProps } from './Path';
import { FontStyle, FontWeight } from '../core/types';
export interface TSpanStyleProps extends PathStyleProps {
x?: number;
y?: number;
text?: string;
font?: string;
fontSize?: number;
fontWeight?: FontWeight;
fontStyle?: FontStyle;
fontFamily?: string;
textAlign?: CanvasTextAlign;
textBaseline?: CanvasTextBaseline;
}
export declare const DEFAULT_TSPAN_STYLE: TSpanStyleProps;
export interface TSpanProps extends DisplayableProps {
style?: TSpanStyleProps;
}
export declare type TSpanState = Pick<TSpanProps, DisplayableStatePropNames>;
declare class TSpan extends Displayable<TSpanProps> {
style: TSpanStyleProps;
hasStroke(): boolean;
hasFill(): boolean;
createStyle(obj?: TSpanStyleProps): TSpanStyleProps;
setBoundingRect(rect: BoundingRect): void;
getBoundingRect(): BoundingRect;
protected static initDefaultProps: void;
}
export default TSpan;
|