{
if (!outline_alloc(outline, DRAWING_INITIAL_POINTS, DRAWING_INITIAL_SEGMENTS))
return false;
- outline->n_points = outline->n_segments = 0;
rectangle_reset(cbox);
ASS_DrawingToken *tokens = drawing_tokenize(text);
outline->max_points = n_points;
outline->max_segments = n_segments;
+ outline->n_points = outline->n_segments = 0;
return true;
}
S_ON, S_Q, S_C1, S_C2
};
- outline->n_points = outline->n_segments = 0;
for (size_t i = 0, j = 0; i < source->n_contours; i++) {
ASS_Vector pt;
bool skip_last = false;
bool outline_stroke(ASS_Outline *result, ASS_Outline *result1,
const ASS_Outline *path, int xbord, int ybord, int eps)
{
+ outline_alloc(result, 2 * path->n_points, 2 * path->n_segments);
+ outline_alloc(result1, 2 * path->n_points, 2 * path->n_segments);
+ if (!result->max_points || !result1->max_points)
+ return false;
+
const int dir = 3;
int rad = FFMAX(xbord, ybord);
assert(rad >= eps);
- result->n_points = result->n_segments = 0;
- result1->n_points = result1->n_segments = 0;
-
StrokerState str;
str.result[0] = result;
str.result[1] = result1;
if (!outline_scale_pow2(&src, &k->outline->outline[0],
k->scale_ord_x, k->scale_ord_y))
return 1;
-
- outline_alloc(&v->outline[0], 2 * src.n_points, 2 * src.n_segments);
- outline_alloc(&v->outline[1], 2 * src.n_points, 2 * src.n_segments);
- if (!v->outline[0].max_points || !v->outline[1].max_points ||
- !outline_stroke(&v->outline[0], &v->outline[1], &src,
- k->border.x * STROKER_PRECISION,
- k->border.y * STROKER_PRECISION,
- STROKER_PRECISION)) {
+ if (!outline_stroke(&v->outline[0], &v->outline[1], &src,
+ k->border.x * STROKER_PRECISION,
+ k->border.y * STROKER_PRECISION,
+ STROKER_PRECISION)) {
ass_msg(render_priv->library, MSGL_WARN, "Cannot stroke outline");
outline_free(&v->outline[0]);
outline_free(&v->outline[1]);