slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.55k stars 601 forks source link

.wave in css to slint #3919

Closed sundaritisthatis closed 10 months ago

sundaritisthatis commented 12 months ago

Need example to extend the gradient to wave feature in slint using colors - kindly help rendering it

FloVanGH commented 12 months ago

Hi. Do you request to have such a feature for the slint brush or do you want help to create an wave right now in Slint? What is always possible for custom drawing is to draw something using an image in Slint.

sundaritisthatis commented 12 months ago

https://github.com/ecomfe/echarts-liquidfill

am trying a similar one in Slint - able to create gradient with svg commands but animation of it is a struggle as property with string type doesn't hold for animation

FloVanGH commented 12 months ago

I think based way to implement that in Slint is to use animations and Path https://slint.dev/releases/1.3.0/docs/slint/src/language/builtins/elements#path.

ogoffart commented 12 months ago

I've tried to implement that. It's a bit naive but it works: Link

sundaritisthatis commented 12 months ago

been curious - you are awesome - thanks - will definitely be with Slint team for such a idea to contribution

sundaritisthatis commented 12 months ago

@ogoffart can i get any resource to learn these things both in slint and ui things