summaryrefslogtreecommitdiffhomepage
path: root/cheatsheet/raylib_textures.c
diff options
context:
space:
mode:
authorRay <[email protected]>2023-11-10 13:16:21 +0100
committerRay <[email protected]>2023-11-10 13:16:21 +0100
commit7e85a2255c3fcf4f2811110eb492135ac6da0344 (patch)
tree604f8f28bf689e1c0315cc66797c96c5ce15901e /cheatsheet/raylib_textures.c
parentc20df08ebdb4684fb1a572efe1b1ea395aa0fb22 (diff)
downloadraylib.com-7e85a2255c3fcf4f2811110eb492135ac6da0344.tar.gz
raylib.com-7e85a2255c3fcf4f2811110eb492135ac6da0344.zip
Update cheatsheet for raylib 5.0
Diffstat (limited to 'cheatsheet/raylib_textures.c')
-rw-r--r--cheatsheet/raylib_textures.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cheatsheet/raylib_textures.c b/cheatsheet/raylib_textures.c
index f47c97c..5199964 100644
--- a/cheatsheet/raylib_textures.c
+++ b/cheatsheet/raylib_textures.c
@@ -1,8 +1,8 @@
-
// Image loading functions
// NOTE: These functions do not require GPU access
Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
+ Image LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size
Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
@@ -10,6 +10,7 @@
bool IsImageReady(Image image); // Check if an image is ready
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
+ unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer
bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
// Image generation functions
@@ -43,7 +44,7 @@
void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
void ImageFlipVertical(Image *image); // Flip image vertically
void ImageFlipHorizontal(Image *image); // Flip image horizontally
- void ImageRotate(Image *image, int degrees); // Rotate image by input angle in degrees (-359 to 359)
+ void ImageRotate(Image *image, int degrees); // Rotate image by input angle in degrees (-359 to 359)
void ImageRotateCW(Image *image); // Rotate image clockwise 90deg
void ImageRotateCCW(Image *image); // Rotate image counter-clockwise 90deg
void ImageColorTint(Image *image, Color color); // Modify image color: tint
@@ -86,7 +87,7 @@
RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
bool IsTextureReady(Texture2D texture); // Check if a texture is ready
void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
- bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
+ bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data