options: Make dynamic dup hack work with new options
[mplayer.git] / libass / ass_bitmap.h
blob634d7e41b1b3aa15df3f8afcfa13dd85267f2aba
1 // -*- c-basic-offset: 8; indent-tabs-mode: t -*-
2 // vim:ts=8:sw=8:noet:ai:
3 /*
4 Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef LIBASS_BITMAP_H
22 #define LIBASS_BITMAP_H
24 #include <ft2build.h>
25 #include FT_GLYPH_H
27 typedef struct ass_synth_priv_s ass_synth_priv_t;
29 ass_synth_priv_t* ass_synth_init(void);
30 void ass_synth_done(ass_synth_priv_t* priv);
32 typedef struct bitmap_s {
33 int left, top;
34 int w, h; // width, height
35 unsigned char* buffer; // w x h buffer
36 } bitmap_t;
38 /**
39 * \brief perform glyph rendering
40 * \param glyph original glyph
41 * \param outline_glyph "border" glyph, produced from original by FreeType's glyph stroker
42 * \param bm_g out: pointer to the bitmap of original glyph is returned here
43 * \param bm_o out: pointer to the bitmap of outline (border) glyph is returned here
44 * \param bm_g out: pointer to the bitmap of glyph shadow is returned here
45 * \param be 1 = produces blurred bitmaps, 0 = normal bitmaps
47 int glyph_to_bitmap(ass_synth_priv_t* priv, FT_Glyph glyph, FT_Glyph outline_glyph, bitmap_t** bm_g, bitmap_t** bm_o, bitmap_t** bm_s, int be);
49 void ass_free_bitmap(bitmap_t* bm);
51 #endif /* LIBASS_BITMAP_H */