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

Ending a stroke outside the canvas may cause a "shooting line" #810

Open
jigpu opened this issue Jun 8, 2017 · 3 comments
Open

Ending a stroke outside the canvas may cause a "shooting line" #810

jigpu opened this issue Jun 8, 2017 · 3 comments
Labels
cat.Canvas Issue relates to the canvas cat.Input.Pointer Issue relates to pointing capabilities platform.Linux Issue is reported on Linux type.Bug Something isn't working as intended

Comments

@jigpu
Copy link

jigpu commented Jun 8, 2017

Description of the problem

While painting with a tablet, if a stroke ends outside the canvas it seems that MyPaint may render a line that shoots from the end of the stroke towards point the pen re-enters the canvas (even though the pen is up at this point). If the pen is held down outside of the canvas while in this state and then dragged into the canvas, no shooting line is rendered until the pen is picked up; at which point the line shoots towards the current pen position.

The program acts as though the stroke is not properly terminated when the stroke ends outside of the canvas. A notification about the pen being "up" is only sent once the canvas starts receiving pen events again (i.e., when the hovering pen re-enters the canvas, or when a dragged pen stops dragging).

Basic system details

MyPaint version: 1.3.0-alpha+git.be1fe883
Operating system: Arch Linux
Desktop environment: GNOME (Wayland session)
Packages: Python 2.7.13, GTK 3.22.15, GdkPixbuf 2.36.6, Cairo 1.14.8, GLib 2.52.1

Steps to reproduce

  1. Start MyPaint
  2. Begin drawing a stroke towards the edge of the canvas
  3. When outside of the canvas, pick up the pen
  4. Move the pen outside of the canvas to a new spot
  5. Have the pen re-enter the canvas
  6. MyPaint draws a line from the end of the rendered towards the pen's new position

MyPaint_Issue_Video.zip

@achadwick achadwick added cat.Input.Pointer Issue relates to pointing capabilities type.Bug Something isn't working as intended labels Jun 10, 2017
@achadwick
Copy link
Member

Confirmed under libgtk-3-0 3.22.11, gnome-core 3.22, and xserver-xorg 7.7+19.

If you inject a 5 second "hands off" delay before step 5, does it happen? For me, it doesn't. If I let it time out (~ a second or two) outside the canvas, the glitch doesn't happen. This is because the brush engine signals that a time-based undo split is due.

Very related: #175.

This leads me to think that we should do a brushwork_commit() on leave-notify and enter-notify events from each known tdw. The interesting part will be queuing such an instruction in gui/freehand.py.

I think proximity in/out events and maybe button1 presses should do the same.

@jigpu
Copy link
Author

jigpu commented Jun 13, 2017

I can confirm that leaving the pen outside of the canvas for at least 5 seconds (before step 5) does prevent the creation of a shooting line.

@zb13y
Copy link

zb13y commented Nov 3, 2017

This can be related to problems with windows version. There are problems with mypaint window, sometimes locating under other windows. #586 #677

@AesaraB AesaraB added info.Triage Need to triage this platform.Linux Issue is reported on Linux cat.Canvas Issue relates to the canvas and removed info.Triage Need to triage this labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat.Canvas Issue relates to the canvas cat.Input.Pointer Issue relates to pointing capabilities platform.Linux Issue is reported on Linux type.Bug Something isn't working as intended
Development

No branches or pull requests

4 participants