slint/sixtyfps_compiler/tests/basic/svg_path.60
Simon Hausmann 251ef7fc97 Add support for SVG commands in Path elements
Using the commands property we can just paste SVG paths. This makes it
much easier to write examples/demos. A good online path designer is
for example https://codepen.io/anthonydugois/pen/mewdyZ
2020-07-09 13:41:57 +02:00

18 lines
370 B
Text

TestCase := Rectangle {
Path {
commands: "M 350 300 L 550 300 ";
LineTo { x: 10; y: 100; }
// ^error{Path elements cannot be mixed with the use of the SVG commands property.}
}
property<string> cmds: "M 350 300 L 550 300 ";
Path {
// ^error{The commands property only accepts string literals.}
commands: cmds;
}
}