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
#include "config.h"
27
25
ASS_Settings *settings = &priv->settings;
30
priv->cache.glyph_cache =
31
ass_glyph_cache_reset(priv->cache.glyph_cache);
32
priv->cache.bitmap_cache =
33
ass_bitmap_cache_reset(priv->cache.bitmap_cache);
34
priv->cache.composite_cache =
35
ass_composite_cache_reset(priv->cache.composite_cache);
28
ass_cache_empty(priv->cache.outline_cache, 0);
29
ass_cache_empty(priv->cache.bitmap_cache, 0);
30
ass_cache_empty(priv->cache.composite_cache, 0);
36
31
ass_free_images(priv->prev_images_root);
37
32
priv->prev_images_root = 0;
61
void ass_set_shaper(ASS_Renderer *priv, ASS_ShapingLevel level)
63
#ifdef CONFIG_HARFBUZZ
64
// select the complex shaper for illegal values
65
if (level == ASS_SHAPING_SIMPLE || level == ASS_SHAPING_COMPLEX)
66
priv->settings.shaper = level;
68
priv->settings.shaper = ASS_SHAPING_COMPLEX;
66
72
void ass_set_margins(ASS_Renderer *priv, int t, int b, int l, int r)
68
74
if (priv->settings.left_margin != l || priv->settings.right_margin != r ||