auto r = sub::SSAReader::parse_line (
base,
"This is a line with some {\\i1}italics{\\i0} and then\\nthere is a new line.",
- 1920, 1080
+ 1920, 1080,
+ sub::Colour(1, 1, 1)
);
auto i = r.begin();
auto r = sub::SSAReader::parse_line (
base,
"{\\i1}It's all just italics{\\i0}",
- 1920, 1080
+ 1920, 1080,
+ sub::Colour(1, 1, 1)
);
/* Convert a font size in points to a vertical position for this file */
r = sub::SSAReader::parse_line (
base,
"{\\i1}Italic{\\i0}\\Nand new line",
- 1920, 1080
+ 1920, 1080,
+ sub::Colour(1, 1, 1)
);
i = r.begin ();
auto r = sub::SSAReader::parse_line (
base,
"This is a line with some {\\fs64}font sizing.",
- 1920, 1080
+ 1920, 1080,
+ sub::Colour(1, 1, 1)
);
auto i = r.begin ();
auto r = sub::SSAReader::parse_line (
base,
String::compose("{\\c%1}Hello world", command),
- 1920, 1080
+ 1920, 1080,
+ sub::Colour(1, 0, 1)
);
auto i = r.begin ();
test_c("&HFF00&", "00ff00");
test_c("&HFF0000&", "0000ff");
test_c("&HFFFFFF&", "ffffff");
+ /* \c with no parameter seems to be parsed as "return to primary colour" */
+ test_c("", "ff00ff");
}