Helper class for image manipulation NOTE: Image software-rendering functions (CPU)
More...
#include <ImageHelper.hpp>
|
| static raylib::image::RlImage | load (const std::string &fileName) |
| | Load image from file into CPU memory (RAM) More...
|
| |
| static raylib::image::RlImage | loadRaw (const std::string &fileName, int width, int height, int format, int headerSize) |
| | Load image from RAW file data. More...
|
| |
| static raylib::image::RlImage | loadAnim (const std::string &fileName) |
| | Load image sequence from file (frames appended to image.data) More...
|
| |
| static raylib::image::RlImage | loadFromMemory (const std::string &fileType, const unsigned char *fileData, int dataSize) |
| | Load image from memory buffer. More...
|
| |
| static raylib::image::RlImage | loadFromTexture (const Texture2D &texture) |
| | Load image from GPU texture data. More...
|
| |
| static raylib::image::RlImage | loadFromScreen () |
| | Load image from screen buffer and (screenshot) More...
|
| |
| static raylib::image::RlImage | fromText (const std::string &text, int fontSize, const RlColor &color) |
| | Create an image from text (default font) More...
|
| |
| static raylib::image::RlImage | fromText (const raylib::text::RlFont &font, const std::string &text, float fontSize, float spacing, const RlColor &tint) |
| | Create an image from text (custom sprite font) More...
|
| |
| static raylib::image::RlImage | genImageFontAtlas (const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod) |
| | Create an image from font (custom sprite font) More...
|
| |
Helper class for image manipulation NOTE: Image software-rendering functions (CPU)
◆ fromText() [1/2]
Create an image from text (custom sprite font)
- Parameters
-
| font | the font |
| text | the text |
| fontSize | the font size |
| spacing | the spacing |
| tint | the tint |
- Returns
- the image
◆ fromText() [2/2]
Create an image from text (default font)
- Parameters
-
| text | the text |
| fontSize | the font size |
| color | the color |
- Returns
- the image
◆ genImageFontAtlas()
| raylib::image::RlImage raylib::helper::ImageHelper::genImageFontAtlas |
( |
const GlyphInfo * |
chars, |
|
|
Rectangle ** |
recs, |
|
|
int |
glyphCount, |
|
|
int |
fontSize, |
|
|
int |
padding, |
|
|
int |
packMethod |
|
) |
| |
|
static |
Create an image from font (custom sprite font)
- Parameters
-
| chars | the chars |
| recs | the recs |
| glyphCount | the glyph count |
| fontSize | the font size |
| padding | the padding |
| packMethod | the pack method |
- Returns
- the image
◆ load()
Load image from file into CPU memory (RAM)
- Parameters
-
- Returns
- the image
◆ loadAnim()
Load image sequence from file (frames appended to image.data)
- Parameters
-
- Returns
- the image
◆ loadFromMemory()
| raylib::image::RlImage raylib::helper::ImageHelper::loadFromMemory |
( |
const std::string & |
fileType, |
|
|
const unsigned char * |
fileData, |
|
|
int |
dataSize |
|
) |
| |
|
static |
Load image from memory buffer.
- Parameters
-
| fileType | the file type |
| fileData | the file data |
| dataSize | the data size |
- Returns
- the image
◆ loadFromScreen()
Load image from screen buffer and (screenshot)
- Returns
- the image
◆ loadFromTexture()
Load image from GPU texture data.
- Parameters
-
- Returns
- the image
◆ loadRaw()
| raylib::image::RlImage raylib::helper::ImageHelper::loadRaw |
( |
const std::string & |
fileName, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
format, |
|
|
int |
headerSize |
|
) |
| |
|
static |
Load image from RAW file data.
- Parameters
-
| fileName | the file name |
| width | the width |
| height | the height |
| format | the format |
| headerSize | the header size |
- Returns
- the image
The documentation for this class was generated from the following files: