From 46ffa82f4ecadbf0e7c56589af004ccfbcdba7cc Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 2 Sep 2024 17:00:39 -0700
Subject: [PATCH] Added SDL_ALPHA_OPAQUE_FLOAT and SDL_ALPHA_TRANSPARENT_FLOAT
Fixes https://github.com/libsdl-org/SDL/issues/10684
---
include/SDL3/SDL_pixels.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/include/SDL3/SDL_pixels.h b/include/SDL3/SDL_pixels.h
index 3825dd5850ca5..22813ff5af525 100644
--- a/include/SDL3/SDL_pixels.h
+++ b/include/SDL3/SDL_pixels.h
@@ -47,6 +47,15 @@ extern "C" {
*/
#define SDL_ALPHA_OPAQUE 255
+/**
+ * A fully opaque floating point alpha value.
+ *
+ * \since This macro is available since SDL 3.0.0.
+ *
+ * \sa SDL_ALPHA_TRANSPARENT_FLOAT
+ */
+#define SDL_ALPHA_OPAQUE_FLOAT 1.0f
+
/**
* A fully transparent 8-bit alpha value.
*
@@ -56,6 +65,15 @@ extern "C" {
*/
#define SDL_ALPHA_TRANSPARENT 0
+/**
+ * A fully transparent floating point alpha value.
+ *
+ * \since This macro is available since SDL 3.0.0.
+ *
+ * \sa SDL_ALPHA_OPAQUE_FLOAT
+ */
+#define SDL_ALPHA_TRANSPARENT_FLOAT 0.0f
+
/** Pixel type. */
typedef enum SDL_PixelType
{