Skip to content

Dash iterator zero-length LineTo noise #577

Description

@RobertBrewitz

If/When #550 is merged this would be a follow-up issue.

When a dash transition lands exaxtly on a path vertex, the iterator emits a zero-length LineTo at the corner instead of cleanly transitioning to the next dash.

Example:

let mut path = BezPath::new();
path.move_to((0., 0.));
path.move_to((3., 0.));
path.move_to((3., 3.));
let dashes = [3., 1.];
let result: Vec<PathEl> = dash_iter(path.into_iter(), 0., &dashes, true).collect();

// Current noisy output: MoveTo(0,0), **LineTo(3,0), LineTo(3,0)**, MoveTo(3,1), LineTo(3,3)
// Expected output: MoveTo(0,0), LineTo(3,0), MoveTo(3,1), LineTo(3,3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions