fabricjs / fabric.js

Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
http://fabricjs.com
Other
29.23k stars 3.52k forks source link

[Bug]: Fill to large image, unable to draw fill when the canvas is scaled #10271

Open zhe-he opened 2 weeks ago

zhe-he commented 2 weeks ago

CheckList

Version

6.0.2

In What environments are you experiencing the problem?

No response

Node Version (if applicable)

None

Link To Reproduction

https://codesandbox.io/p/devbox/68gx9w?file=%2Fsrc%2Ftest.tsx%3A24%2C48

Steps To Reproduce

  1. Find a 5M image A.
  2. Create a rectangle and set the fill of the rectangle to A.
  3. Add a mouse wheel zoom event to the canvas.
  4. Zoom the canvas to view the fill of the rectangle.

Expected Behavior

Can display the fill of the rectangle normally

Actual Behavior

https://github.com/user-attachments/assets/51c71d23-3d88-48fd-bdff-14f7ab2be917

Error Message & Stack Trace

asturur commented 2 weeks ago

can you swap B.png with a picture so that i can udnerstand what is going on visually? is a bit complicated. i see gray. but i see no gray in that picture at all.

zhe-he commented 2 weeks ago

@asturur Updated image.

https://github.com/user-attachments/assets/ac52c498-2507-4fbf-9b26-af61de53f2ce

asturur commented 2 weeks ago

ok i smell there is some interference between viewport and pattern transform