Add test and fixup color red/green/blue fields

This commit is contained in:
Olivier Goffart 2024-03-12 10:49:18 +01:00
parent 3cf663ec82
commit b844f76842
4 changed files with 25 additions and 5 deletions

View file

@ -3049,7 +3049,7 @@ fn compile_builtin_function_call(
format!("[](const auto &a){{ auto e1 = std::end(a); auto e2 = const_cast<char*>(e1); auto r = std::strtod(std::begin(a), &e2); return e1 == e2 ? r : 0; }}({})", a.next().unwrap())
}
BuiltinFunction::ColorRgbaStruct => {
format!("{}.to_argb_u8()", a.next().unwrap())
format!("{}.to_argb_uint()", a.next().unwrap())
}
BuiltinFunction::ColorBrighter => {
format!("{}.brighter({})", a.next().unwrap(), a.next().unwrap())