mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
![]() Allow converting a brush to a color. In the case of a gradient, the color of the first stop is returned. For the C++ generator this requires adding the extra case of explicitly calling the `Brush(const Color &)` constructor, despite it being implicit, in order to generate the correct code when we have IR that casts twice: ``` Expression::Cast { from: Expression::Cast { from: Expression::Cast { from: Expression::NumberLiteral(...), to: Type::Color, } to: Type::Brush, }, to: Type::Color, } ``` |
||
---|---|---|
.. | ||
sixtyfps-cpp | ||
sixtyfps-node | ||
sixtyfps-rs | ||
sixtyfps-wasm-interpreter |