Mercurial > mplayer.hg
annotate libass/ass_bitmap.h @ 31641:6c5a559d340c
Faster paletted to OSD conversion.
author | reimar |
---|---|
date | Sun, 11 Jul 2010 13:54:23 +0000 |
parents | 48d020c5ceca |
children | e64df5862cea |
rev | line source |
---|---|
20008
fa122b7c71c6
Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents:
19966
diff
changeset
|
1 /* |
26723 | 2 * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
3 * | |
26738
588ce97b44f2
Speak of libass instead of MPlayer in the libass license headers.
diego
parents:
26723
diff
changeset
|
4 * This file is part of libass. |
26723 | 5 * |
26738
588ce97b44f2
Speak of libass instead of MPlayer in the libass license headers.
diego
parents:
26723
diff
changeset
|
6 * libass is free software; you can redistribute it and/or modify |
26723 | 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. | |
10 * | |
26738
588ce97b44f2
Speak of libass instead of MPlayer in the libass license headers.
diego
parents:
26723
diff
changeset
|
11 * libass is distributed in the hope that it will be useful, |
26723 | 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. | |
15 * | |
16 * You should have received a copy of the GNU General Public License along | |
26738
588ce97b44f2
Speak of libass instead of MPlayer in the libass license headers.
diego
parents:
26723
diff
changeset
|
17 * with libass; if not, write to the Free Software Foundation, Inc., |
26723 | 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
19 */ | |
20008
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 |
30200 | 27 #include "ass.h" |
19848 | 28 |
30200 | 29 typedef struct ass_synth_priv ASS_SynthPriv; |
19848 | 30 |
30200 | 31 ASS_SynthPriv *ass_synth_init(double); |
32 void ass_synth_done(ASS_SynthPriv *priv); | |
33 | |
34 typedef struct { | |
35 int left, top; | |
36 int w, h; // width, height | |
37 unsigned char *buffer; // w x h buffer | |
38 } Bitmap; | |
19846
bcc792bfa431
Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff
changeset
|
39 |
19966 | 40 /** |
41 * \brief perform glyph rendering | |
42 * \param glyph original glyph | |
43 * \param outline_glyph "border" glyph, produced from original by FreeType's glyph stroker | |
44 * \param bm_g out: pointer to the bitmap of original glyph is returned here | |
45 * \param bm_o out: pointer to the bitmap of outline (border) glyph is returned here | |
46 * \param bm_g out: pointer to the bitmap of glyph shadow is returned here | |
47 * \param be 1 = produces blurred bitmaps, 0 = normal bitmaps | |
48 */ | |
30200 | 49 int glyph_to_bitmap(ASS_Library *library, ASS_SynthPriv *priv_blur, |
50 FT_Glyph glyph, FT_Glyph outline_glyph, | |
51 Bitmap **bm_g, Bitmap **bm_o, Bitmap **bm_s, | |
52 int be, double blur_radius, FT_Vector shadow_offset, | |
53 int border_style); | |
19966 | 54 |
30200 | 55 void ass_free_bitmap(Bitmap *bm); |
19846
bcc792bfa431
Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff
changeset
|
56 |
30200 | 57 #endif /* LIBASS_BITMAP_H */ |