@twick/timeline / Exports / TextElement
Class: TextElement
Hierarchy
-
↳
TextElement
Table of contents
Constructors
Properties
Methods
- accept
- getAnimation
- getDuration
- getEnd
- getId
- getLineWidth
- getName
- getPosition
- getProps
- getStart
- getStrokeColor
- getText
- getTextEffect
- getTrackId
- getType
- setAnimation
- setEnd
- setFill
- setFontFamily
- setFontSize
- setFontStyle
- setFontWeight
- setId
- setLineWidth
- setName
- setPosition
- setProps
- setRotation
- setStart
- setStrokeColor
- setText
- setTextAlign
- setTextEffect
- setTrackId
- setType
Constructors
constructor
• new TextElement(text): TextElement
Parameters
| Name | Type |
|---|---|
text | string |
Returns
Overrides
Defined in
packages/timeline/src/core/elements/text.element.ts:11
Properties
animation
• Protected Optional animation: ElementAnimation
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:13
e
• Protected e: number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:10
id
• Protected id: string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:7
name
• Protected name: string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:12
props
• Protected props: TextProps
Overrides
Defined in
packages/timeline/src/core/elements/text.element.ts:9
s
• Protected s: number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:9
textEffect
• Protected Optional textEffect: ElementTextEffect
Defined in
packages/timeline/src/core/elements/text.element.ts:8
trackId
• Protected trackId: string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:11
type
• Protected type: string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:8
Methods
accept
▸ accept<T>(visitor): T
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
visitor | ElementVisitor<T> |
Returns
T
Overrides
Defined in
packages/timeline/src/core/elements/text.element.ts:90
getAnimation
▸ getAnimation(): undefined | ElementAnimation
Returns
undefined | ElementAnimation
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:59
getDuration
▸ getDuration(): number
Returns
number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:43
getEnd
▸ getEnd(): number
Returns
number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:39
getId
▸ getId(): string
Returns
string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:27
getLineWidth
▸ getLineWidth(): undefined | number
Returns
undefined | number
Defined in
packages/timeline/src/core/elements/text.element.ts:31
getName
▸ getName(): string
Returns
string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:55
getPosition
▸ getPosition(): Position
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:63
getProps
▸ getProps(): Record<string, any>
Returns
Record<string, any>
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:51
getStart
▸ getStart(): number
Returns
number
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:35
getStrokeColor
▸ getStrokeColor(): undefined | string
Returns
undefined | string
Defined in
packages/timeline/src/core/elements/text.element.ts:27
getText
▸ getText(): string
Returns
string
Defined in
packages/timeline/src/core/elements/text.element.ts:23
getTextEffect
▸ getTextEffect(): undefined | ElementTextEffect
Returns
undefined | ElementTextEffect
Defined in
packages/timeline/src/core/elements/text.element.ts:19
getTrackId
▸ getTrackId(): string
Returns
string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:47
getType
▸ getType(): string
Returns
string
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:31
setAnimation
▸ setAnimation(animation?): TextElement
Parameters
| Name | Type |
|---|---|
animation? | ElementAnimation |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:100
setEnd
▸ setEnd(e): TextElement
Parameters
| Name | Type |
|---|---|
e | number |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:85
setFill
▸ setFill(fill): TextElement
Parameters
| Name | Type |
|---|---|
fill | string |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:40
setFontFamily
▸ setFontFamily(fontFamily): TextElement
Parameters
| Name | Type |
|---|---|
fontFamily | string |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:55
setFontSize
▸ setFontSize(fontSize): TextElement
Parameters
| Name | Type |
|---|---|
fontSize | number |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:50
setFontStyle
▸ setFontStyle(fontStyle): TextElement
Parameters
| Name | Type |
|---|---|
fontStyle | "normal" | "italic" |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:65
setFontWeight
▸ setFontWeight(fontWeight): TextElement
Parameters
| Name | Type |
|---|---|
fontWeight | number |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:60
setId
▸ setId(id): TextElement
Parameters
| Name | Type |
|---|---|
id | string |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:70
setLineWidth
▸ setLineWidth(lineWidth): TextElement
Parameters
| Name | Type |
|---|---|
lineWidth | number |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:85
setName
▸ setName(name): TextElement
Parameters
| Name | Type |
|---|---|
name | string |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:95
setPosition
▸ setPosition(position): TextElement
Parameters
| Name | Type |
|---|---|
position | Position |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:105
setProps
▸ setProps(props): TextElement
Parameters
| Name | Type |
|---|---|
props | Record<string, any> |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:111
setRotation
▸ setRotation(rotation): TextElement
Parameters
| Name | Type |
|---|---|
rotation | number |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:45
setStart
▸ setStart(s): TextElement
Parameters
| Name | Type |
|---|---|
s | number |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:80
setStrokeColor
▸ setStrokeColor(stroke): TextElement
Parameters
| Name | Type |
|---|---|
stroke | string |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:80
setText
▸ setText(text): TextElement
Parameters
| Name | Type |
|---|---|
text | string |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:35
setTextAlign
▸ setTextAlign(textAlign): TextElement
Parameters
| Name | Type |
|---|---|
textAlign | TextAlign |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:75
setTextEffect
▸ setTextEffect(textEffect?): TextElement
Parameters
| Name | Type |
|---|---|
textEffect? | ElementTextEffect |
Returns
Defined in
packages/timeline/src/core/elements/text.element.ts:70
setTrackId
▸ setTrackId(trackId): TextElement
Parameters
| Name | Type |
|---|---|
trackId | string |
Returns
Inherited from
Defined in
packages/timeline/src/core/elements/base.element.ts:90
setType
▸ setType(type): TextElement
Parameters
| Name | Type |
|---|---|
type | string |