M3D / M3D / Reader / ImageFactory
Class: ImageFactory
Memberof
SView.Reader
Description
图章工具类
Author
yw
Date
2023-1-17
Version
1.0
Copyright
All Rights Reserved. Copyright (C) 2022 HOTEAMSOFT, Ltd
Hierarchy
-
↳
ImageFactory
Table of contents
Constructors
Methods
Constructors
constructor
• new ImageFactory(): ImageFactory
Returns
Inherited from
Methods
createMObject
▸ createMObject<T
>(arg
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
arg | T | 泛型 |
Returns
T
Description
创建对象
Inherited from
fromJson
▸ fromJson(imageJson
, imageResData
, scene
): Image
Parameters
Name | Type | Description |
---|---|---|
imageJson | any | 图章内容对应的JSON数据 数据结构如下: { "ID": "0", "name": "SEAL:approved.png", "path": "\\seal\\approved.png", "position": [ -330.000031, 235.500031, 0.0 ], "size": [ 143.0, 74.0 ] } |
imageResData | Map <string , ArrayBuffer > | 对应的图片资源map |
scene | Scene | 场景 |
Returns
图章对象
Static
Description
根据图章内容JSON数据生成图章对象
toJson
▸ toJson(image
): string
Parameters
Name | Type | Description |
---|---|---|
image | Image | 图章对象 |
Returns
string
图章对象对应的Json串
Static
Description
根据图章对象生成JSON数据