Commit e84b79dc authored by wangjianfeng.yz's avatar wangjianfeng.yz

2.0.70

parent 5a82e416
...@@ -5,4 +5,5 @@ node_modules ...@@ -5,4 +5,5 @@ node_modules
debug debug
.vscode .vscode
dist dist
docs docs
\ No newline at end of file srcOri
\ No newline at end of file
...@@ -22,4 +22,5 @@ testThree ...@@ -22,4 +22,5 @@ testThree
README.md README.md
abandoned abandoned
beta beta
srcNew srcNew
\ No newline at end of file srcOri
\ No newline at end of file
declare namespace FYGE{export const VERSION = "2.0.69"; declare namespace FYGE{export const VERSION = "2.0.70";
export function cos(angle: number): number; export function cos(angle: number): number;
...@@ -6912,25 +6912,25 @@ export class TextField extends Sprite { ...@@ -6912,25 +6912,25 @@ export class TextField extends Sprite {
get size(): number; get size(): number;
private _size; private _size;
/** /**
* 文本的填充颜色值 * 文本的填充颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property fillColor * @property fillColor
* @type {string} * @type {string|number}
* @public * @public
* @since 1.0.0 * @since 1.0.0
* @default #fff * @default #fff
*/ */
set fillColor(value: string); set fillColor(value: string | number);
get fillColor(): string; get fillColor(): string;
private _fillColor; private _fillColor;
/** /**
* 文本的描边颜色值 * 文本的描边颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property strokeColor * @property strokeColor
* @type {string} * @type {string|number}
* @public * @public
* @since 1.0.0 * @since 1.0.0
* @default #fff * @default #fff
*/ */
set strokeColor(value: string); set strokeColor(value: string | number);
get strokeColor(): string; get strokeColor(): string;
private _strokeColor; private _strokeColor;
/** /**
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
export const VERSION = "2.0.69"; export const VERSION = "2.0.70";
export function cos(angle: number): number; export function cos(angle: number): number;
...@@ -6912,25 +6912,25 @@ export class TextField extends Sprite { ...@@ -6912,25 +6912,25 @@ export class TextField extends Sprite {
get size(): number; get size(): number;
private _size; private _size;
/** /**
* 文本的填充颜色值 * 文本的填充颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property fillColor * @property fillColor
* @type {string} * @type {string|number}
* @public * @public
* @since 1.0.0 * @since 1.0.0
* @default #fff * @default #fff
*/ */
set fillColor(value: string); set fillColor(value: string | number);
get fillColor(): string; get fillColor(): string;
private _fillColor; private _fillColor;
/** /**
* 文本的描边颜色值 * 文本的描边颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property strokeColor * @property strokeColor
* @type {string} * @type {string|number}
* @public * @public
* @since 1.0.0 * @since 1.0.0
* @default #fff * @default #fff
*/ */
set strokeColor(value: string); set strokeColor(value: string | number);
get strokeColor(): string; get strokeColor(): string;
private _strokeColor; private _strokeColor;
/** /**
......
{ {
"name": "fyge", "name": "fyge",
"version": "2.0.69", "version": "2.0.70",
"description": "canvas渲染引擎", "description": "canvas渲染引擎",
"main": "./build/fyge.min.js", "main": "./build/fyge.min.js",
"module": "./build/fyge.esm.js", "module": "./build/fyge.esm.js",
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @name VERSION * @name VERSION
* @type {string} * @type {string}
*/ */
export const VERSION = "2.0.69"; export const VERSION = "2.0.70";
/** /**
......
import { SCALE_MODES, TEXT_ALIGN, TEXT_lINETYPE, VERTICAL_ALIGN } from "../const"; import { SCALE_MODES, TEXT_ALIGN, TEXT_lINETYPE, VERTICAL_ALIGN } from "../const";
import Texture from "../texture/Texture"; import Texture from "../texture/Texture";
import { getRGBA, createCanvas, getEnv } from "../utils"; import { getRGBA, createCanvas, getEnv, hex2string } from "../utils";
import { Rectangle } from "../math"; import { Rectangle } from "../math";
import Sprite from "../display/Sprite"; import Sprite from "../display/Sprite";
import { BaseTexture } from "../texture"; import { BaseTexture } from "../texture";
...@@ -287,14 +287,17 @@ export class TextField extends Sprite { ...@@ -287,14 +287,17 @@ export class TextField extends Sprite {
} }
private _size: number = 12; private _size: number = 12;
/** /**
* 文本的填充颜色值 * 文本的填充颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property fillColor * @property fillColor
* @type {string} * @type {string|number}
* @public * @public
* @since 1.0.0 * @since 1.0.0
* @default #fff * @default #fff
*/ */
public set fillColor(value: string) { public set fillColor(value: string | number) {
if (typeof (value) == "number") {
value = hex2string(value);
}
if (this._fillColor != value) { if (this._fillColor != value) {
this._fillColor = value; this._fillColor = value;
this.dirty = true; this.dirty = true;
...@@ -307,14 +310,17 @@ export class TextField extends Sprite { ...@@ -307,14 +310,17 @@ export class TextField extends Sprite {
private _fillColor: string = "#ffffff"; private _fillColor: string = "#ffffff";
/** /**
* 文本的描边颜色值 * 文本的描边颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property strokeColor * @property strokeColor
* @type {string} * @type {string|number}
* @public * @public
* @since 1.0.0 * @since 1.0.0
* @default #fff * @default #fff
*/ */
public set strokeColor(value: string) { public set strokeColor(value: string | number) {
if (typeof (value) == "number") {
value = hex2string(value);
}
if (this._strokeColor != value) { if (this._strokeColor != value) {
this._strokeColor = value; this._strokeColor = value;
this.dirty = true; this.dirty = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment