1 // -*- c-basic-offset: 8; indent-tabs-mode: t -*-
2 // vim:ts=8:sw=8:noet:ai:
4 * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com>
6 * This file is part of libass.
8 * libass is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * libass is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with libass; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef LIBASS_BITMAP_H
24 #define LIBASS_BITMAP_H
29 typedef struct ass_synth_priv_s ass_synth_priv_t
;
31 ass_synth_priv_t
* ass_synth_init(double);
32 void ass_synth_done(ass_synth_priv_t
* priv
);
34 typedef struct bitmap_s
{
36 int w
, h
; // width, height
37 unsigned char* buffer
; // w x h buffer
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
49 int glyph_to_bitmap(ass_synth_priv_t
* priv_blur
, FT_Glyph glyph
, FT_Glyph outline_glyph
, bitmap_t
** bm_g
, bitmap_t
** bm_o
, bitmap_t
** bm_s
, int be
, double blur_radius
);
51 void ass_free_bitmap(bitmap_t
* bm
);
53 #endif /* LIBASS_BITMAP_H */