Skip to content
ImageInfo

界面 / ImageInfo

ImageInfo Class

图片信息类

Table of contents

Accessors

assetICON(): AssetIconData client
获取ImageInfo的图标数据
color(): Readonly<LinearColor> client
获取ImageInfo的颜色
drawType(): SlateBrushDrawType client
获取ImageInfo的绘制类型
id(): string client
获取ImageInfo的id
margin(): Readonly<Margin> client
获取ImageInfo的margin
size(): Readonly<Vector2> client
获取ImageInfo的size大小

Methods

asyncSetByID(id: string, bUseSRGB?: boolean): Promise<boolean> client
通过 ID 设置图片信息
setByAssetIcon(assetId: string, size: AssetIconSize, bUseSRGB?: boolean): Promise<boolean> client
用指定的 id 和分辨率,设置图标

Accessors

assetICON

get assetICON(): AssetIconData client

获取ImageInfo的图标数据

Returns

AssetIconData图标数据结构

color

get color(): Readonly<LinearColor> client

set color(value): void client

获取ImageInfo的颜色

Returns

Readonly<LinearColor>返回Type.LinearColor颜色值

设置ImageInfo的颜色

Parameters

value Readonly<LinearColor>mw.LinearColor颜色值

drawType

get drawType(): SlateBrushDrawType client

set drawType(value): void client

获取ImageInfo的绘制类型

Returns

SlateBrushDrawType绘制类型

设置ImageInfo的绘制类型

Parameters

value SlateBrushDrawType绘制类型

id

get id(): string client

获取ImageInfo的id

Returns

stringImageInfo的id

margin

get margin(): Readonly<Margin> client

set margin(value): void client

获取ImageInfo的margin

Returns

Readonly<Margin>margin

设置ImageInfo的margin

Parameters

value Readonly<Margin>指定的margin

size

get size(): Readonly<Vector2> client

set size(value): void client

获取ImageInfo的size大小

Returns

Readonly<Vector2>ImageInfo的size

设置ImageInfo的size大小

Parameters

value Readonly<Vector2>指定的size

Methods


asyncSetByID

asyncSetByID(id, bUseSRGB?): Promise<boolean> client

通过 ID 设置图片信息

Parameters

id string图片 ID
range: 依据 ID 长度而定
bUseSRGB? boolean是否贴图使用SRGB模式

Returns

Promise<boolean>是否设置成功

setByAssetIcon

setByAssetIcon(assetId, size, bUseSRGB?): Promise<boolean> client

用指定的 id 和分辨率,设置图标

Parameters

assetId string传入图标的资源 id
size AssetIconSize传入图标的分辨率枚举
bUseSRGB? boolean是否使用SRGB

Returns

Promise<boolean>