From caa68b08bf99ef7575438a906cc81dc2f71e77b3 Mon Sep 17 00:00:00 2001 From: Lephe Date: Wed, 31 Jan 2024 15:51:39 +0100 Subject: [PATCH] render-fx: add image formats in public API --- include/gint/display-fx.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/include/gint/display-fx.h b/include/gint/display-fx.h index 3835986..af85e43 100644 --- a/include/gint/display-fx.h +++ b/include/gint/display-fx.h @@ -61,12 +61,6 @@ typedef enum } color_t; -/* Profiles: - 0: MONO (1 layer: color) - 1: ALPHA (2 layers: color, alpha) - 2: GRAY (2 layers: light, dark) - 3: GRAY_ALPHA (3 layers: light, dark, alpha) */ - //--- // Image rendering (bopti) //--- @@ -93,6 +87,19 @@ typedef struct } GPACKED(4) bopti_image_t; +/* Image formats ("profiles") */ +enum { + /* MONO: black/white, 1 layer (bw) */ + IMAGE_MONO = 0, + /* MONO_ALPHA: black/white/transparent, 2 layers (alpha+bw) */ + IMAGE_MONO_ALPHA = 1, + /* GRAY: black/dark/light/white, 2 layers (light+dark) */ + IMAGE_GRAY = 2, + /* GRAY_ALPHA: black/dark/light/white/transparent, 3 layres + (alpha+light+dark) */ + IMAGE_GRAY_ALPHA = 3, +}; + /* Number of layers in the image. */ GINLINE static int image_layer_count(int profile) {