载入中...
搜索中...
未找到
eve::image::Image类 参考

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>

类 eve::image::Image 继承关系图:
eve::Module

Public 类型

using FormatHandler = medialoader::FormatHandler
 

Public 成员函数

 Module_REG (Image)
 
 Image ()
 
virtual ~Image ()
 
ImageDatanewImageData (Data *data)
 Creates new ImageData from FileData.
 
ImageDatanewImageDataFromFile (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).
 
ImageDatanewImageData (int width, int height, std::string format="RGBA8")
 Creates empty ImageData with the given size.
 
ImageDatanewImageData (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.

在文件 Image.h20 行定义.

成员类型定义说明

◆ FormatHandler

using eve::image::Image::FormatHandler = medialoader::FormatHandler

在文件 Image.h23 行定义.

构造及析构函数说明

◆ Image()

eve::image::Image::Image ( )

在文件 Image.cpp27 行定义.

◆ ~Image()

eve::image::Image::~Image ( )
virtual

在文件 Image.cpp45 行定义.

成员函数说明

◆ getFormatHandlers()

const std::list< medialoader::FormatHandler * > & eve::image::Image::getFormatHandlers ( ) const

在文件 Image.cpp94 行定义.

◆ isCompressed()

bool eve::image::Image::isCompressed ( Data data)

Creates new CompressedImageData from FileData.

参数
dataThe FileData containing the compressed image data.
返回
The new CompressedImageData.

Determines whether a FileData is Compressed image data or not.

参数
dataThe FileData to test.

在文件 Image.cpp83 行定义.

引用了 data.

◆ Module_REG()

eve::image::Image::Module_REG ( Image  )

◆ newCubeFaces()

std::vector< eve::ref< ImageData > > eve::image::Image::newCubeFaces ( ImageData src)

在文件 Image.cpp114 行定义.

引用了 eve::image::ImageData::getHeight(), eve::image::ImageData::getWidth(), h , 以及 w.

◆ newImageData() [1/3]

ImageData * eve::image::Image::newImageData ( Data data)

Creates new ImageData from FileData.

参数
dataThe FileData containing the encoded image data.
返回
The new ImageData.

在文件 Image.cpp56 行定义.

引用了 data.

◆ newImageData() [2/3]

ImageData * eve::image::Image::newImageData ( int  width,
int  height,
std::string  format,
void *  data,
bool  own = false 
)

Creates empty ImageData with the given size.

参数
widthThe width of the ImageData.
heightThe height of the ImageData.
dataThe data to load into the ImageData.
ownWhether the new ImageData should take ownership of the data or copy it.
返回
The new ImageData.

在文件 Image.cpp77 行定义.

引用了 data, height , 以及 width.

◆ newImageData() [3/3]

ImageData * eve::image::Image::newImageData ( int  width,
int  height,
std::string  format = "RGBA8" 
)

Creates empty ImageData with the given size.

参数
widthThe width of the ImageData.
heightThe height of the ImageData.
返回
The new ImageData.

在文件 Image.cpp72 行定义.

引用了 height , 以及 width.

◆ 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).

参数
pathThe VFS path of the image file.
返回
The cached ImageData.
异常
eve::Exceptionwhen the file cannot be read or decoded.

在文件 Image.cpp61 行定义.

引用了 eve::ResourceManager::get() , 以及 eve::ResourceManager::getInstance().

◆ newVolumeLayers()

std::vector< eve::ref< ImageData > > eve::image::Image::newVolumeLayers ( ImageData src)

该类的文档由以下文件生成: