This module is responsible for decoding files such as PNG, GIF, JPEG into raw pixel data, as well as parsing compressed formats which are designed to be uploaded to the GPU and rendered without being un-compressed. This module does not know how to draw images on screen; only love.graphics knows that. 更多...
#include <Image.h>
Public 类型 | |
| using | FormatHandler = medialoader::FormatHandler |
Public 成员函数 | |
| Module_REG (Image) | |
| Image () | |
| virtual | ~Image () |
| ImageData * | newImageData (Data *data) |
| Creates new ImageData from FileData. | |
| ImageData * | newImageDataFromFile (std::string path) |
| Loads an image from a VFS path through the unified resource cache. Repeated loads of one path share a single decoded ImageData; a file change refreshes it in place (see ResourceManager). | |
| ImageData * | newImageData (int width, int height, std::string format="RGBA8") |
| Creates empty ImageData with the given size. | |
| ImageData * | newImageData (int width, int height, std::string format, void *data, bool own=false) |
| Creates empty ImageData with the given size. | |
| bool | isCompressed (Data *data) |
| Creates new CompressedImageData from FileData. | |
| std::vector< ref< ImageData > > | newCubeFaces (ImageData *src) |
| std::vector< ref< ImageData > > | newVolumeLayers (ImageData *src) |
| const std::list< FormatHandler * > & | getFormatHandlers () const |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
详细描述
This module is responsible for decoding files such as PNG, GIF, JPEG into raw pixel data, as well as parsing compressed formats which are designed to be uploaded to the GPU and rendered without being un-compressed. This module does not know how to draw images on screen; only love.graphics knows that.
成员类型定义说明
◆ FormatHandler
| using eve::image::Image::FormatHandler = medialoader::FormatHandler |
构造及析构函数说明
◆ Image()
◆ ~Image()
成员函数说明
◆ getFormatHandlers()
| const std::list< medialoader::FormatHandler * > & eve::image::Image::getFormatHandlers | ( | ) | const |
◆ isCompressed()
| bool eve::image::Image::isCompressed | ( | Data * | data | ) |
◆ Module_REG()
| eve::image::Image::Module_REG | ( | Image | ) |
◆ newCubeFaces()
◆ newImageData() [1/3]
◆ newImageData() [2/3]
| ImageData * eve::image::Image::newImageData | ( | int | width, |
| int | height, | ||
| std::string | format, | ||
| void * | data, | ||
| bool | own = false |
||
| ) |
◆ newImageData() [3/3]
| ImageData * eve::image::Image::newImageData | ( | int | width, |
| int | height, | ||
| std::string | format = "RGBA8" |
||
| ) |
◆ newImageDataFromFile()
| ImageData * eve::image::Image::newImageDataFromFile | ( | std::string | path | ) |
Loads an image from a VFS path through the unified resource cache. Repeated loads of one path share a single decoded ImageData; a file change refreshes it in place (see ResourceManager).
- 参数
-
path The VFS path of the image file.
- 返回
- The cached ImageData.
- 异常
-
eve::Exception when the file cannot be read or decoded.
引用了 eve::ResourceManager::get() , 以及 eve::ResourceManager::getInstance().
◆ newVolumeLayers()
该类的文档由以下文件生成:
Public 成员函数 继承自