Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change of inkstroke modeler #1102

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Doublonmousse
Copy link
Contributor

On the rnote side :

  • cargo.toml change (for now using a custom branch/fork of the inkstroke modeler)
  • API change (usize for n_steps, no PredictionParams and no tilt or orientation)

On the inkstroke modeler side

  • rewrite to rust of the logic
    This rewrite is mostly to have something that's easier to build/compile from rust on all platforms.

- cargo.toml change
- API change (usize for n_steps, no PredictionParams and no tilt or orientation)
To match the changes in the stroke modeler
let pos = r.pos();
let pressure = r.pressure();
let pos = r.pos;
let pressure = r.pressure;
Element::new(na::vector![pos.0 as f64, pos.1 as f64], pressure as f64)
})),
Err(e) => tracing::error!("Updating stroke modeler with element failed, Err: {e:?}"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like changing the error types in the modeler could make this part completely redundant.
Just call the update on the model, match on the results and different errors messages (maybe an enum type for errors), this way we don't test twice that the events are not a duplicate, that the time delta is positive and that the number of steps is not too large.

@Doublonmousse
Copy link
Contributor Author

Doublonmousse commented May 31, 2024

Uh now I have issues when I pause the stroke and continue moving later.

Edit : fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant