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

Review the eraser tool #65

Open
lucasrla opened this issue Mar 8, 2023 · 4 comments
Open

Review the eraser tool #65

lucasrla opened this issue Mar 8, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@lucasrla
Copy link
Owner

lucasrla commented Mar 8, 2023

I've never really tested the eraser tool thoroughly. So I won't be surprised at all that remarks has issues with it...

Ref #63 (comment) and #63 (comment).

@lucasrla lucasrla added the bug Something isn't working label Mar 8, 2023
@Azeirah
Copy link
Contributor

Azeirah commented Apr 2, 2023

I made a notebook (on ReMarkable version beta 3.3) that looks at the eraser: eraser testing.zip

In it, there are three squares and three lines of text.

  1. The first of either should be visible, no eraser applied whatsoever

  2. The second is erased with the back of the ReMarkable physical pen

  3. The third is erased with the eraser tool

afbeelding

In neither cases does (2) the eraser at the back of the pen fail, but what's really strange here is that (3) only the text has visible eraser marks when the tool is used.

@Azeirah
Copy link
Contributor

Azeirah commented Apr 2, 2023

Here's a more carefully constructed file. Oddly enough it has fewer obvious issues. I took a photo with my phone before and after erasing, to ensure I didn't forget copying a drawing before erasing it.

What you can see in the remarks output is that everything is erased as expected. However, in the first vertical table bar, there are two holes in the 3rd and 4th column (next to "hello" and the scribbles underneath it). Weird!

Before:

Before erasing

After:

After erasing

Remarks' output:

Remarks' output

The notebook:

testing erasers.zip

@Azeirah
Copy link
Contributor

Azeirah commented Apr 2, 2023

I made a notebook (on ReMarkable version beta 3.3) that looks at the eraser: eraser testing.zip

In it, there are three squares and three lines of text.

1. The first of either should be visible, no eraser applied whatsoever

2. The second is erased with the back of the ReMarkable physical pen

3. The third is erased with the eraser tool

afbeelding

In neither cases does (2) the eraser at the back of the pen fail, but what's really strange here is that (3) only the text has visible eraser marks when the tool is used.

I found that the color codes of the erasers are incorrect. Two of them have color-code 0, which is black. The other one has color-code 2, which is white (correct)

afbeelding

I'm not sure why. I suspect we can safely override the eraser's color with WHITE in all cases. I have a slight suspicion that ReMarkable has a global selected_tool instance, and sets properties on that instance given what you do in the UI.

So if you have an eraser, then select a tool and put the color to black and go back to the eraser, the eraser could have a color-code of black, even though this value is meaningless for the eraser. This is just a suspicion though.

@Azeirah
Copy link
Contributor

Azeirah commented Apr 2, 2023

Remarks' output:

Remarks' output

The notebook:

testing erasers.zip

This issue occurs because the calculation for the eraser width produces very large values for certain w.

    elif tool == "Eraser":
        w = 1280 * w * w - 4800 * w + 4510
        # cc = 2

I'm not sure where these values come from, but with the input value of w=2.4, the computed eraser width is over 360. This is obviously far too large. I'm not sure what a good value would be, but this calculation is clearly off.

>>> 1280 * w * w - 4800 * w + 4510
362.7999999999993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants