Lines Matching refs:style
75 StyleBox style;
132 static void mov_text_parse_style_record(StyleBox *style, const uint8_t **ptr)
135 style->font_id = bytestream_get_be16(ptr);
136 // face-style-flags
137 style->flags = bytestream_get_byte(ptr);
138 style->bold = !!(style->flags & STYLE_FLAG_BOLD);
139 style->italic = !!(style->flags & STYLE_FLAG_ITALIC);
140 style->underline = !!(style->flags & STYLE_FLAG_UNDERLINE);
142 style->fontsize = bytestream_get_byte(ptr);
144 style->color = bytestream_get_be24(ptr);
145 style->color = RGB_TO_BGR(style->color);
146 style->alpha = bytestream_get_byte(ptr);
197 mov_text_parse_style_record(&m->d.style, &tx3g_ptr);
220 if (m->ftab[i].font_id == m->d.style.font_id)
278 // A single style record is of length 12 bytes.
290 StyleBox *style = &m->s[i];
292 style->start = bytestream_get_be16(&tsmb);
293 style->end = bytestream_get_be16(&tsmb);
294 if (style->end < style->start ||
295 (i && style->start < m->s[i - 1].end)) {
299 if (style->start == style->end) {
300 /* Skip this style as it applies to no character */
307 mov_text_parse_style_record(style, &tsmb);
308 if (styles_equivalent(style, &m->d.style)) {
309 /* Skip this style as it is equivalent to the default style */
313 } else if (i && style->start == style[-1].end &&
314 styles_equivalent(style, &style[-1])) {
316 style[-1].end = style->end;
352 const StyleBox *const default_style = &m->d.style;
370 const StyleBox *style = &m->s[entry];
371 if (text_pos == style->end) {
375 style++;
377 if (entry < m->style_entries && text_pos == style->start) {
378 if (style->bold ^ default_style->bold)
379 av_bprintf(buf, "{\\b%d}", style->bold);
380 if (style->italic ^ default_style->italic)
381 av_bprintf(buf, "{\\i%d}", style->italic);
382 if (style->underline ^ default_style->underline)
383 av_bprintf(buf, "{\\u%d}", style->underline);
384 if (style->fontsize != default_style->fontsize)
385 av_bprintf(buf, "{\\fs%d}", style->fontsize);
386 if (style->font_id != default_style->font_id)
388 if (style->font_id == m->ftab[i].font_id)
391 if (default_style->color != style->color) {
392 color = style->color;
395 if (default_style->alpha != style->alpha)
396 av_bprintf(buf, "{\\1a&H%02X&}", 255 - style->alpha);
448 * TODO: Handle the default text style.
450 * it's very common to find files where the default style is broken
457 const StyleBox *const default_style = &m->d.style;
500 * In complex cases, there are style descriptors appended to the string