@next2d/text 1.18.12 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +14 -18
- package/src/TextArea/service/TextAreaMovePositionService.d.ts +11 -0
- package/src/TextArea/service/TextAreaMovePositionService.js +42 -0
- package/src/TextArea/usecase/TextAreaCompositionEndUseCase.d.ts +9 -0
- package/src/TextArea/usecase/TextAreaCompositionEndUseCase.js +17 -0
- package/src/TextArea/usecase/TextAreaCompositionStartUseCase.d.ts +9 -0
- package/src/TextArea/usecase/TextAreaCompositionStartUseCase.js +17 -0
- package/src/TextArea/usecase/TextAreaCompositionUpdateUseCase.d.ts +10 -0
- package/src/TextArea/usecase/TextAreaCompositionUpdateUseCase.js +18 -0
- package/src/TextArea/usecase/TextAreaInputUseCase.d.ts +10 -0
- package/src/TextArea/usecase/TextAreaInputUseCase.js +25 -0
- package/src/TextArea/usecase/TextAreaRegisterEventUseCase.d.ts +10 -0
- package/src/TextArea/usecase/TextAreaRegisterEventUseCase.js +21 -0
- package/src/TextData.d.ts +103 -0
- package/src/TextData.js +183 -0
- package/src/TextField/service/TextFieldApplyChangesService.d.ts +11 -0
- package/src/TextField/service/TextFieldApplyChangesService.js +16 -0
- package/src/TextField/service/TextFieldBlinkingClearTimeoutService.d.ts +9 -0
- package/src/TextField/service/TextFieldBlinkingClearTimeoutService.js +16 -0
- package/src/TextField/service/TextFieldCompositionStartService.d.ts +11 -0
- package/src/TextField/service/TextFieldCompositionStartService.js +12 -0
- package/src/TextField/service/TextFieldPasteService.d.ts +11 -0
- package/src/TextField/service/TextFieldPasteService.js +16 -0
- package/src/TextField/usecase/TextFieldArrowDownUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldArrowDownUseCase.js +191 -0
- package/src/TextField/usecase/TextFieldArrowLeftUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldArrowLeftUseCase.js +98 -0
- package/src/TextField/usecase/TextFieldArrowRightUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldArrowRightUseCase.js +92 -0
- package/src/TextField/usecase/TextFieldArrowUpUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldArrowUpUseCase.js +156 -0
- package/src/TextField/usecase/TextFieldBlinkingUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldBlinkingUseCase.js +21 -0
- package/src/TextField/usecase/TextFieldBuildFromCharacterUseCase.d.ts +13 -0
- package/src/TextField/usecase/TextFieldBuildFromCharacterUseCase.js +58 -0
- package/src/TextField/usecase/TextFieldCompositionEndUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldCompositionEndUseCase.js +32 -0
- package/src/TextField/usecase/TextFieldCompositionUpdateUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldCompositionUpdateUseCase.js +109 -0
- package/src/TextField/usecase/TextFieldCopyUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldCopyUseCase.js +38 -0
- package/src/TextField/usecase/TextFieldDeleteTextUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldDeleteTextUseCase.js +108 -0
- package/src/TextField/usecase/TextFieldGetLineTextUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldGetLineTextUseCase.js +32 -0
- package/src/TextField/usecase/TextFieldGetTextDataUseCase.d.ts +15 -0
- package/src/TextField/usecase/TextFieldGetTextDataUseCase.js +26 -0
- package/src/TextField/usecase/TextFieldHtmlTextToRawTextUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldHtmlTextToRawTextUseCase.js +31 -0
- package/src/TextField/usecase/TextFieldInsertTextUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldInsertTextUseCase.js +79 -0
- package/src/TextField/usecase/TextFieldKeyDownEventUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldKeyDownEventUseCase.js +60 -0
- package/src/TextField/usecase/TextFieldReloadUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldReloadUseCase.js +25 -0
- package/src/TextField/usecase/TextFieldReplaceTextUseCase.d.ts +14 -0
- package/src/TextField/usecase/TextFieldReplaceTextUseCase.js +24 -0
- package/src/TextField/usecase/TextFieldResetUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldResetUseCase.js +20 -0
- package/src/TextField/usecase/TextFieldResizeAutoFontSizeUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldResizeAutoFontSizeUseCase.js +37 -0
- package/src/TextField/usecase/TextFieldResizeUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldResizeUseCase.js +49 -0
- package/src/TextField/usecase/TextFieldSelectAllUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldSelectAllUseCase.js +20 -0
- package/src/TextField/usecase/TextFieldSelectedFocusMoveUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldSelectedFocusMoveUseCase.js +90 -0
- package/src/TextField/usecase/TextFieldSetFocusIndexUseCase.d.ts +14 -0
- package/src/TextField/usecase/TextFieldSetFocusIndexUseCase.js +197 -0
- package/src/TextField/usecase/TextFieldSetFocusUseCase.d.ts +11 -0
- package/src/TextField/usecase/TextFieldSetFocusUseCase.js +43 -0
- package/src/TextField/usecase/TextFieldSetScrollXUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldSetScrollXUseCase.js +66 -0
- package/src/TextField/usecase/TextFieldSetScrollYUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldSetScrollYUseCase.js +66 -0
- package/src/TextField/usecase/TextFieldUpdateStopIndexUseCase.d.ts +12 -0
- package/src/TextField/usecase/TextFieldUpdateStopIndexUseCase.js +82 -0
- package/src/TextField.d.ts +602 -0
- package/src/TextField.js +1292 -0
- package/src/TextFormat/service/TextFormatGenerateFontStyleService.d.ts +11 -0
- package/src/TextFormat/service/TextFormatGenerateFontStyleService.js +19 -0
- package/src/TextFormat/service/TextFormatGetWidthMarginService.d.ts +11 -0
- package/src/TextFormat/service/TextFormatGetWidthMarginService.js +19 -0
- package/src/TextFormat/service/TextFormatHtmlTextGenerateStyleService.d.ts +11 -0
- package/src/TextFormat/service/TextFormatHtmlTextGenerateStyleService.js +51 -0
- package/src/TextFormat/service/TextFormatIsSameService.d.ts +12 -0
- package/src/TextFormat/service/TextFormatIsSameService.js +28 -0
- package/src/TextFormat/service/TextFormatSetDefaultService.d.ts +11 -0
- package/src/TextFormat/service/TextFormatSetDefaultService.js +22 -0
- package/{dist → src}/TextFormat.d.ts +42 -128
- package/src/TextFormat.js +233 -0
- package/src/TextParser/service/TextParserAdjustmentHeightService.d.ts +11 -0
- package/src/TextParser/service/TextParserAdjustmentHeightService.js +24 -0
- package/src/TextParser/service/TextParserParseStyleService.d.ts +11 -0
- package/src/TextParser/service/TextParserParseStyleService.js +80 -0
- package/src/TextParser/usecase/TextParserCreateNewLineUseCase.d.ts +13 -0
- package/src/TextParser/usecase/TextParserCreateNewLineUseCase.js +35 -0
- package/src/TextParser/usecase/TextParserParseHtmlTextUseCase.d.ts +15 -0
- package/src/TextParser/usecase/TextParserParseHtmlTextUseCase.js +37 -0
- package/src/TextParser/usecase/TextParserParseTagUseCase.d.ts +17 -0
- package/src/TextParser/usecase/TextParserParseTagUseCase.js +57 -0
- package/src/TextParser/usecase/TextParserParseTextUseCase.d.ts +16 -0
- package/src/TextParser/usecase/TextParserParseTextUseCase.js +140 -0
- package/src/TextParser/usecase/TextParserSetAttributesUseCase.d.ts +14 -0
- package/src/TextParser/usecase/TextParserSetAttributesUseCase.js +63 -0
- package/src/TextUtil.d.ts +114 -0
- package/src/TextUtil.js +186 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +3 -0
- package/src/interface/IAttributeObject.d.ts +4 -0
- package/src/interface/IBlendMode.d.ts +1 -0
- package/src/interface/IBounds.d.ts +6 -0
- package/src/interface/ICharacter.d.ts +5 -0
- package/src/interface/ICharacter.js +1 -0
- package/src/interface/IDictionaryTag.d.ts +8 -0
- package/src/interface/IDictionaryTag.js +1 -0
- package/src/interface/IElementPosition.d.ts +4 -0
- package/src/interface/IElementPosition.js +1 -0
- package/src/interface/IFilterArray.d.ts +2 -0
- package/src/interface/IFilterArray.js +1 -0
- package/src/interface/IGrid.d.ts +6 -0
- package/src/interface/IGrid.js +1 -0
- package/src/interface/ILoopConfig.d.ts +8 -0
- package/src/interface/ILoopConfig.js +1 -0
- package/src/interface/ILoopType.d.ts +1 -0
- package/src/interface/ILoopType.js +1 -0
- package/src/interface/IMovieClipActionObject.d.ts +5 -0
- package/src/interface/IMovieClipActionObject.js +1 -0
- package/src/interface/IMovieClipCharacter.d.ts +17 -0
- package/src/interface/IMovieClipCharacter.js +1 -0
- package/src/interface/IMovieClipLabelObject.d.ts +4 -0
- package/src/interface/IMovieClipLabelObject.js +1 -0
- package/src/interface/IMovieClipSoundObject.d.ts +5 -0
- package/src/interface/IMovieClipSoundObject.js +1 -0
- package/src/interface/IOptions.d.ts +8 -0
- package/src/interface/IOptions.js +1 -0
- package/src/interface/IPlaceObject.d.ts +14 -0
- package/src/interface/IPlaceObject.js +1 -0
- package/src/interface/IRGBA.d.ts +6 -0
- package/src/interface/IRGBA.js +1 -0
- package/src/interface/IShapeCharacter.d.ts +14 -0
- package/src/interface/IShapeCharacter.js +1 -0
- package/src/interface/ISoundTag.d.ts +6 -0
- package/src/interface/ISoundTag.js +1 -0
- package/src/interface/ISurfaceFilter.d.ts +6 -0
- package/src/interface/ISurfaceFilter.js +1 -0
- package/src/interface/ITextFieldAutoSize.d.ts +1 -0
- package/src/interface/ITextFieldAutoSize.js +1 -0
- package/src/interface/ITextFieldCharacter copy.d.ts +26 -0
- package/src/interface/ITextFieldCharacter copy.js +1 -0
- package/src/interface/ITextFieldCharacter.d.ts +26 -0
- package/src/interface/ITextFieldCharacter.js +1 -0
- package/src/interface/ITextFieldType copy.d.ts +1 -0
- package/src/interface/ITextFieldType copy.js +1 -0
- package/src/interface/ITextFieldType.d.ts +1 -0
- package/src/interface/ITextFieldType.js +1 -0
- package/src/interface/ITextFormatAlign copy.d.ts +1 -0
- package/src/interface/ITextFormatAlign copy.js +1 -0
- package/src/interface/ITextFormatAlign.d.ts +1 -0
- package/src/interface/ITextFormatAlign.js +1 -0
- package/src/interface/ITextFormatObject.d.ts +14 -0
- package/src/interface/ITextFormatObject.js +1 -0
- package/src/interface/ITextObject.d.ts +12 -0
- package/src/interface/ITextObject.js +1 -0
- package/src/interface/ITextObjectMode.d.ts +1 -0
- package/src/interface/ITextObjectMode.js +1 -0
- package/src/interface/IVideoCharacter.d.ts +11 -0
- package/src/interface/IVideoCharacter.js +1 -0
- package/dist/TextData.d.ts +0 -74
- package/dist/TextData.js +0 -132
- package/dist/TextFormat.js +0 -493
- package/dist/TextParser.d.ts +0 -23
- package/dist/TextParser.js +0 -459
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -3
- package/dist/interface/OptionsImpl.d.ts +0 -8
- package/dist/interface/TextObjectImpl.d.ts +0 -12
- package/dist/interface/TextObjectModeImpl.d.ts +0 -1
- /package/{dist/interface/OptionsImpl.js → src/interface/IAttributeObject.js} +0 -0
- /package/{dist/interface/TextObjectImpl.js → src/interface/IBlendMode.js} +0 -0
- /package/{dist/interface/TextObjectModeImpl.js → src/interface/IBounds.js} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TextFormat } from "../../TextFormat";
|
|
2
|
+
/**
|
|
3
|
+
* @description テキストフォーマットからフォントスタイルを生成
|
|
4
|
+
* Generate font style from text format
|
|
5
|
+
*
|
|
6
|
+
* @param {TextFormat} text_frmat
|
|
7
|
+
* @return {string}
|
|
8
|
+
* @method
|
|
9
|
+
* @protected
|
|
10
|
+
*/
|
|
11
|
+
export declare const execute: (text_frmat: TextFormat) => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description テキストフォーマットからフォントスタイルを生成
|
|
3
|
+
* Generate font style from text format
|
|
4
|
+
*
|
|
5
|
+
* @param {TextFormat} text_frmat
|
|
6
|
+
* @return {string}
|
|
7
|
+
* @method
|
|
8
|
+
* @protected
|
|
9
|
+
*/
|
|
10
|
+
export const execute = (text_frmat) => {
|
|
11
|
+
let fontStyle = "";
|
|
12
|
+
if (text_frmat.italic) {
|
|
13
|
+
fontStyle = "italic ";
|
|
14
|
+
}
|
|
15
|
+
if (text_frmat.bold) {
|
|
16
|
+
fontStyle += "bold ";
|
|
17
|
+
}
|
|
18
|
+
return `${fontStyle}${text_frmat.size}px '${text_frmat.font}',sans-serif`;
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TextFormat } from "../../TextFormat";
|
|
2
|
+
/**
|
|
3
|
+
* @description テキストフォーマットから幅のマージンを取得
|
|
4
|
+
* Get width margin from text format
|
|
5
|
+
*
|
|
6
|
+
* @param {TextFormat} text_format
|
|
7
|
+
* @return {number}
|
|
8
|
+
* @method
|
|
9
|
+
* @protected
|
|
10
|
+
*/
|
|
11
|
+
export declare const execute: (text_format: TextFormat) => number;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description テキストフォーマットから幅のマージンを取得
|
|
3
|
+
* Get width margin from text format
|
|
4
|
+
*
|
|
5
|
+
* @param {TextFormat} text_format
|
|
6
|
+
* @return {number}
|
|
7
|
+
* @method
|
|
8
|
+
* @protected
|
|
9
|
+
*/
|
|
10
|
+
export const execute = (text_format) => {
|
|
11
|
+
let width = 0;
|
|
12
|
+
if (text_format.leftMargin) {
|
|
13
|
+
width += text_format.leftMargin;
|
|
14
|
+
}
|
|
15
|
+
if (text_format.rightMargin) {
|
|
16
|
+
width += text_format.rightMargin;
|
|
17
|
+
}
|
|
18
|
+
return width;
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TextFormat } from "../../TextFormat";
|
|
2
|
+
/**
|
|
3
|
+
* @description テキストフォーマットをHTMLのstyle属性に変換します。
|
|
4
|
+
* Converts text format to the style attribute of HTML.
|
|
5
|
+
*
|
|
6
|
+
* @param {TextFormat} text_format
|
|
7
|
+
* @return {string}
|
|
8
|
+
* @method
|
|
9
|
+
* @protected
|
|
10
|
+
*/
|
|
11
|
+
export declare const execute: (text_format: TextFormat) => string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { $intToRGBA, $toColorInt } from "../../TextUtil";
|
|
2
|
+
/**
|
|
3
|
+
* @description テキストフォーマットをHTMLのstyle属性に変換します。
|
|
4
|
+
* Converts text format to the style attribute of HTML.
|
|
5
|
+
*
|
|
6
|
+
* @param {TextFormat} text_format
|
|
7
|
+
* @return {string}
|
|
8
|
+
* @method
|
|
9
|
+
* @protected
|
|
10
|
+
*/
|
|
11
|
+
export const execute = (text_format) => {
|
|
12
|
+
let style = "";
|
|
13
|
+
if (text_format.font) {
|
|
14
|
+
style += `font-family: ${text_format.font};`;
|
|
15
|
+
}
|
|
16
|
+
if (text_format.size) {
|
|
17
|
+
style += `font-size: ${text_format.size}px;`;
|
|
18
|
+
}
|
|
19
|
+
if (text_format.color) {
|
|
20
|
+
const color = $intToRGBA($toColorInt(text_format.color));
|
|
21
|
+
const R = color.R.toString(16).padStart(2, "0");
|
|
22
|
+
const G = color.G.toString(16).padStart(2, "0");
|
|
23
|
+
const B = color.B.toString(16).padStart(2, "0");
|
|
24
|
+
style += `color: #${R}${G}${B};`;
|
|
25
|
+
}
|
|
26
|
+
if (text_format.bold) {
|
|
27
|
+
style += "font-weight: bold;";
|
|
28
|
+
}
|
|
29
|
+
if (text_format.italic) {
|
|
30
|
+
style += "font-style: italic;";
|
|
31
|
+
}
|
|
32
|
+
if (text_format.underline) {
|
|
33
|
+
style += "text-decoration: underline;";
|
|
34
|
+
}
|
|
35
|
+
if (text_format.align) {
|
|
36
|
+
style += `text-align: ${text_format.align};`;
|
|
37
|
+
}
|
|
38
|
+
if (text_format.leftMargin) {
|
|
39
|
+
style += `margin-left: ${text_format.leftMargin}px;`;
|
|
40
|
+
}
|
|
41
|
+
if (text_format.rightMargin) {
|
|
42
|
+
style += `margin-right: ${text_format.rightMargin}px;`;
|
|
43
|
+
}
|
|
44
|
+
if (text_format.leading) {
|
|
45
|
+
style += `margin-bottom: ${text_format.leading}px;`;
|
|
46
|
+
}
|
|
47
|
+
if (text_format.letterSpacing) {
|
|
48
|
+
style += `letter-spacing: ${text_format.letterSpacing}px;`;
|
|
49
|
+
}
|
|
50
|
+
return style;
|
|
51
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TextFormat } from "../../TextFormat";
|
|
2
|
+
/**
|
|
3
|
+
* @description TextFormat の比較
|
|
4
|
+
* TextFormat comparison
|
|
5
|
+
*
|
|
6
|
+
* @param {TextFormat} source
|
|
7
|
+
* @param {TextFormat} destination
|
|
8
|
+
* @return {boolean}
|
|
9
|
+
* @method
|
|
10
|
+
* @protected
|
|
11
|
+
*/
|
|
12
|
+
export declare const execute: (source: TextFormat, destination: TextFormat) => boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description TextFormat の比較
|
|
3
|
+
* TextFormat comparison
|
|
4
|
+
*
|
|
5
|
+
* @param {TextFormat} source
|
|
6
|
+
* @param {TextFormat} destination
|
|
7
|
+
* @return {boolean}
|
|
8
|
+
* @method
|
|
9
|
+
* @protected
|
|
10
|
+
*/
|
|
11
|
+
export const execute = (source, destination) => {
|
|
12
|
+
switch (true) {
|
|
13
|
+
case source.font !== destination.font:
|
|
14
|
+
case source.size !== destination.size:
|
|
15
|
+
case source.color !== destination.color:
|
|
16
|
+
case source.bold !== destination.bold:
|
|
17
|
+
case source.italic !== destination.italic:
|
|
18
|
+
case source.underline !== destination.underline:
|
|
19
|
+
case source.align !== destination.align:
|
|
20
|
+
case source.leftMargin !== destination.leftMargin:
|
|
21
|
+
case source.rightMargin !== destination.rightMargin:
|
|
22
|
+
case source.leading !== destination.leading:
|
|
23
|
+
case source.letterSpacing !== destination.letterSpacing:
|
|
24
|
+
return false;
|
|
25
|
+
default:
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TextFormat } from "../../TextFormat";
|
|
2
|
+
/**
|
|
3
|
+
* @description TextFormat のデフォルト設定を行います
|
|
4
|
+
* Set the default settings for TextFormat
|
|
5
|
+
*
|
|
6
|
+
* @param {TextFormat} text_format
|
|
7
|
+
* @return {void}
|
|
8
|
+
* @method
|
|
9
|
+
* @protected
|
|
10
|
+
*/
|
|
11
|
+
export declare const execute: (text_format: TextFormat) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description TextFormat のデフォルト設定を行います
|
|
3
|
+
* Set the default settings for TextFormat
|
|
4
|
+
*
|
|
5
|
+
* @param {TextFormat} text_format
|
|
6
|
+
* @return {void}
|
|
7
|
+
* @method
|
|
8
|
+
* @protected
|
|
9
|
+
*/
|
|
10
|
+
export const execute = (text_format) => {
|
|
11
|
+
text_format.align = "left";
|
|
12
|
+
text_format.bold = false;
|
|
13
|
+
text_format.color = 0;
|
|
14
|
+
text_format.font = "Times New Roman";
|
|
15
|
+
text_format.italic = false;
|
|
16
|
+
text_format.leading = 0;
|
|
17
|
+
text_format.leftMargin = 0;
|
|
18
|
+
text_format.letterSpacing = 0;
|
|
19
|
+
text_format.rightMargin = 0;
|
|
20
|
+
text_format.size = 12;
|
|
21
|
+
text_format.underline = false;
|
|
22
|
+
};
|
|
@@ -1,82 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITextFormatAlign } from "./interface/ITextFormatAlign";
|
|
2
|
+
import type { ITextFormatObject } from "./interface/ITextFormatObject";
|
|
2
3
|
/**
|
|
3
|
-
* TextFormat クラスは、文字フォーマット情報を表します。
|
|
4
|
-
*
|
|
4
|
+
* @description TextFormat クラスは、文字フォーマット情報を表します。
|
|
5
|
+
* TextFormat クラスを使用して、テキストフィールドに特定のテキストフォーマットを作成します。
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* The TextFormat class represents character formatting information.
|
|
8
|
+
* Use the TextFormat class to create specific text formatting for text fields.
|
|
8
9
|
*
|
|
9
10
|
* @class
|
|
10
11
|
* @memberOf next2d.text
|
|
11
12
|
*/
|
|
12
13
|
export declare class TextFormat {
|
|
13
|
-
private _$font;
|
|
14
|
-
private _$size;
|
|
15
|
-
private _$color;
|
|
16
|
-
private _$bold;
|
|
17
|
-
private _$italic;
|
|
18
|
-
private _$underline;
|
|
19
|
-
private _$align;
|
|
20
|
-
private _$leftMargin;
|
|
21
|
-
private _$rightMargin;
|
|
22
|
-
private _$leading;
|
|
23
|
-
private _$letterSpacing;
|
|
24
|
-
/**
|
|
25
|
-
* @param {string} [font=null]
|
|
26
|
-
* @param {number} [size=null]
|
|
27
|
-
* @param {number} [color=null]
|
|
28
|
-
* @param {boolean} [bold=null]
|
|
29
|
-
* @param {boolean} [italic=null]
|
|
30
|
-
* @param {boolean} [underline=null]
|
|
31
|
-
* @param {string} [align=null]
|
|
32
|
-
* @param {number} [left_margin=null]
|
|
33
|
-
* @param {number} [right_margin=null]
|
|
34
|
-
* @param {number} [leading=null]
|
|
35
|
-
*
|
|
36
|
-
* @constructor
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
constructor(font?: string | null, size?: number | null, color?: number | null, bold?: boolean | null, italic?: boolean | null, underline?: boolean | null, align?: TextFormatAlignImpl | null, left_margin?: number | null, right_margin?: number | null, leading?: number | null);
|
|
40
|
-
/**
|
|
41
|
-
* @description 指定されたクラスのストリングを返します。
|
|
42
|
-
* Returns the string representation of the specified class.
|
|
43
|
-
*
|
|
44
|
-
* @return {string}
|
|
45
|
-
* @default [class TextFormat]
|
|
46
|
-
* @method
|
|
47
|
-
* @static
|
|
48
|
-
*/
|
|
49
|
-
static toString(): string;
|
|
50
|
-
/**
|
|
51
|
-
* @description 指定されたクラスの空間名を返します。
|
|
52
|
-
* Returns the space name of the specified class.
|
|
53
|
-
*
|
|
54
|
-
* @return {string}
|
|
55
|
-
* @default next2d.text.TextFormat
|
|
56
|
-
* @const
|
|
57
|
-
* @static
|
|
58
|
-
*/
|
|
59
|
-
static get namespace(): string;
|
|
60
|
-
/**
|
|
61
|
-
* @description 指定されたオブジェクトのストリングを返します。
|
|
62
|
-
* Returns the string representation of the specified object.
|
|
63
|
-
*
|
|
64
|
-
* @return {string}
|
|
65
|
-
* @default [object TextFormat]
|
|
66
|
-
* @method
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
69
|
-
toString(): string;
|
|
70
|
-
/**
|
|
71
|
-
* @description 指定されたオブジェクトの空間名を返します。
|
|
72
|
-
* Returns the space name of the specified object.
|
|
73
|
-
*
|
|
74
|
-
* @return {string}
|
|
75
|
-
* @default next2d.text.TextFormat
|
|
76
|
-
* @const
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
79
|
-
get namespace(): string;
|
|
80
14
|
/**
|
|
81
15
|
* @description 段落の行揃えの設定を示します。
|
|
82
16
|
* Indicates the alignment of the paragraph.
|
|
@@ -85,8 +19,7 @@ export declare class TextFormat {
|
|
|
85
19
|
* @default null
|
|
86
20
|
* @public
|
|
87
21
|
*/
|
|
88
|
-
|
|
89
|
-
set align(align: TextFormatAlignImpl | null);
|
|
22
|
+
align: ITextFormatAlign | null;
|
|
90
23
|
/**
|
|
91
24
|
* @description テキストをボールドにするかどうかを指定します。
|
|
92
25
|
* Specifies whether the text is boldface.
|
|
@@ -95,8 +28,7 @@ export declare class TextFormat {
|
|
|
95
28
|
* @default null
|
|
96
29
|
* @public
|
|
97
30
|
*/
|
|
98
|
-
|
|
99
|
-
set bold(bold: boolean | null);
|
|
31
|
+
bold: boolean | null;
|
|
100
32
|
/**
|
|
101
33
|
* @description テキストの色を示します。
|
|
102
34
|
* Indicates the color of the text.
|
|
@@ -105,8 +37,7 @@ export declare class TextFormat {
|
|
|
105
37
|
* @default null
|
|
106
38
|
* @public
|
|
107
39
|
*/
|
|
108
|
-
|
|
109
|
-
set color(color: number | null);
|
|
40
|
+
color: number | null;
|
|
110
41
|
/**
|
|
111
42
|
* @description このテキストフォーマットでのテキストフォント名を示すストリングです。
|
|
112
43
|
* The name of the font for text in this text format, as a string.
|
|
@@ -115,8 +46,7 @@ export declare class TextFormat {
|
|
|
115
46
|
* @default null
|
|
116
47
|
* @public
|
|
117
48
|
*/
|
|
118
|
-
|
|
119
|
-
set font(font: string | null);
|
|
49
|
+
font: string | null;
|
|
120
50
|
/**
|
|
121
51
|
* @description このテキストフォーマットのテキストをイタリックにするかどうかを示します。
|
|
122
52
|
* Indicates whether text in this text format is italicized.
|
|
@@ -125,8 +55,7 @@ export declare class TextFormat {
|
|
|
125
55
|
* @default null
|
|
126
56
|
* @public
|
|
127
57
|
*/
|
|
128
|
-
|
|
129
|
-
set italic(italic: boolean | null);
|
|
58
|
+
italic: boolean | null;
|
|
130
59
|
/**
|
|
131
60
|
* @description 行間の垂直の行送りを示す整数です。
|
|
132
61
|
* An integer representing the amount
|
|
@@ -136,8 +65,7 @@ export declare class TextFormat {
|
|
|
136
65
|
* @default null
|
|
137
66
|
* @public
|
|
138
67
|
*/
|
|
139
|
-
|
|
140
|
-
set leading(leading: number | null);
|
|
68
|
+
leading: number | null;
|
|
141
69
|
/**
|
|
142
70
|
* @description 段落の左インデントをピクセル単位で示します。
|
|
143
71
|
* The left margin of the paragraph, in pixels.
|
|
@@ -146,8 +74,7 @@ export declare class TextFormat {
|
|
|
146
74
|
* @default null
|
|
147
75
|
* @public
|
|
148
76
|
*/
|
|
149
|
-
|
|
150
|
-
set leftMargin(left_margin: number | null);
|
|
77
|
+
leftMargin: number | null;
|
|
151
78
|
/**
|
|
152
79
|
* @description すべての文字の間に均等に配分されるスペースの量を表す数値です。
|
|
153
80
|
* A object representing the amount
|
|
@@ -157,8 +84,7 @@ export declare class TextFormat {
|
|
|
157
84
|
* @default null
|
|
158
85
|
* @public
|
|
159
86
|
*/
|
|
160
|
-
|
|
161
|
-
set letterSpacing(letter_spacing: number | null);
|
|
87
|
+
letterSpacing: number | null;
|
|
162
88
|
/**
|
|
163
89
|
* @description 段落の右インデントをピクセル単位で示します。
|
|
164
90
|
* The right margin of the paragraph, in pixels.
|
|
@@ -167,8 +93,7 @@ export declare class TextFormat {
|
|
|
167
93
|
* @default null
|
|
168
94
|
* @public
|
|
169
95
|
*/
|
|
170
|
-
|
|
171
|
-
set rightMargin(right_margin: number | null);
|
|
96
|
+
rightMargin: number | null;
|
|
172
97
|
/**
|
|
173
98
|
* @description このテキストフォーマットのテキストのサイズ(ピクセル単位)です。
|
|
174
99
|
* The size in pixels of text in this text format.
|
|
@@ -177,8 +102,7 @@ export declare class TextFormat {
|
|
|
177
102
|
* @default null
|
|
178
103
|
* @public
|
|
179
104
|
*/
|
|
180
|
-
|
|
181
|
-
set size(size: number | null);
|
|
105
|
+
size: number | null;
|
|
182
106
|
/**
|
|
183
107
|
* @description このテキストフォーマットを使用するテキストに
|
|
184
108
|
* アンダーラインを表示する(true)か、表示しない(false)かを示します。
|
|
@@ -189,49 +113,39 @@ export declare class TextFormat {
|
|
|
189
113
|
* @default null
|
|
190
114
|
* @public
|
|
191
115
|
*/
|
|
192
|
-
|
|
193
|
-
set underline(underline: boolean | null);
|
|
116
|
+
underline: boolean | null;
|
|
194
117
|
/**
|
|
195
|
-
* @
|
|
196
|
-
* @
|
|
197
|
-
* @
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
* @
|
|
202
|
-
* @
|
|
203
|
-
* @
|
|
118
|
+
* @param {string} [font=null]
|
|
119
|
+
* @param {number} [size=null]
|
|
120
|
+
* @param {number} [color=null]
|
|
121
|
+
* @param {boolean} [bold=null]
|
|
122
|
+
* @param {boolean} [italic=null]
|
|
123
|
+
* @param {boolean} [underline=null]
|
|
124
|
+
* @param {string} [align=null]
|
|
125
|
+
* @param {number} [left_margin=null]
|
|
126
|
+
* @param {number} [right_margin=null]
|
|
127
|
+
* @param {number} [leading=null]
|
|
128
|
+
*
|
|
129
|
+
* @constructor
|
|
130
|
+
* @public
|
|
204
131
|
*/
|
|
205
|
-
|
|
132
|
+
constructor(font?: string | null, size?: number | null, color?: number | null, bold?: boolean | null, italic?: boolean | null, underline?: boolean | null, align?: ITextFormatAlign | null, left_margin?: number | null, right_margin?: number | null, leading?: number | null, letter_Spacing?: number | null);
|
|
206
133
|
/**
|
|
134
|
+
* @description この TextFormat オブジェクトのコピーを作成して返します。
|
|
135
|
+
* Creates a copy of the TextFormat object and returns it.
|
|
136
|
+
*
|
|
207
137
|
* @return {next2d.text.TextFormat}
|
|
208
138
|
* @method
|
|
209
|
-
* @
|
|
210
|
-
*/
|
|
211
|
-
_$clone(): TextFormat;
|
|
212
|
-
/**
|
|
213
|
-
* @return {void}
|
|
214
|
-
* @method
|
|
215
|
-
* @private
|
|
216
|
-
*/
|
|
217
|
-
_$setDefault(): void;
|
|
218
|
-
/**
|
|
219
|
-
* @param {TextFormat} text_format
|
|
220
|
-
* @return {void}
|
|
221
|
-
* @method
|
|
222
|
-
* @private
|
|
223
|
-
*/
|
|
224
|
-
_$merge(text_format: TextFormat): void;
|
|
225
|
-
/**
|
|
226
|
-
* @return {number}
|
|
227
|
-
* @method
|
|
228
|
-
* @private
|
|
139
|
+
* @public
|
|
229
140
|
*/
|
|
230
|
-
|
|
141
|
+
clone(): TextFormat;
|
|
231
142
|
/**
|
|
232
|
-
* @
|
|
143
|
+
* @description この TextFormat オブジェクトのプロパティをオブジェクトに変換します。
|
|
144
|
+
* Converts the properties of this TextFormat object to an object.
|
|
145
|
+
*
|
|
146
|
+
* @return {ITextFormatObject}
|
|
233
147
|
* @method
|
|
234
|
-
* @
|
|
148
|
+
* @public
|
|
235
149
|
*/
|
|
236
|
-
|
|
150
|
+
toObject(): ITextFormatObject;
|
|
237
151
|
}
|