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

2.0.70

parent 5a82e416
......@@ -5,4 +5,5 @@ node_modules
debug
.vscode
dist
docs
\ No newline at end of file
docs
srcOri
\ No newline at end of file
......@@ -22,4 +22,5 @@ testThree
README.md
abandoned
beta
srcNew
\ No newline at end of file
srcNew
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;
......@@ -6912,25 +6912,25 @@ export class TextField extends Sprite {
get size(): number;
private _size;
/**
* 文本的填充颜色值
* 文本的填充颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property fillColor
* @type {string}
* @type {string|number}
* @public
* @since 1.0.0
* @default #fff
*/
set fillColor(value: string);
set fillColor(value: string | number);
get fillColor(): string;
private _fillColor;
/**
* 文本的描边颜色值
* 文本的描边颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property strokeColor
* @type {string}
* @type {string|number}
* @public
* @since 1.0.0
* @default #fff
*/
set strokeColor(value: string);
set strokeColor(value: string | number);
get strokeColor(): string;
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;
......@@ -6912,25 +6912,25 @@ export class TextField extends Sprite {
get size(): number;
private _size;
/**
* 文本的填充颜色值
* 文本的填充颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property fillColor
* @type {string}
* @type {string|number}
* @public
* @since 1.0.0
* @default #fff
*/
set fillColor(value: string);
set fillColor(value: string | number);
get fillColor(): string;
private _fillColor;
/**
* 文本的描边颜色值
* 文本的描边颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property strokeColor
* @type {string}
* @type {string|number}
* @public
* @since 1.0.0
* @default #fff
*/
set strokeColor(value: string);
set strokeColor(value: string | number);
get strokeColor(): string;
private _strokeColor;
/**
......
{
"name": "fyge",
"version": "2.0.69",
"version": "2.0.70",
"description": "canvas渲染引擎",
"main": "./build/fyge.min.js",
"module": "./build/fyge.esm.js",
......
......@@ -7,7 +7,7 @@
* @name VERSION
* @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 Texture from "../texture/Texture";
import { getRGBA, createCanvas, getEnv } from "../utils";
import { getRGBA, createCanvas, getEnv, hex2string } from "../utils";
import { Rectangle } from "../math";
import Sprite from "../display/Sprite";
import { BaseTexture } from "../texture";
......@@ -287,14 +287,17 @@ export class TextField extends Sprite {
}
private _size: number = 12;
/**
* 文本的填充颜色值
* 文本的填充颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property fillColor
* @type {string}
* @type {string|number}
* @public
* @since 1.0.0
* @default #fff
*/
public set fillColor(value: string) {
public set fillColor(value: string | number) {
if (typeof (value) == "number") {
value = hex2string(value);
}
if (this._fillColor != value) {
this._fillColor = value;
this.dirty = true;
......@@ -307,14 +310,17 @@ export class TextField extends Sprite {
private _fillColor: string = "#ffffff";
/**
* 文本的描边颜色值
* 文本的描边颜色值,比如字符串"#ffffff"或十六进制数字0xffffff
* @property strokeColor
* @type {string}
* @type {string|number}
* @public
* @since 1.0.0
* @default #fff
*/
public set strokeColor(value: string) {
public set strokeColor(value: string | number) {
if (typeof (value) == "number") {
value = hex2string(value);
}
if (this._strokeColor != value) {
this._strokeColor = value;
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