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

Stroke Recognizer makes straight lines different than expected #5637

Open
c-ola opened this issue Apr 24, 2024 · 4 comments
Open

Stroke Recognizer makes straight lines different than expected #5637

c-ola opened this issue Apr 24, 2024 · 4 comments
Labels
bug confirmed Bug has been reproduced by at least one other person good first issue papercut User can get around easily... but can be annoying. priority::low

Comments

@c-ola
Copy link
Contributor

c-ola commented Apr 24, 2024

Operating System

Linux

(Linux only) Distribution

Fedora

(Linux only) Desktop Environment

i3

(Linux Only) Display Server

X.Org

Installation Method

dnf package manager

Xournal++ Version

1.2.3

libgtk Version

3.24.41

Bug Description

When using the stroke recognizer to draw straight diagonal lines, the line will sometimes get shortened if you go back towards the direction of the starting point (or even in the opposite direction if you go over the starting point).

Expected Behaviour

I would expect the line to be straight along where it is drawn (go from min to max).

Steps to Reproduce

  1. Start drawing line diagonally.
  2. Go back in direction of start point
  3. Then release the drawing tool that you are using (occurs with both pen and highlighter

Additional Context

It also does not happen when the line is parallel to either the x or y axes.

Drawing a line in the following way (before releasing the drawing tool):
image
Leads to this image:
image

This is an example of it not happening parallel to the x axis.
image
image

@c-ola c-ola added the bug label Apr 24, 2024
@Febbe
Copy link
Collaborator

Febbe commented Apr 24, 2024

@kenballus you implemented the preserve the endpoint preservation in #3285, can you tell me, if you introduced the bug there?

@Febbe Febbe added good first issue priority::low confirmed Bug has been reproduced by at least one other person papercut User can get around easily... but can be annoying. labels Apr 24, 2024
@kenballus
Copy link
Contributor

Yes; I introduced this behavior. This is how I prefer the stroke recognizer to behave, but that is ultimately just an opinion. Keep in mind that my usual use case for the stroke recognizer is drawing straight lines between preexisting points on a page, so it is in my interested to precisely control the start and end points of a recognized line segment.

@c-ola
Copy link
Contributor Author

c-ola commented Apr 25, 2024

In that sense the behaviour makes sense, however, shouldn't it then behave the same way along the x and y axes as well?

@kenballus
Copy link
Contributor

Oh, sorry. I misunderstood the issue here.

I am not sure whether I introduced this behavior. If I did, it was definitely unintentional, and should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed Bug has been reproduced by at least one other person good first issue papercut User can get around easily... but can be annoying. priority::low
Projects
None yet
Development

No branches or pull requests

3 participants