GithubHelp home page GithubHelp logo

Borders about bubbly-bg HOT 2 CLOSED

capsticm avatar capsticm commented on June 6, 2024
Borders

from bubbly-bg.

Comments (2)

tipsy avatar tipsy commented on June 6, 2024

Thanks @capsticm.
Borders are annoying in canvas. You need to set lineWidth and strokeStyle, then call stroke(). This will draw a stroke on the current outline of your shape, so if you have lineWidth = 4, you will get 2px inside the shape, and 2px outside. Most people would probably want the stroke to be 4px outside the shape, or be allowed to choose. In addition, drawing the stroke interferes with the default composite-style used in bubbly (lighter), so you would have to change this to make it work "as expected". All of these things would add a lot of complexity (and lines of code), so I thought it wasn't worth it.

tl;dr: No, you can't. I considered adding borders, but it made everything a lot more complicated.

from bubbly-bg.

capsticm avatar capsticm commented on June 6, 2024

from bubbly-bg.

Related Issues (18)

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.