ImageToPOT() renamed parameter
This commit is contained in:
parent
b5174a9990
commit
a9fb0aa207
2 changed files with 4 additions and 3 deletions
|
@ -1126,7 +1126,7 @@ RLAPI Image ImageFromImage(Image image, Rectangle rec);
|
||||||
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||||
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
||||||
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||||
RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two)
|
RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
|
||||||
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
||||||
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
||||||
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||||
|
@ -1199,6 +1199,7 @@ RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle
|
||||||
// Image/Texture misc functions
|
// Image/Texture misc functions
|
||||||
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes (image or texture)
|
RLAPI int GetPixelDataSize(int width, int height, int format); // Get pixel data size in bytes (image or texture)
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Font Loading and Text Drawing Functions (Module: text)
|
// Font Loading and Text Drawing Functions (Module: text)
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -998,7 +998,7 @@ void ImageFormat(Image *image, int newFormat)
|
||||||
|
|
||||||
// Convert image to POT (power-of-two)
|
// Convert image to POT (power-of-two)
|
||||||
// NOTE: It could be useful on OpenGL ES 2.0 (RPI, HTML5)
|
// NOTE: It could be useful on OpenGL ES 2.0 (RPI, HTML5)
|
||||||
void ImageToPOT(Image *image, Color fillColor)
|
void ImageToPOT(Image *image, Color fill)
|
||||||
{
|
{
|
||||||
// Security check to avoid program crash
|
// Security check to avoid program crash
|
||||||
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
|
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
|
||||||
|
@ -1009,7 +1009,7 @@ void ImageToPOT(Image *image, Color fillColor)
|
||||||
int potHeight = (int)powf(2, ceilf(logf((float)image->height)/logf(2)));
|
int potHeight = (int)powf(2, ceilf(logf((float)image->height)/logf(2)));
|
||||||
|
|
||||||
// Check if POT texture generation is required (if texture is not already POT)
|
// Check if POT texture generation is required (if texture is not already POT)
|
||||||
if ((potWidth != image->width) || (potHeight != image->height)) ImageResizeCanvas(image, potWidth, potHeight, 0, 0, fillColor);
|
if ((potWidth != image->width) || (potHeight != image->height)) ImageResizeCanvas(image, potWidth, potHeight, 0, 0, fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SUPPORT_IMAGE_MANIPULATION)
|
#if defined(SUPPORT_IMAGE_MANIPULATION)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue