Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Bug: Offset while using brush tool on iPad

Open snskar opened this issue 2 months ago • 9 comments

Description

  • Large offset while using the web version on iPad.
  • Using the apple pencil to draw with the brush tool on the iPad surface, there is a large noticable offset of the ink appearing from the tip of the pencil touching the screen.
  • The brush ink also flows outside of the artboard (although I suspect this might be by desgin)

Video Demonstration

https://drive.google.com/file/d/1buYIvX035Be9K-pn0Rn7eCGvYZ4jJTX1/view?usp=sharing

Other details

  • Safari version: 26
  • iOS version: iPadOS 26.0
  • iPad model: iPad Pro 13 inch, 2024

Preliminary thoughts

  • The mismatch is CSS px vs device px and/or origin differences. look at https://github.com/GraphiteEditor/Graphite/blob/master/editor/src/messages/tool/tool_messages/brush_tool.rs

snskar avatar Oct 14 '25 21:10 snskar

tried to slove this issue #3305

Sambhram1 avatar Oct 23 '25 06:10 Sambhram1

I’d like to try working on this issue. It looks like the brush offset might be caused by a difference between the iPad’s screen coordinates and how the app reads them.

I’ll start by checking the brush_tool.rs file to understand how the pointer position is handled. Please let me know if there’s anything specific I should look at or test.

ManavMehta2312 avatar Oct 28 '25 04:10 ManavMehta2312

@ManavMehta2312 you should reference the conversation in the issue linked in the comment above yours.

Keavon avatar Oct 28 '25 12:10 Keavon

Hi @snskar, could you please test if this is still broken in https://dev.graphite.rs and report back? (Further details here). Thanks :)

Keavon avatar Nov 11 '25 23:11 Keavon

Hello @Keavon, I tried to reproduce the issue. When I use the brush tool, there is an offset, and it is being drawn towards the top-left corner. (Also mentioned here #3199). I tried doing it with my fingers and the Apple Pencil, and I am still getting this. I tried other tools, but they seem to work fine. Can you tell me where the issue might be, so I can work on it?

Attaching a video reference

https://github.com/user-attachments/assets/83cf6f8c-f211-44c6-8295-a960a40e1c23

ashishmohapatra240 avatar Nov 15 '25 14:11 ashishmohapatra240

@ashishmohapatra240 you need to check dev, not editor, as linked in my previous comment. We already know the bug is present in the old release so that doesn't tell us whether or not it has been just recently fixed.

Keavon avatar Nov 15 '25 18:11 Keavon

Checked in the dev, the issue still persists

ashishmohapatra240 avatar Nov 15 '25 19:11 ashishmohapatra240

Ok, thank you for checking! You'll have to look and trace the code, but starting with the brush tool file is a good starting point.

Keavon avatar Nov 15 '25 19:11 Keavon

Ok, thank you for checking! You'll have to look and trace the code, but starting with the brush tool file is a good starting point.

Hi @ashishmohapatra240 @Keavon ,
I’ve created a PR for this issue.
A review would be great when you have time. Thanks!

Bixquix avatar Nov 22 '25 11:11 Bixquix