Giter Club home page Giter Club logo

Comments (1)

caleb531 avatar caleb531 commented on June 17, 2024

Use the opacity property. Here's a
demohttp://calebevans.me/projects/jcanvas/sandbox.php?#var%20linear%20%3D%20%24%28%22canvas%22%29.gradient%28%7B%0A%20%20x1%3A%200%2C%20y1%3A%200%2C%0A%20%20x2%3A%2020%2C%20y2%3A%2080%2C%0A%20%20c1%3A%20%22%23729fcf%22%2C%20s1%3A%200.33%2C%0A%20%20c2%3A%20%22%233465a4%22%2C%20s2%3A%201%0A%7D%29%3B%0A%24%28%22canvas%22%29.drawArc%28%7B%0A%20%20fillStyle%3A%20linear%2C%0A%20%20x%3A%2050%2C%20y%3A%2050%2C%0A%20%20radius%3A%2030%2C%0A%20%20opacity%3A%200.5%0A%7D%29%3Bto
show how to use it for gradients.

I believe you can also use RGBA colors when creating a gradient.

-Caleb

On Mon, Jan 9, 2012 at 3:03 PM, Paul Gladstone <
[email protected]

wrote:

I'm trying to create a rectangle that has a gradient and is also opaque.
is there something I can add to my .gradient() method to achieve this?


Reply to this email directly or view it on GitHub:
#4

from jcanvas.

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.