1 /*****************************************************************************
2 * vlc_text_style.h: text_style_t definition and helpers.
3 *****************************************************************************
4 * Copyright (C) 1999-2010 the VideoLAN team
7 * Authors: Derk-Jan Hartman <hartman _AT_ videolan _DOT_ org>
8 * basOS G <noxelia 4t gmail , com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef VLC_TEXT_STYLE_H
26 #define VLC_TEXT_STYLE_H 1
35 * A text style is used to specify the formatting of text.
36 * A font renderer can use the supplied information to render the
41 char * psz_fontname
; /**< The name of the font */
42 int i_font_size
; /**< The font size in pixels */
43 int i_font_color
; /**< The color of the text 0xRRGGBB
44 (native endianness) */
45 int i_font_alpha
; /**< The transparency of the text.
47 0xFF fully transparent */
48 int i_style_flags
; /**< Formatting style flags */
49 int i_outline_color
; /**< The color of the outline 0xRRGGBB */
50 int i_outline_alpha
; /**< The transparency of the outline.
52 0xFF fully transparent */
53 int i_shadow_color
; /**< The color of the shadow 0xRRGGBB */
54 int i_shadow_alpha
; /**< The transparency of the shadow.
56 0xFF fully transparent */
57 int i_background_color
;/**< The color of the background 0xRRGGBB */
58 int i_background_alpha
;/**< The transparency of the background.
60 0xFF fully transparent */
61 int i_karaoke_background_color
;/**< Background color for karaoke 0xRRGGBB */
62 int i_karaoke_background_alpha
;/**< The transparency of the karaoke bg.
64 0xFF fully transparent */
65 int i_outline_width
; /**< The width of the outline in pixels */
66 int i_shadow_width
; /**< The width of the shadow in pixels */
67 int i_spacing
; /**< The spaceing between glyphs in pixels */
70 /* Style flags for \ref text_style_t */
72 #define STYLE_ITALIC 2
73 #define STYLE_OUTLINE 4
74 #define STYLE_SHADOW 8
75 #define STYLE_BACKGROUND 16
76 #define STYLE_UNDERLINE 32
77 #define STYLE_STRIKEOUT 64
80 * Create a default text style
82 VLC_API text_style_t
* text_style_New( void );
85 * Copy a text style into another
87 VLC_API text_style_t
* text_style_Copy( text_style_t
*, const text_style_t
* );
90 * Duplicate a text style
92 VLC_API text_style_t
* text_style_Duplicate( const text_style_t
* );
95 * Delete a text style created by text_style_New or text_style_Duplicate
97 VLC_API
void text_style_Delete( text_style_t
* );
103 #endif /* VLC_TEXT_STYLE_H */