GithubHelp home page GithubHelp logo

Comments (4)

asturur avatar asturur commented on June 2, 2024

No it doesn't it would need to be implemented after understanding how that works in various occasions, but if it is implemented backport to 5.x is not something i can do, it will be on whoever wants to do it.

from fabric.js.

niketaOptimumnbrew avatar niketaOptimumnbrew commented on June 2, 2024

No it doesn't it would need to be implemented after understanding how that works in various occasions, but if it is implemented backport to 5.x is not something i can do, it will be on whoever wants to do it.

@asturur Thank you for asnwer me in short time.
I want to ask that if i want to apply gradiant to text with underline/overline/linrthrough then how can i achieve that?

from fabric.js.

asturur avatar asturur commented on June 2, 2024

you need to open a PR to 5.x
check the function '_renderTextDecoration', later down it does:

ctx.fillStyle = lastFill;

(it does it twice)
that code has to be changed to support fabric.Gradient, something like:

ctx.fillStyle = lastFill.toLive ? lastFill.toLive(ctx) : lastFill

But i m not sure of the implications. does gradient work on text styles for example? i don't think so, i don't remember is long i didn't try.

I won't be able to assist you in details with this, if you come back with more questions be sure to come back with a working example of something that you tried and is misbehaving rather than nothing.

from fabric.js.

niketaOptimumnbrew avatar niketaOptimumnbrew commented on June 2, 2024

ctx.fillStyle = lastFill.toLive ? lastFill.toLive(ctx) : lastFill

@asturur Above solution working as per my expectation , But can you please tell me that why did you remove this feature in latest version?
Is their any drawback to use this?

from fabric.js.

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.