diff options
| author | Ray <[email protected]> | 2024-02-29 18:40:10 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2024-02-29 18:40:10 +0100 |
| commit | 1e8450665c3726b6b7b96f9662f658bfc3b0b41a (patch) | |
| tree | 13cad8aec45b2f711541fba319e30b8091c53e58 /src/rtextures.c | |
| parent | 94c79917e3b68fbed3ff4a3920edc9d093b11c4f (diff) | |
| download | raylib-1e8450665c3726b6b7b96f9662f658bfc3b0b41a.tar.gz raylib-1e8450665c3726b6b7b96f9662f658bfc3b0b41a.zip | |
ADDED: New function `ColorIsEqual()`
Diffstat (limited to 'src/rtextures.c')
| -rw-r--r-- | src/rtextures.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rtextures.c b/src/rtextures.c index bd3d54cc..5c0e90e8 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -4453,6 +4453,16 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, } } +// Check if two colors are equal +bool ColorIsEqual(Color col1, Color col2) +{ + bool result = false; + + if ((col1.r == col2.r) && (col1.g == col2.g) && (col1.b == col2.b) && (col1.a == col2.a)) result = true; + + return result; +} + // Get color with alpha applied, alpha goes from 0.0f to 1.0f Color Fade(Color color, float alpha) { |
