mirror of
https://github.com/NickeManarin/ScreenToGif.git
synced 2026-04-25 15:15:51 +03:00
[GH-ISSUE #453] Board with touchscreen not drawing as intended #375
Labels
No labels
copy cats
duplicated
future feature
pull-request
⬜ Accepted
⬜ Completed
⬜ Help Wanted 💪
⬜ In Progress
⬜ Missing Details
⬜ Pending
⬜ Waiting For Answer ⏳
🆕 feature preview
🔷 Bug 🐛
🔷 Out Of Scope
🔷 Out Of Scope
🔷 Question
🔷Enhancement
🔷Enhancement
🔷Invalid / External
🔷Knowledge Base
🔷Won't Fix
🕑 High
🕑 High
🕑 High
🕕 Medium
🕙 Low
🕛 Critical
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ScreenToGif#375
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TimDoesCode on GitHub (Feb 20, 2019).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/453
Originally assigned to: @NickeManarin on GitHub.
Hello,
I was just trying out the board function of your software and noticed something weird. When I draw something on the board using the mouse, i can actually see the drawing of the single strokes in the resulting gif.
If I use my touch monitor to actually draw on it, the resulting gif will have the completed strokes pop in as one. Also the last few strokes seem to be missing for some reason.
I've attached two gifs to this issue. Hi_Mouse.gif is me drawing via the mouse. H_Touch.gif is me drawing via the touch monitor.
I was using:
ScreenToGif v2.17
Windows 10 Pro x64
HP E230t touch monitor
Attachments:


@theJosher commented on GitHub (Oct 5, 2019):
@NickeManarin I can look into this one if it hasn't been fixed yet.
@NickeManarin commented on GitHub (Oct 5, 2019):
@theJosher Yes, please. Thank you.
@theJosher commented on GitHub (Oct 17, 2019):
@NickeManarin Curious what your thoughts are: Based on a lot of reflection, it looks like mouse rendering is happening in the UI thread, but any inking (via stylus or touch) is happening in a separate inking thread within a couple of real time ContainerVisuals, and strokes are transitioned to the UI thread at stylus up. Getting the inking over to the UI thread periodically mid-stroke proves difficult because of course the visuals can't be frozen, but I believe I can bring over a combined DrawingGroup with copies of each DrawingGroup as frozen and combine that with the DrawingGroup of the container in the main UI (or with the srokes from the InkPresenter). This approach involves reflection to get to private members, and I'm curious if you prefer it over, say, just doing a screen grab. The real shame is that I suspect the HostVisual is automagically handling composition between the two threads for the screen, but this all seems to be happening behind closed doors, my Googling is failing me here, and there remains the possibility I'm out of my depth 😓. I'm curious which approach you would prefer, and if you have any other thoughts.
@TimDoesCode commented on GitHub (Oct 17, 2019):
Hey, thanks for working on this.
Hit me up if you need someone to test this on a touch monitor.
@theJosher commented on GitHub (Oct 21, 2019):
@NickeManarin Let me know if you'd like any revisions on my pull request. Otherwise, I think I've submitted the last of it. My 3-year-old and 6-year-old both volunteered to draw on my X230 tablet yesterday and after 2 hours of observing them use my forked code, I saw only one issue, where the overlay persisted after a discard. This last commit to the PR branch should solve that.
@theJosher commented on GitHub (Oct 21, 2019):
@TimDoesCode I think if/when @NickeManarin merges the PR would be a good time to do some testing. If you have a burning desire to try it out, you can find the fix in my fork from whence the PR emerged 😃
@theJosher commented on GitHub (Oct 21, 2019):
@NickeManarin Incidentally, while fixing, I noticed the following ToDo:
I have been pretty enamored with inking with MS windows on tablets (since years before the competing "iPad" was a thing 🤣 ), so if you have an issue open for this you want to assign to me, I would gladly discuss implementation with you and work it.
@NickeManarin commented on GitHub (Oct 21, 2019):
I'm sorry that I could not reply in time. I would say to follow the easier path, or the one that hit less the performance. :)
Nice PR, thank you for your help.
I'm testing on a borrowed Dell 5548 notebook and I detected some small flickering, I'm not sure if it's just my device or if it's common. See:
The flickering is variable, not sure if because I was testing with a screen DPI of 125%. While I was using the mouse, I could not see any flickering at all.
I could not find any performance hit, so that's nice. :)
Btw, @TimDoesCode I attached the test version if you wish to help us.
ScreenToGif.zip
@NickeManarin commented on GitHub (Oct 21, 2019):
Oh, about that...
I'm planning to change how the editor works, to enable support for layers.
The background of the board recorder will be the canvas and the strokes will be the layers.
The user will be able to interact with each layer independently, even edit/erase strokes.
I already started working on the new editor (here is the model).
Here's my current plan:
It's going to take a while to finish, since I'm working on this app during weekends. Any help would be appreciated.
@theJosher commented on GitHub (Oct 21, 2019):
I think I may see what you're talking about. Is it that it is bouncing left/right or up/down by about a pixel in the capture of the real-time inking? If so, this probably has something to do with the way I'm setting margins on the overlay. Maybe rounding error. I'll take a look this evening when I'm back from work and see if I can track it down and get another commit in.
@TimDoesCode commented on GitHub (Oct 21, 2019):
@NickeManarin I tested your version and can confirm that the initial issue is resolved.
Mouse action:

Touch action:

I have also tried drawing with the mouse to see if I can get your flickering but so far no dice.
@TimDoesCode commented on GitHub (Oct 21, 2019):
Actually, now that I see the touch gif you can actually see some flickering with the L chars?
@theJosher commented on GitHub (Oct 26, 2019):
@NickeManarin The latest commit should fix the distortion. I am not sure, but it seems that although I was passing double precision margins to the Image control, the control is truncating them in placement, resulting in some scaling of the overlay, which is why its position would appear to drift. I couldn't find any properties on the DrawingGroup or Image control preventing cropping the drawinggroup such that TopLeft winds up at (0,0), so I instead placed a tiny transparent point at (0,0) in the drawingGroup and as such was able to remove the margins adjustment. I don't necessarily like this in principle, but in all practicality it works and is theoretically just as efficient. Let me know what you think.
@theJosher commented on GitHub (Oct 31, 2019):
@NickeManarin You probably want to hold of testing this a little longer. I just found a problem with the new approach when going off the canvas, which had been solved by negative margins in the previous approach, but which slipped my mind when changing the solution. Sorry... 😭
@NickeManarin commented on GitHub (Oct 31, 2019):
It's alright, I could not test it yet. :/