mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
REVIEWED: New functions coding conventions
This commit is contained in:
@@ -2718,7 +2718,8 @@ void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color)
|
|||||||
// Draw circle within an image
|
// Draw circle within an image
|
||||||
void ImageDrawCircle(Image* dst, int centerX, int centerY, int radius, Color color)
|
void ImageDrawCircle(Image* dst, int centerX, int centerY, int radius, Color color)
|
||||||
{
|
{
|
||||||
int x = 0, y = radius;
|
int x = 0;
|
||||||
|
int y = radius;
|
||||||
int decesionParameter = 3 - 2*radius;
|
int decesionParameter = 3 - 2*radius;
|
||||||
|
|
||||||
while (y >= x)
|
while (y >= x)
|
||||||
@@ -2729,12 +2730,12 @@ void ImageDrawCircle(Image* dst, int centerX, int centerY, int radius, Color col
|
|||||||
ImageDrawRectangle(dst, centerX - y, centerY - x, y*2, 1, color);
|
ImageDrawRectangle(dst, centerX - y, centerY - x, y*2, 1, color);
|
||||||
x++;
|
x++;
|
||||||
|
|
||||||
if (decesionParameter > 0) {
|
if (decesionParameter > 0)
|
||||||
|
{
|
||||||
y--;
|
y--;
|
||||||
decesionParameter = decesionParameter + 4*(x - y) + 10;
|
decesionParameter = decesionParameter + 4*(x - y) + 10;
|
||||||
} else {
|
|
||||||
decesionParameter = decesionParameter + 4 * x + 6;
|
|
||||||
}
|
}
|
||||||
|
else decesionParameter = decesionParameter + 4*x + 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2747,7 +2748,8 @@ void ImageDrawCircleV(Image* dst, Vector2 center, int radius, Color color)
|
|||||||
// Draw circle outline within an image
|
// Draw circle outline within an image
|
||||||
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color)
|
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color)
|
||||||
{
|
{
|
||||||
int x = 0, y = radius;
|
int x = 0;
|
||||||
|
int y = radius;
|
||||||
int decesionParameter = 3 - 2*radius;
|
int decesionParameter = 3 - 2*radius;
|
||||||
|
|
||||||
while (y >= x)
|
while (y >= x)
|
||||||
|
Reference in New Issue
Block a user