5
5
* This file is part of libass.
7
* libass is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* libass is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License along
18
* with libass; if not, write to the Free Software Foundation, Inc.,
19
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
7
* Permission to use, copy, modify, and distribute this software for any
8
* purpose with or without fee is hereby granted, provided that the above
9
* copyright notice and this permission notice appear in all copies.
11
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
20
#ifndef LIBASS_RENDER_H
96
101
// describes a glyph
97
102
// GlyphInfo and TextInfo are used for text centering and word-wrapping operations
103
typedef struct glyph_info {
100
105
unsigned skip; // skip glyph when layouting text
102
FT_Glyph outline_glyph;
110
ASS_Drawing *drawing;
103
113
Bitmap *bm; // glyph bitmap
104
114
Bitmap *bm_o; // outline bitmap
105
115
Bitmap *bm_s; // shadow bitmap
108
119
char linebreak; // the first (leading) glyph of some line ?
109
120
uint32_t c[4]; // colors
110
121
FT_Vector advance; // 26.6
122
FT_Vector cluster_advance;
111
123
Effect effect_type;
112
124
int effect_timing; // time duration of current karaoke word
113
125
// after process_karaoke_effects: distance in pixels from the glyph origin.
121
133
double frx, fry, frz; // rotation
122
134
double fax, fay; // text shearing
135
double scale_x, scale_y;
136
double border_x, border_y;
124
144
BitmapHashKey hash_key;
146
// next glyph in this cluster
147
struct glyph_info *next;
128
151
double asc, desc;
263
292
void reset_render_context(ASS_Renderer *render_priv);
264
293
void ass_free_images(ASS_Image *img);
295
// XXX: this is actually in ass.c, includes should be fixed later on
296
void ass_lazy_track_init(ASS_Library *lib, ASS_Track *track);
266
298
#endif /* LIBASS_RENDER_H */