annotate libass/ass_bitmap.h @ 35609:4e76a7f64810

Fix compilation with current FFmpeg.
author cehoyos
date Sat, 22 Dec 2012 10:53:51 +0000
parents 6e7f60f6f9d4
children c3aaaf17c721
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 /*
26723
0f892cd714b2 Use standard license header.
diego
parents: 26138
diff changeset
2 * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
0f892cd714b2 Use standard license header.
diego
parents: 26138
diff changeset
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
0f892cd714b2 Use standard license header.
diego
parents: 26138
diff changeset
5 *
34011
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
6 * Permission to use, copy, modify, and distribute this software for any
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
7 * purpose with or without fee is hereby granted, provided that the above
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
8 * copyright notice and this permission notice appear in all copies.
26723
0f892cd714b2 Use standard license header.
diego
parents: 26138
diff changeset
9 *
34011
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
88eebbbbd6a0 Update included libass copy to 0.9.13 release.
reimar
parents: 31853
diff changeset
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26723
0f892cd714b2 Use standard license header.
diego
parents: 26138
diff changeset
17 */
20008
fa122b7c71c6 Add copyright notice and vim/emacs comments to libass and vf_ass.c.
eugeni
parents: 19966
diff changeset
18
25897
aaebaf255b23 Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents: 25535
diff changeset
19 #ifndef LIBASS_BITMAP_H
aaebaf255b23 Consistently give all libass multiple inclusion guards a LIBASS_ prefix.
diego
parents: 25535
diff changeset
20 #define LIBASS_BITMAP_H
19846
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
21
26138
74055622161d Add missing header #includes to fix 'make checkheaders'.
diego
parents: 25897
diff changeset
22 #include <ft2build.h>
74055622161d Add missing header #includes to fix 'make checkheaders'.
diego
parents: 25897
diff changeset
23 #include FT_GLYPH_H
74055622161d Add missing header #includes to fix 'make checkheaders'.
diego
parents: 25897
diff changeset
24
30200
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
25 #include "ass.h"
19848
07be98a5dd5f Add \be (blur edges) support to libass.
eugeni
parents: 19846
diff changeset
26
30200
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
27 typedef struct ass_synth_priv ASS_SynthPriv;
19848
07be98a5dd5f Add \be (blur edges) support to libass.
eugeni
parents: 19846
diff changeset
28
30200
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
29 ASS_SynthPriv *ass_synth_init(double);
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
30 void ass_synth_done(ASS_SynthPriv *priv);
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
31
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
32 typedef struct {
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
33 int left, top;
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
34 int w, h; // width, height
34295
6e7f60f6f9d4 Update libass to 0.10 release.
reimar
parents: 34011
diff changeset
35 int stride;
30200
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
36 unsigned char *buffer; // w x h buffer
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
37 } Bitmap;
19846
bcc792bfa431 Store bitmap glyphs in a separate struct, instead of FreeType's internal buffer.
eugeni
parents:
diff changeset
38
34295
6e7f60f6f9d4 Update libass to 0.10 release.
reimar
parents: 34011
diff changeset
39 Bitmap *outline_to_bitmap(ASS_Library *library, FT_Library ftlib,
6e7f60f6f9d4 Update libass to 0.10 release.
reimar
parents: 34011
diff changeset
40 FT_Outline *outline, int bord);
19966
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
41 /**
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
42 * \brief perform glyph rendering
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
43 * \param glyph original glyph
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
44 * \param outline_glyph "border" glyph, produced from original by FreeType's glyph stroker
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
45 * \param bm_g out: pointer to the bitmap of original glyph is returned here
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
46 * \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
47 * \param bm_g out: pointer to the bitmap of glyph shadow is returned here
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
48 * \param be 1 = produces blurred bitmaps, 0 = normal bitmaps
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
49 */
34295
6e7f60f6f9d4 Update libass to 0.10 release.
reimar
parents: 34011
diff changeset
50 int outline_to_bitmap3(ASS_Library *library, ASS_SynthPriv *priv_blur,
6e7f60f6f9d4 Update libass to 0.10 release.
reimar
parents: 34011
diff changeset
51 FT_Library ftlib, FT_Outline *outline, FT_Outline *border,
6e7f60f6f9d4 Update libass to 0.10 release.
reimar
parents: 34011
diff changeset
52 Bitmap **bm_g, Bitmap **bm_o, Bitmap **bm_s,
6e7f60f6f9d4 Update libass to 0.10 release.
reimar
parents: 34011
diff changeset
53 int be, double blur_radius, FT_Vector shadow_offset,
6e7f60f6f9d4 Update libass to 0.10 release.
reimar
parents: 34011
diff changeset
54 int border_style);
19966
27187c1ac20b Cosmetics: add some comments.
eugeni
parents: 19965
diff changeset
55
30200
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
56 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
57
30200
48d020c5ceca Update internal libass copy to commit 8db4a5
greg
parents: 28799
diff changeset
58 #endif /* LIBASS_BITMAP_H */