@next2d/display 1.17.5 → 1.18.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/dist/Graphics.d.ts +1 -1
- package/dist/Graphics.js +3 -3
- package/dist/TextField.d.ts +125 -24
- package/dist/TextField.js +1194 -418
- package/package.json +12 -12
package/dist/Graphics.d.ts
CHANGED
package/dist/Graphics.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GraphicsBitmapFill } from "./GraphicsBitmapFill";
|
|
2
2
|
import { GraphicsGradientFill } from "./GraphicsGradientFill";
|
|
3
3
|
import { $currentPlayer } from "@next2d/util";
|
|
4
|
-
import { $cacheStore, $doUpdated, $Math, $Number, $getArray, $poolArray, $toColorInt, $intToRGBA, $clamp, $boundsMatrix, $poolBoundsObject, $Infinity, $getFloat32Array6, $multiplicationMatrix, $poolFloat32Array6, $getBoundsObject, $Float32Array, $getFloat32Array4, $linearGradientXY } from "@next2d/share";
|
|
4
|
+
import { $cacheStore, $doUpdated, $Math, $Number, $getArray, $poolArray, $toColorInt, $intToRGBA, $clamp, $boundsMatrix, $poolBoundsObject, $Infinity, $getFloat32Array6, $multiplicationMatrix, $poolFloat32Array6, $getBoundsObject, $Float32Array, $getFloat32Array4, $getInt32Array4, $linearGradientXY } from "@next2d/share";
|
|
5
5
|
/**
|
|
6
6
|
* Graphics クラスには、ベクターシェイプの作成に使用できる一連のメソッドがあります。
|
|
7
7
|
* 描画をサポートする表示オブジェクトには、Sprite および Shape オブジェクトがあります。
|
|
@@ -2162,7 +2162,7 @@ export class Graphics {
|
|
|
2162
2162
|
alpha = $Math.max(0, $Math.min(color.A + color_transform[7], 255)) | 0;
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
|
-
css.addColorStop(color.ratio, $
|
|
2165
|
+
css.addColorStop(color.ratio, $getInt32Array4(color.R, color.G, color.B, alpha));
|
|
2166
2166
|
}
|
|
2167
2167
|
context.fillStyle = css;
|
|
2168
2168
|
context.fill();
|
|
@@ -2211,7 +2211,7 @@ export class Graphics {
|
|
|
2211
2211
|
alpha = $Math.max(0, $Math.min(color.A + color_transform[7], 255)) | 0;
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
|
-
css.addColorStop(color.ratio, $
|
|
2214
|
+
css.addColorStop(color.ratio, $getInt32Array4(color.R, color.G, color.B, alpha));
|
|
2215
2215
|
}
|
|
2216
2216
|
context.strokeStyle = css;
|
|
2217
2217
|
context.stroke();
|
package/dist/TextField.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InteractiveObject } from "@next2d/display";
|
|
2
2
|
import { TextData, TextFormat } from "@next2d/text";
|
|
3
|
-
import { BoundsImpl, TextFieldTypeImpl,
|
|
4
|
-
import { CanvasToWebGLContext } from "@next2d/webgl";
|
|
3
|
+
import type { BoundsImpl, TextFieldTypeImpl, TextFieldAutoSizeImpl, ParentImpl, TextObjectImpl, DictionaryTagImpl, TextCharacterImpl, PlayerHitObjectImpl, Character } from "@next2d/interface";
|
|
4
|
+
import type { CanvasToWebGLContext } from "@next2d/webgl";
|
|
5
5
|
/**
|
|
6
6
|
* TextField クラスは、テキストの表示と入力用の表示オブジェクトを作成するために使用されます。
|
|
7
7
|
* プロパティインスペクターを使用して、テキストフィールドにインスタンス名を付けることができます。
|
|
@@ -32,23 +32,28 @@ export declare class TextField extends InteractiveObject {
|
|
|
32
32
|
private _$maxChars;
|
|
33
33
|
private _$defaultTextFormat;
|
|
34
34
|
private _$rawHtmlText;
|
|
35
|
+
private _$textFormats;
|
|
35
36
|
private _$restrict;
|
|
36
37
|
private _$isHTML;
|
|
37
|
-
private _$textarea;
|
|
38
38
|
private _$autoSize;
|
|
39
39
|
private _$autoFontSize;
|
|
40
|
-
private _$textAreaActive;
|
|
41
40
|
private _$scrollEnabled;
|
|
42
41
|
private _$xScrollShape;
|
|
43
42
|
private _$yScrollShape;
|
|
44
43
|
private _$type;
|
|
45
44
|
private _$focus;
|
|
46
|
-
private _$
|
|
45
|
+
private _$focusVisible;
|
|
46
|
+
private _$timerId;
|
|
47
|
+
private _$focusIndex;
|
|
48
|
+
private _$selectIndex;
|
|
49
|
+
private _$copyText;
|
|
47
50
|
private _$thickness;
|
|
48
51
|
private _$thicknessColor;
|
|
49
|
-
private _$verticalAlign;
|
|
50
52
|
private _$cacheKeys;
|
|
51
|
-
private _$cacheParams;
|
|
53
|
+
private readonly _$cacheParams;
|
|
54
|
+
private _$stopIndex;
|
|
55
|
+
private _$compositionStartIndex;
|
|
56
|
+
private _$compositionEndIndex;
|
|
52
57
|
/**
|
|
53
58
|
* @constructor
|
|
54
59
|
* @public
|
|
@@ -154,6 +159,16 @@ export declare class TextField extends InteractiveObject {
|
|
|
154
159
|
*/
|
|
155
160
|
get borderColor(): number;
|
|
156
161
|
set borderColor(border_color: string | number);
|
|
162
|
+
/**
|
|
163
|
+
* @description テキストの任意の表示終了位置の設定
|
|
164
|
+
* Setting an arbitrary display end position for text.
|
|
165
|
+
*
|
|
166
|
+
* @member {number}
|
|
167
|
+
* @default -1
|
|
168
|
+
* @public
|
|
169
|
+
*/
|
|
170
|
+
get stopIndex(): number;
|
|
171
|
+
set stopIndex(index: number);
|
|
157
172
|
/**
|
|
158
173
|
* @description テキストに適用するフォーマットを指定します。
|
|
159
174
|
* Specifies the formatting to be applied to the text.
|
|
@@ -241,6 +256,15 @@ export declare class TextField extends InteractiveObject {
|
|
|
241
256
|
*/
|
|
242
257
|
get scrollEnabled(): boolean;
|
|
243
258
|
set scrollEnabled(scroll_enabled: boolean);
|
|
259
|
+
/**
|
|
260
|
+
* @description テキストの選択位置を返す
|
|
261
|
+
* Returns the text selection position
|
|
262
|
+
*
|
|
263
|
+
* @member {number}
|
|
264
|
+
* @readonly
|
|
265
|
+
* @public
|
|
266
|
+
*/
|
|
267
|
+
get selectIndex(): number;
|
|
244
268
|
/**
|
|
245
269
|
* @description テキストフィールドのスクロール垂直位置です。
|
|
246
270
|
* The scroll vertical position of the text field.
|
|
@@ -326,16 +350,6 @@ export declare class TextField extends InteractiveObject {
|
|
|
326
350
|
*/
|
|
327
351
|
get type(): TextFieldTypeImpl;
|
|
328
352
|
set type(type: TextFieldTypeImpl);
|
|
329
|
-
/**
|
|
330
|
-
* @description 縦方向の揃え位置を指定するプロパティです。
|
|
331
|
-
* This property specifies the vertical alignment position.
|
|
332
|
-
*
|
|
333
|
-
* @member {string}
|
|
334
|
-
* @default "bottom"
|
|
335
|
-
* @public
|
|
336
|
-
*/
|
|
337
|
-
get verticalAlign(): TextFormatVerticalAlignImpl;
|
|
338
|
-
set verticalAlign(vertical_align: TextFormatVerticalAlignImpl);
|
|
339
353
|
/**
|
|
340
354
|
* @description テキストフィールドのテキストを折り返すかどうかを示すブール値です。
|
|
341
355
|
* A Boolean value that indicates whether the text field has word wrap.
|
|
@@ -433,6 +447,80 @@ export declare class TextField extends InteractiveObject {
|
|
|
433
447
|
* @public
|
|
434
448
|
*/
|
|
435
449
|
getTextData(sub_font_size?: number): TextData;
|
|
450
|
+
/**
|
|
451
|
+
* @return {void}
|
|
452
|
+
* @method
|
|
453
|
+
* @public
|
|
454
|
+
*/
|
|
455
|
+
selectAll(): void;
|
|
456
|
+
/**
|
|
457
|
+
* @return {void}
|
|
458
|
+
* @method
|
|
459
|
+
* @public
|
|
460
|
+
*/
|
|
461
|
+
copy(): void;
|
|
462
|
+
/**
|
|
463
|
+
* @return {void}
|
|
464
|
+
* @method
|
|
465
|
+
* @public
|
|
466
|
+
*/
|
|
467
|
+
paste(): void;
|
|
468
|
+
/**
|
|
469
|
+
* @return {void}
|
|
470
|
+
* @method
|
|
471
|
+
* @public
|
|
472
|
+
*/
|
|
473
|
+
arrowUp(): void;
|
|
474
|
+
/**
|
|
475
|
+
* @return {void}
|
|
476
|
+
* @method
|
|
477
|
+
* @public
|
|
478
|
+
*/
|
|
479
|
+
arrowDown(): void;
|
|
480
|
+
/**
|
|
481
|
+
* @return {void}
|
|
482
|
+
* @method
|
|
483
|
+
* @public
|
|
484
|
+
*/
|
|
485
|
+
arrowLeft(): void;
|
|
486
|
+
/**
|
|
487
|
+
* @return {void}
|
|
488
|
+
* @method
|
|
489
|
+
* @public
|
|
490
|
+
*/
|
|
491
|
+
arrowRight(): void;
|
|
492
|
+
/**
|
|
493
|
+
* @return {void}
|
|
494
|
+
* @method
|
|
495
|
+
* @public
|
|
496
|
+
*/
|
|
497
|
+
deleteText(): void;
|
|
498
|
+
/**
|
|
499
|
+
* @return {void}
|
|
500
|
+
* @method
|
|
501
|
+
* @public
|
|
502
|
+
*/
|
|
503
|
+
compositionStart(): void;
|
|
504
|
+
/**
|
|
505
|
+
* @param {string} texts
|
|
506
|
+
* @return {void}
|
|
507
|
+
* @method
|
|
508
|
+
* @public
|
|
509
|
+
*/
|
|
510
|
+
compositionUpdate(texts: string): void;
|
|
511
|
+
/**
|
|
512
|
+
* @return {void}
|
|
513
|
+
* @method
|
|
514
|
+
* @public
|
|
515
|
+
*/
|
|
516
|
+
compositionEnd(): void;
|
|
517
|
+
/**
|
|
518
|
+
* @param {string} text
|
|
519
|
+
* @return {void}
|
|
520
|
+
* @method
|
|
521
|
+
* @public
|
|
522
|
+
*/
|
|
523
|
+
insertText(texts: string): void;
|
|
436
524
|
/**
|
|
437
525
|
* @return {void}
|
|
438
526
|
* @method
|
|
@@ -445,6 +533,26 @@ export declare class TextField extends InteractiveObject {
|
|
|
445
533
|
* @private
|
|
446
534
|
*/
|
|
447
535
|
_$reload(): void;
|
|
536
|
+
/**
|
|
537
|
+
* @return {void}
|
|
538
|
+
* @method
|
|
539
|
+
* @private
|
|
540
|
+
*/
|
|
541
|
+
_$blinking(): void;
|
|
542
|
+
/**
|
|
543
|
+
* @param {number} stage_x
|
|
544
|
+
* @param {number} stage_y
|
|
545
|
+
* @return {void}
|
|
546
|
+
* @method
|
|
547
|
+
* @private
|
|
548
|
+
*/
|
|
549
|
+
_$setIndex(stage_x: number, stage_y: number): void;
|
|
550
|
+
/**
|
|
551
|
+
* @return {void}
|
|
552
|
+
* @method
|
|
553
|
+
* @private
|
|
554
|
+
*/
|
|
555
|
+
setBlinkingTimer(): void;
|
|
448
556
|
/**
|
|
449
557
|
* @return {void}
|
|
450
558
|
* @method
|
|
@@ -533,13 +641,6 @@ export declare class TextField extends InteractiveObject {
|
|
|
533
641
|
* @private
|
|
534
642
|
*/
|
|
535
643
|
_$hit(context: CanvasRenderingContext2D, matrix: Float32Array, options: PlayerHitObjectImpl): boolean;
|
|
536
|
-
/**
|
|
537
|
-
* @param {number} scale
|
|
538
|
-
* @return {void}
|
|
539
|
-
* @method
|
|
540
|
-
* @private
|
|
541
|
-
*/
|
|
542
|
-
_$createTextAreaElement(scale: number): void;
|
|
543
644
|
/**
|
|
544
645
|
* @return {void}
|
|
545
646
|
* @method
|