2 * Copyright (C) 2016 Vabishchevich Nikolay <vabnick@gmail.com>
4 * This file is part of libass.
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #ifndef LIBASS_OUTLINE_H
20 #define LIBASS_OUTLINE_H
27 typedef struct ass_outline {
28 size_t n_contours, max_contours;
30 size_t n_points, max_points;
35 #define EFFICIENT_CONTOUR_COUNT 8
37 bool outline_alloc(ASS_Outline *outline, size_t n_points, size_t n_contours);
38 ASS_Outline *outline_create(size_t n_points, size_t n_contours);
39 ASS_Outline *outline_convert(const FT_Outline *source);
40 ASS_Outline *outline_copy(const ASS_Outline *source);
41 void outline_free(ASS_Outline *outline);
43 bool outline_add_point(ASS_Outline *outline, FT_Vector pt, char tag);
44 bool outline_close_contour(ASS_Outline *outline);
46 void outline_translate(const ASS_Outline *outline, FT_Pos dx, FT_Pos dy);
47 void outline_transform(const ASS_Outline *outline, const FT_Matrix *matrix);
48 void outline_get_cbox(const ASS_Outline *outline, FT_BBox *cbox);
50 bool outline_stroke(ASS_Outline *result, ASS_Outline *result1,
51 const ASS_Outline *path, int xbord, int ybord, int eps);
54 #endif /* LIBASS_OUTLINE_H */