Skip to content

Path doesn't fit all space available #8853

@lion-artiste

Description

@lion-artiste

Bug Description

Hello everybody ! I'm currently developing a full-featured professional DAW using Rust and Slint, and I'm facing a behavior that seems unexpected while working with Paths. The Audio Events in my DAW need to show the waveform of the underlying audio file, and since Slint doesn't support for-loops in Path at the moment, I use a Rust-generated command string for performance.

I expected the "drawing" of the Path to scale to fit the whole Path, however it doesn't seem to be the case : when I zoom vertically or horizontally on my Path element, at some point the drawing stops to fit the container. I added some pictures and a video to show the behavior (the Path element has a black background).

My aim is to make the waveform fill completely its container, whatever the level of horizontal and vertical zoom ; I tried to play with path properties (viewbox-width, viewbox-height, etc.), but nothing seems to help. Since each audio file can have more than 100000 samples to draw, I haven't found a better solution than using Path with command strings.

Thank you for your help, I'm kind of desperate at the moment !

Image Image Image

Reproducible Code (if applicable)

Environment Details

  • Slint Version: 1.12.1
  • Platform/OS: MacOS
  • Programming Language: Rust
  • Backend/Renderer: Winit-skia

Product Impact

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:pathThe Path element implementation, compiler support and runtime (mS,bO)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions