ImageTexture¶
Inherits: Texture < Resource < Reference < Object
类别: 核心
属性¶
0.7 |
||
0 |
方法¶
无效 |
create ( int width, int height, Format format, int flags=7 ) |
无效 |
create_from_image ( Image image, int flags=7 ) |
get_format ( ) const |
|
无效 |
|
无效 |
set_size_override ( Vector2 size ) |
枚举¶
枚举 保管部 :
STORAGE_RAW = 0 --- Image 数据是未经修改的原始数据。
STORAGE_COMPRESS_LOSSY = 1 --- Image 数据是用有损算法压缩的。您可以使用设置存储质量 lossy_quality .
STORAGE_COMPRESS_LOSSLESS = 2 --- Image 数据是用无损算法压缩的。
描述¶
A Texture 基于 Image . 可以从 Image 具有 create_from_image .
属性描述¶
float lossy_quality
违约 |
0.7 |
设定器 |
设置损耗存储质量(值) |
吸气剂 |
获取有损存储质量 |
存储质量 STORAGE_COMPRESS_LOSSY .
Storage storage
违约 |
0 |
设定器 |
设置存储(值) |
吸气剂 |
获取存储空间() |
存储类型(原始、有损或压缩)。
方法说明¶
创建新的 ImageTexture
具有 width
和 height
.
format
是来自的值 Format , flags
是不是 Flags .
创建新的 ImageTexture
从一个 Image 具有 flags
从 Flags . 根据 Format .
Format get_format ( ) const
返回的格式 ImageTexture
,其中一个 Format .
加载 ImageTexture
从文件路径。
void set_data ( Image image )
设置 Image 其中 ImageTexture
.
void set_size_override ( Vector2 size )
调整 ImageTexture
到指定的尺寸。