src/draw: Provide some useful constants
authorKeith Packard <keithp@keithp.com>
Wed, 8 Mar 2023 23:49:52 +0000 (15:49 -0800)
committerKeith Packard <keithp@keithp.com>
Thu, 1 Feb 2024 01:50:19 +0000 (17:50 -0800)
The two colors and a stride macro

Signed-off-by: Keith Packard <keithp@keithp.com>
src/draw/ao_draw.h

index 29afef9cb043fa3189c6c410ef4bac4e1ed6c325..74d5dc09e654fc53a525d038a95244d23ecfb495 100644 (file)
@@ -28,6 +28,8 @@ struct ao_bitmap {
        struct ao_box   damage;
 };
 
+#define AO_BITMAP_STRIDE(width)        (((width) + 31) >> 5)
+
 struct ao_coord {
        float   x, y;
 };
@@ -209,4 +211,7 @@ extern const struct ao_transform ao_identity;
 #define AO_NAND          0xe   /* NOT src OR NOT dst */
 #define AO_SET           0xf   /* 1 */
 
+#define AO_WHITE       0xffffffff
+#define AO_BLACK       0x00000000
+
 #endif /* _AO_DRAW_H_ */