Commit 9f43ceac authored by François Cartegnie's avatar François Cartegnie 🤞

subpicture: rename confusing option

background is always rendered on region depending on renderer
parent f5eb3ce2
......@@ -65,7 +65,7 @@ struct subpicture_region_t
int i_alpha; /**< transparency */
text_segment_t *p_text; /**< subtitle text, made of a list of segments */
bool b_renderbg; /**< render black background under text */
bool b_noregionbg; /**< render background under text only */
bool b_gridmode; /** if the decoder sends row/cols based output */
subpicture_region_t *p_next; /**< next region in the list */
......
......@@ -424,7 +424,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, text_segment_t *p_segments, mti
region itself gets aligned, but the text inside it does not */
p_spu_sys->align = SUBPICTURE_ALIGN_LEAVETEXT;
p_spu_sys->p_segments = p_segments;
p_spu_sys->renderbg = p_dec->p_sys->b_opaque;
p_spu_sys->noregionbg = p_dec->p_sys->b_opaque;
p_spu_sys->gridmode = true;
/* Set style defaults (will be added to segments if none set) */
p_spu_sys->p_default_style->i_style_flags |= STYLE_MONOSPACED;
......
......@@ -11,7 +11,7 @@ struct subpicture_updater_sys_t {
bool is_fixed;
int fixed_width;
int fixed_height;
bool renderbg;
bool noregionbg;
bool gridmode;
/* styling */
......@@ -66,7 +66,7 @@ static void SubpictureTextUpdate(subpicture_t *subpic,
r->p_text = sys->p_segments;
r->i_align = sys->align;
r->b_renderbg = sys->renderbg;
r->b_noregionbg = sys->noregionbg;
r->b_gridmode = sys->gridmode;
if (!sys->is_fixed) {
const float margin_ratio = 0.04;
......
......@@ -444,7 +444,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
p_spu_sys->p_segments = text_segment_New( &p_text[offset] );
p_spu_sys->align = i_align;
p_spu_sys->renderbg = b_opaque;
p_spu_sys->noregionbg = b_opaque;
#ifdef ZVBI_DEBUG
msg_Info( p_dec, "page %x-%x(%d)\n\"%s\"", p_page.pgno, p_page.subno, i_total, &p_text[offset] );
......
......@@ -793,7 +793,7 @@ static inline int RenderAXYZ( filter_t *p_filter,
i_a = VLC_CLIP( i_a, 0, 255 );
uint8_t i_x, i_y, i_z;
if (p_region->b_renderbg) {
if (p_region->b_noregionbg) {
/* Render the background just under the text */
FillPicture( p_picture, STYLE_ALPHA_TRANSPARENT, 0x00, 0x00, 0x00 );
RenderBackground(p_region, p_line_head, p_bbox, i_margin, p_picture, i_text_width,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment