Giter Club home page Giter Club logo

Comments (5)

Keeper-CP1 avatar Keeper-CP1 commented on May 23, 2024

I figured out the problem is only on Android because the bucket tool acts like usual on computers.

from jspaint.

1j01 avatar 1j01 commented on May 23, 2024

I haven't updated JS Paint any time recently, so it wouldn't be from a regression in my code.

The browser's Canvas API doesn't have any guaranteed precision, and some browsers or browser extensions randomize pixels as a security measure (called "farbling"). It's likely there's not much I can do here. I already have a threshold for the fill tool to avoid artifacts from these "farbling" security measures. It's possible increasing the threshold could fix this, although I wouldn't want it too high.

Did you draw something before drawing the shape you tried to fill? The pattern of the dots looks like it might be following the curve of some brush strokes (unlike canvas farbling which introduces more random noise).

from jspaint.

Keeper-CP1 avatar Keeper-CP1 commented on May 23, 2024

Well, i guess i've drawn stuff but i "selected all and deleted the stuff". All shapes i tried to draw (and fill) gave me those "farbled" white dots. Apparently i got weird grey colors on top of the brush. I used the paint drop on it: when i use a brush with that color, the brush is rainbow until i released the finger.
For the "completely filled" shape, i used a brush/polygon tool on that shape to hide the dots

from jspaint.

1j01 avatar 1j01 commented on May 23, 2024

If the brush is showing as rainbow, that means it detected the current color as translucent, and (according to this line)
the alpha component was less than 253. Assuming you didn't select a translucent color, that should be 255.
As noted in a comment in the code there, I've ran into a similar thing in Firefox and so added a slight threshold.

I could increase all the hacky thresholds in the app, but I don't really want to do that.

Maybe one day I'll rewrite the app so the canvas element is only used for output, and not for storing the state of the image, so it never needs to get pixels from the canvas context, and that will eliminate these issues.
For now I think you'll have to find another app or another browser, sorry.

from jspaint.

Keeper-CP1 avatar Keeper-CP1 commented on May 23, 2024

Okay, thanks!
I'm gonna use jspaint on my PC until the bug gets fixed
See you!

from jspaint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.