if (val)
render_priv->state.drawing->scale = val;
render_priv->state.drawing_mode = !!val;
+ } else if (mystrcmp(&p, "q")) {
+ int val;
+ if (!mystrtoi(&p, &val))
+ val = render_priv->track->WrapStyle;
+ render_priv->state.wrap_style = val;
}
return p;
if (*p == '\\') {
if ((*(p + 1) == 'N')
|| ((*(p + 1) == 'n')
- && (render_priv->track->WrapStyle == 2))) {
+ && (render_priv->state.wrap_style == 2))) {
p += 2;
*str = p;
return '\n';
render_priv->state.frx = render_priv->state.fry = 0.;
render_priv->state.frz = M_PI * render_priv->state.style->Angle / 180.;
render_priv->state.fax = render_priv->state.fay = 0.;
+ render_priv->state.wrap_style = render_priv->track->WrapStyle;
// FIXME: does not reset unsupported attributes.
}
* 2. Try moving words from the end of a line to the beginning of the next one while it reduces
* the difference in lengths between this two lines.
* The result may not be optimal, but usually is good enough.
+ *
+ * FIXME: implement style 0 and 3 correctly, add support for style 1
*/
static void
wrap_lines_smart(ASS_Renderer *render_priv, double max_text_width)
}
if ((len >= max_text_width)
- && (render_priv->track->WrapStyle != 2)) {
+ && (render_priv->state.wrap_style != 2)) {
break_type = 1;
break_at = last_space;
if (break_at == -1)