diff options
| author | raysan5 <[email protected]> | 2018-01-07 00:51:26 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2018-01-07 00:51:26 +0100 |
| commit | e4be917d1b36a65286ca49b85328187ea8c190ad (patch) | |
| tree | 54070c2148103728581d5ebebe7454ba121b23d8 /src/raylib.h | |
| parent | b97134c3e157f241cef485b34b8fb0e09575e7bc (diff) | |
| download | raylib-e4be917d1b36a65286ca49b85328187ea8c190ad.tar.gz raylib-e4be917d1b36a65286ca49b85328187ea8c190ad.zip | |
Added new image functions
- Added: ImageAlphaClear()
- Added: ImageAlphaPremultiply()
- Reorganized some functions
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/raylib.h b/src/raylib.h index c44653e8..b482ab3b 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -876,14 +876,16 @@ RLAPI void UpdateTexture(Texture2D texture, const void *pixels); RLAPI void SaveImageAs(const char *fileName, Image image); // Save image to a PNG file // Image manipulation functions +RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations) RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image -RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering) -RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations) +RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color +RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize and image (bilinear filtering) RLAPI void ImageResizeNN(Image *image,int newWidth,int newHeight); // Resize and image (Nearest-Neighbor scaling algorithm) +RLAPI void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering) RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font) RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image |
