Draw border on only some sides (issue #580, thanks @stophe)

This commit is contained in:
o9000
2016-05-17 21:59:43 +02:00
parent 5a5d8fd978
commit 78bc8b5c74
5 changed files with 85 additions and 15 deletions

View File

@@ -124,6 +124,15 @@ typedef struct Color {
double alpha;
} Color;
typedef enum BorderMask {
BORDER_TOP = 1 << 0,
BORDER_BOTTOM = 1 << 1,
BORDER_LEFT = 1 << 2,
BORDER_RIGHT = 1 << 3
} BorderMask;
#define BORDER_ALL (BORDER_TOP | BORDER_BOTTOM | BORDER_LEFT | BORDER_RIGHT)
typedef struct Border {
// It's essential that the first member is color
Color color;
@@ -131,6 +140,8 @@ typedef struct Border {
int width;
// Corner radius
int radius;
// Mask: bitwise OR of BorderMask
int mask;
} Border;
typedef struct Background {