int align;
int x;
int y;
+ int i_font_height_percent;
bool is_fixed;
int fixed_width;
int fixed_height;
+ bool renderbg;
};
static int SubpictureTextValidate(subpicture_t *subpic,
r->psz_text = sys->text ? strdup(sys->text) : NULL;
r->psz_html = sys->html ? strdup(sys->html) : NULL;
r->i_align = sys->align;
+ r->b_renderbg = sys->renderbg;
if (!sys->is_fixed) {
const float margin_ratio = 0.04;
const int margin_h = margin_ratio * fmt_dst->i_visible_width;
r->i_x = sys->x * fmt_dst->i_width / sys->fixed_width;
r->i_y = sys->y * fmt_dst->i_height / sys->fixed_height;
}
+
+ if (sys->i_font_height_percent != 0)
+ {
+ r->p_style = text_style_New();
+ if (r->p_style)
+ {
+ r->p_style->i_font_size = sys->i_font_height_percent *
+ subpic->i_original_picture_height / 100;
+ r->p_style->i_font_color = 0xffffff;
+ r->p_style->i_font_alpha = 0xff;
+ }
+ }
}
static void SubpictureTextDestroy(subpicture_t *subpic)
{