| 1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
| 2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 |
| 3 | |
| 4 | TestCase := Rectangle { |
| 5 | |
| 6 | Text { |
| 7 | text: "The path should fit into the red rectangle" ; |
| 8 | color: black; |
| 9 | } |
| 10 | |
| 11 | fit_rect := Rectangle { |
| 12 | x: 0phx; |
| 13 | y: 100phx; |
| 14 | background: red; |
| 15 | width: 700phx; |
| 16 | height: 500phx; |
| 17 | |
| 18 | Path { |
| 19 | x: 0phx; |
| 20 | y: 0phx; |
| 21 | width: fit_rect.width; |
| 22 | height: fit_rect.height; |
| 23 | commands: "M 100 300 Q 150 50 1100 400 Q 1450 500 750 500 Q 1000 600 950 600 C 325 575 350 450 150 550 Q 0 600 100 800 C 250 850 300 600 550 850 C 800 850 850 650 2000 700 " ; |
| 24 | stroke: black; |
| 25 | stroke_width: 2px; |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | |