8000 Change RDP path simplification in lasso to work on screen pixels · Issue #7919 · napari/napari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content 8000
Change RDP path simplification in lasso to work on screen pixels #7919
@jni

Description

@jni

In #7903, it was reported that drawing very small polygons with the lasso tool resulted in errors. These errors would corrupt the data in the relevant Shapes layer and prevent any further data operations on that layer. This turned out to be due to the RDP path simplification algorithm, which would remove nodes that were too close together — based on a threshold in data coordinates.

#7914 is a partial fix that prevents the data corruption, but still leaves the simplification in data coordinates. This is necessary given our current architecture because the layers don't know anything about the canvas, and the drawing tools are implemented on the layers. This points to a re-architecture need: drawing tools should happen on screen/canvas coordinates, and then get "committed" to the layer using coordinate transformations.

Once this is achieved, the path simplification could occur in screen coordinates, which makes a lot more sense from a usability perspective.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0