Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Jun 24, 2024
1 parent e96bab7 commit 385e60d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/raylib.h
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ RLAPI void ImageAlphaClear(Image *image, Color color, float threshold);
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
RLAPI void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
RLAPI void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
RLAPI void ImageKernelConvolution(Image *image, float *kernel, int kernelSize); // Apply Custom Square image convolution kernel
RLAPI void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize); // Apply custom square convolution kernel to image
RLAPI void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
RLAPI void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
RLAPI void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
Expand Down
2 changes: 1 addition & 1 deletion src/rlgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ void rlBegin(int mode)
}
}

void rlEnd() { glEnd(); }
void rlEnd(void) { glEnd(); }
void rlVertex2i(int x, int y) { glVertex2i(x, y); }
void rlVertex2f(float x, float y) { glVertex2f(x, y); }
void rlVertex3f(float x, float y, float z) { glVertex3f(x, y, z); }
Expand Down
2 changes: 1 addition & 1 deletion src/rshapes.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Rectangle GetShapesTextureRectangle(void)
// Draw a pixel
void DrawPixel(int posX, int posY, Color color)
{
DrawPixelV((Vector2){ (float)posX, (float)posY }, color);
DrawPixelV((Vector2){ (float)posX, (float)posY }, color);
}

// Draw a pixel (Vector version)
Expand Down
5 changes: 3 additions & 2 deletions src/rtextures.c
Original file line number Diff line number Diff line change
Expand Up @@ -2156,8 +2156,9 @@ void ImageBlurGaussian(Image *image, int blurSize)
ImageFormat(image, format);
}

// The kernel matrix is assumed to be square. Only supply the width of the kernel
void ImageKernelConvolution(Image *image, float* kernel, int kernelSize)
// Apply custom square convolution kernel to image
// NOTE: The convolution kernel matrix is expected to be square
void ImageKernelConvolution(Image *image, const float *kernel, int kernelSize)
{
if ((image->data == NULL) || (image->width == 0) || (image->height == 0) || kernel == NULL) return;

Expand Down

0 comments on commit 385e60d

Please sign in to comment.