载入中...
搜索中...
未找到
ImageData.h
浏览该文件的文档.
112 filesystem::FileData *encode(FormatHandler::EncodedFormat format, const char *filename, bool writefile) const;
Resource is a game object that is managed by the ResourceManager. It can be loaded from a file or gen...
Definition Resource.h:35
Data buffer paired with a filename (used for type identification).
Definition FileData.h:12
void(* PixelGetFunction)(const Pixel *p, Colorf &c)
Definition ImageData.h:43
bool inside(int x, int y) const
Checks whether a position is inside this ImageData. Useful for checking bounds.
Definition ImageData.cpp:240
filesystem::FileData * encode(FormatHandler::EncodedFormat format, const char *filename, bool writefile) const
Encodes raw pixel data into a given format.
Definition ImageData.cpp:170
void getPixel(int x, int y, Colorf &c) const
Gets the pixel at location (x,y).
Definition ImageData.cpp:486
static bool getConstant(const char *in, FormatHandler::EncodedFormat &out)
void setPixel(int x, int y, const Colorf &p)
Sets the pixel at location (x,y).
Definition ImageData.cpp:475
void paste(ImageData *src, int dx, int dy, int sx, int sy, int sw, int sh)
Paste part of one ImageData onto another. The subregion defined by the top-left corner (sx,...
Definition ImageData.cpp:1023
static bool canPaste(std::string src, std::string dst)
Definition ImageData.cpp:1156
static bool getConstant(FormatHandler::EncodedFormat in, const char *&out)
static std::vector< std::string > getConstants(FormatHandler::EncodedFormat)
PixelSetFunction getPixelSetFunction() const
Definition ImageData.h:132
static bool validPixelFormat(std::string format)
Definition ImageData.cpp:1135
ImageData * rotate(float radians, std::string filter="nearest", bool expand=true) const
Rotate pixels around the image center and return a new ImageData.
Definition ImageData.cpp:910
void(* PixelSetFunction)(const Colorf &c, Pixel *p)
Definition ImageData.h:42
PixelGetFunction getPixelGetFunction() const
Definition ImageData.h:133
void adopt(eve::Resource &replacement) override
Replace this instance's pixels with replacement's (cache reload). The replacement is drained; its des...
Definition ImageData.cpp:61
medialoader::FormatHandler FormatHandler
Definition ImageData.h:30
Definition Build.cpp:11
Definition ImageData.h:33