summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2022-07-26 23:01:40 -0500
committerrcombs <rcombs@rcombs.me>2022-11-15 21:14:37 -0600
commit5ed92677c3f3399eb0cf436e85527e2897e0a924 (patch)
treea60bb942456ecec2a20fa446ff458a2adb9ab759
parent0e18f99613b5ddabdf9c15431e5d512ac23d26be (diff)
downloadlibass-5ed92677c3f3399eb0cf436e85527e2897e0a924.tar.bz2
libass-5ed92677c3f3399eb0cf436e85527e2897e0a924.tar.xz
ass_render: take RenderContext* in align_lines()
-rw-r--r--libass/ass_render.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 8737609..58b5465 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -2292,18 +2292,18 @@ static void apply_baseline_shear(RenderContext *state)
}
}
-static void align_lines(ASS_Renderer *render_priv, double max_text_width)
+static void align_lines(RenderContext *state, double max_text_width)
{
- TextInfo *text_info = &render_priv->text_info;
+ TextInfo *text_info = state->text_info;
GlyphInfo *glyphs = text_info->glyphs;
int i, j;
double width = 0;
int last_break = -1;
- int halign = render_priv->state.alignment & 3;
- int justify = render_priv->state.justify;
+ int halign = state->alignment & 3;
+ int justify = state->justify;
double max_width = 0;
- if (render_priv->state.evt_type & EVENT_HSCROLL) {
+ if (state->evt_type & EVENT_HSCROLL) {
justify = halign;
halign = HALIGN_LEFT;
}
@@ -2857,7 +2857,7 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event,
reorder_text(render_priv);
- align_lines(render_priv, max_text_width);
+ align_lines(state, max_text_width);
// determing text bounding box
ASS_DRect bbox;