From 24a8e6d377f073afb99c1a19dd78ead23e7b6132 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 4 Nov 2008 15:48:18 +0100 Subject: [PATCH] draw: support top and bottom as align Signed-off-by: Julien Danjou --- draw.c | 4 ++++ draw.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/draw.c b/draw.c index 21ac6d207..23195ede1 100644 --- a/draw.c +++ b/draw.c @@ -877,6 +877,8 @@ draw_align_fromstr(const char *align, ssize_t len) case A_TK_CENTER: return AlignCenter; case A_TK_RIGHT: return AlignRight; case A_TK_FLEX: return AlignFlex; + case A_TK_TOP: return AlignTop; + case A_TK_BOTTOM: return AlignBottom; default: return AlignLeft; } } @@ -894,6 +896,8 @@ draw_align_tostr(alignment_t a) case AlignCenter: return "center"; case AlignRight: return "right"; case AlignFlex: return "flex"; + case AlignBottom: return "bottom"; + case AlignTop: return "top"; default: return NULL; } } diff --git a/draw.h b/draw.h index 62b4fac93..b8e61303d 100644 --- a/draw.h +++ b/draw.h @@ -48,7 +48,9 @@ typedef enum AlignLeft = (0), AlignRight = (1), AlignCenter = (1 << 1), - AlignFlex = (1 << 2), + AlignTop = (1 << 2), + AlignBottom = (1 << 3), + AlignFlex = (1 << 4), } alignment_t; typedef struct vector_t vector_t;