annotate libass/ass_bitmap.h @ 26480:b9ced5a4c5ff

consistently print fps with three digits of precision
author corey
date Wed, 23 Apr 2008 20:20:25 +0000
parents 74055622161d
children 0f892cd714b2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20008
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
1 // -*- c-basic-offset: 8; indent-tabs-mode: t -*-
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
2 // vim:ts=8:sw=8:noet:ai:
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
3 /*
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
4 Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
5
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
6 This program is free software; you can redistribute it and/or modify
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
7 it under the terms of the GNU General Public License as published by
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
8 the Free Software Foundation; either version 2 of the License, or
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
9 (at your option) any later version.
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
10
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
11 This program is distributed in the hope that it will be useful,
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
14 GNU General Public License for more details.
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
15
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
16 You should have received a copy of the GNU General Public License
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
17 along with this program; if not, write to the Free Software
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
19 */
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
20
25897
aaebaf255b23 Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents: 25535
diff changeset
21 #ifndef LIBASS_BITMAP_H
aaebaf255b23 Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents: 25535
diff changeset
22 #define LIBASS_BITMAP_H
19846
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
23
26138
74055622161d Add missing header #includes to fix 'make checkheaders'.
diego
parents: 25897
diff changeset
24 #include <ft2build.h>
74055622161d Add missing header #includes to fix 'make checkheaders'.
diego
parents: 25897
diff changeset
25 #include FT_GLYPH_H
74055622161d Add missing header #includes to fix 'make checkheaders'.
diego
parents: 25897
diff changeset
26
19848
07be98a5dd5f Add \be (blur edges) support to libass.
eugeni
parents: 19846
diff changeset
27 typedef struct ass_synth_priv_s ass_synth_priv_t;
07be98a5dd5f Add \be (blur edges) support to libass.
eugeni
parents: 19846
diff changeset
28
22886
71b3e04d0555 "()" to "(void)" function param list fixes
uau
parents: 20008
diff changeset
29 ass_synth_priv_t* ass_synth_init(void);
19848
07be98a5dd5f Add \be (blur edges) support to libass.
eugeni
parents: 19846
diff changeset
30 void ass_synth_done(ass_synth_priv_t* priv);
07be98a5dd5f Add \be (blur edges) support to libass.
eugeni
parents: 19846
diff changeset
31
19846
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
32 typedef struct bitmap_s {
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
33 int left, top;
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
34 int w, h; // width, height
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
35 unsigned char* buffer; // w x h buffer
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
36 } bitmap_t;
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
37
19966
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
38 /**
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
39 * \brief perform glyph rendering
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
40 * \param glyph original glyph
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
41 * \param outline_glyph "border" glyph, produced from original by FreeType's glyph stroker
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
42 * \param bm_g out: pointer to the bitmap of original glyph is returned here
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
43 * \param bm_o out: pointer to the bitmap of outline (border) glyph is returned here
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
44 * \param bm_g out: pointer to the bitmap of glyph shadow is returned here
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
45 * \param be 1 = produces blurred bitmaps, 0 = normal bitmaps
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
46 */
19965
70352570e9ae Shadow support in libass.
eugeni
parents: 19848
diff changeset
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);
19966
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
48
19846
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
49 void ass_free_bitmap(bitmap_t* bm);
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
50
25897
aaebaf255b23 Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents: 25535
diff changeset
51 #endif /* LIBASS_BITMAP_H */