Added .gitignore
[gfxprim.git] / core / GP_Text.h
blob35fc68e084c3417f82aafc149de4e6824ef471a5
1 /*****************************************************************************
2 * This file is part of gfxprim library. *
3 * *
4 * Gfxprim is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU Lesser General Public *
6 * License as published by the Free Software Foundation; either *
7 * version 2.1 of the License, or (at your option) any later version. *
8 * *
9 * Gfxprim is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12 * Lesser General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU Lesser General Public *
15 * License along with gfxprim; if not, write to the Free Software *
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
17 * Boston, MA 02110-1301 USA *
18 * *
19 * Copyright (C) 2009-2010 Jiri "BlueBear" Dluhos *
20 * <jiri.bluebear.dluhos@gmail.com> *
21 * *
22 * Copyright (C) 2009-2010 Cyril Hrubis <metan@ucw.cz> *
23 * *
24 *****************************************************************************/
26 #ifndef GP_TEXT_H
27 #define GP_TEXT_H
29 #include "GP_Context.h"
31 /* How the rendered text should be aligned.
32 * For GP_Text(), the alignment is relative to the specified point:
34 * - GP_ALIGN_LEFT draws the text to the left of the point,
35 * - GP_ALIGN_CENTER centers it at the point horizontally,
36 * - GP_ALIGN_RIGHT draws the text to the right of the point
37 * - GP_VALIGN_ABOVE (or TOP) draws the text above the point
38 * - GP_VALIGN_CENTER centers the text vertically at the point
39 * - GP_VALIGN_BASELINE places the text baseline at the point
40 * - GP_VALIGN_BELOW (or BOTTOM) draws the text below the point
42 typedef enum GP_TextAlign {
43 GP_ALIGN_LEFT = 0x01,
44 GP_ALIGN_CENTER = 0x02,
45 GP_ALIGN_RIGHT = 0x03,
46 GP_VALIGN_ABOVE = 0x10,
47 GP_VALIGN_TOP = GP_VALIGN_ABOVE,
48 GP_VALIGN_CENTER = 0x20,
49 GP_VALIGN_BASELINE = 0x30,
50 GP_VALIGN_BELOW = 0x40,
51 GP_VALIGN_BOTTOM = GP_VALIGN_BELOW,
52 } GP_TextAlign;
54 GP_RetCode GP_Text(GP_Context *context, const GP_TextStyle *style,
55 int x, int y, int align, const char *str, GP_Pixel pixel);
57 GP_RetCode GP_TText(GP_Context *context, const GP_TextStyle *style,
58 int x, int y, int align, const char *str, GP_Pixel pixel);
60 GP_RetCode GP_BoxCenteredText(GP_Context *context, const GP_TextStyle *style,
61 int x, int y, int w, int h, const char *str,
62 GP_Pixel pixel);
64 GP_RetCode GP_TBoxCenteredText(GP_Context *context, const GP_TextStyle *style,
65 int x, int y, int w, int h, const char *str,
66 GP_Pixel pixel);
68 #endif /* GP_TEXT_H */