Closed soundprojects closed 2 years ago
Created track and section structures. Will create a function in either .slint or in rust to create a vector of Path's that can be drawn in the UI.
I guess that going through our track structure and simply drawing a path for each section should work. This would allow us to color the section properly if it is active.
Drawing works using our slint structures in a for loop. Not the most pretty thing to convert between UI and own structs but fine for now. Drawing can be expanded to make it adjust to widths and make it more pretty
We can use Slint's Path objects to draw a route. API is pretty straightforward and we can use relative sizing using the parent objects.
Path's allow thickness and colors. We can either draw some track for now or we can dynamically build one from a data structure which abstracts the track. Something like PetGraph to specify what we want and then some function to turn this into a vector of Path objects.