raylib/src
Vincent Lee 19ae6f2c2d [rshapes] Fix incorrect parameter names in DrawRectangleGradientEx
Examining the code shows that the rectangle is drawn winding counterclockwise, starting
with the top left. Therefore the colors used should be in the order: topLeft, bottomLeft,
bottomRight, topRight.

However, the variables actually being used are topLeft, bottomLeft, topRight,
bottomRight. I was confused by this as I was getting striping where I didn't expect any.
Put another way, the last two parameters are misnamed.

This diff swaps the parameter names and their usages. The result is that no runtime
behaviour changes: the same parameter order yields the same visual result both before and
after this change, but the parameter names now correctly reflect what they are actually
used for.

You can actually see this in the implementation of DrawRectangleGradientV, which
(correctly) passes top, bottom, bottom, top to DrawRectangleGradientEx.
2025-05-31 23:00:40 -07:00
..
external Guard against DEBUG Redefinition 2025-03-12 00:13:01 -05:00
platforms Revert GLFW_SCALE_FRAMEBUFFER to pre GLFW 4.3 behavior 2025-04-25 14:32:02 -04:00
CMakeLists.txt install rcamera.h (#4603) 2024-12-15 11:16:08 +01:00
config.h Increased depth size and clip distances to avoid z-fighting issues 2025-03-13 16:34:39 +01:00
Makefile Update Makefile 2025-03-10 17:04:14 +01:00
minshell.html REVIEWED: Code/Web-Makefile formatting 2025-01-12 16:19:10 +01:00
raudio.c format math the way ray likes it 2025-04-18 07:27:20 -07:00
raylib.dll.rc Update year to 2025 2025-01-01 00:02:52 +01:00
raylib.dll.rc.data Update year to 2025 2025-01-01 00:02:52 +01:00
raylib.h [rshapes] Fix incorrect parameter names in DrawRectangleGradientEx 2025-05-31 23:00:40 -07:00
raylib.ico Update raylib.ico 2024-11-14 16:40:04 +01:00
raylib.rc Update year to 2025 2025-01-01 00:02:52 +01:00
raylib.rc.data Update year to 2025 2025-01-01 00:02:52 +01:00
raymath.h Update raymath.h 2025-02-23 23:07:12 +01:00
rcamera.h Update year to 2025 2025-01-01 00:02:52 +01:00
rcore.c Warning to direct users to appropriate function 2025-04-15 21:08:35 -04:00
rgestures.h Update year to 2025 2025-01-01 00:02:52 +01:00
rglfw.c Update year to 2025 2025-01-01 00:02:52 +01:00
rlgl.h Format tweak 2025-03-25 19:27:55 +01:00
rmodels.c move first mesh bones calculation under check for its presense 2025-04-16 08:04:58 +02:00
rshapes.c [rshapes] Fix incorrect parameter names in DrawRectangleGradientEx 2025-05-31 23:00:40 -07:00
rtext.c REVIEWED: ExportFontAsCode() not checking isGpuReady #4894 2025-04-15 13:09:44 +02:00
rtextures.c Add missing increments of k in LoadImageDataNormalized() (#4745) 2025-02-01 21:30:21 +01:00
shell.html REVIEWED: Code/Web-Makefile formatting 2025-01-12 16:19:10 +01:00
utils.c Update year to 2025 2025-01-01 00:02:52 +01:00
utils.h Update year to 2025 2025-01-01 00:02:52 +01:00