GithubHelp home page GithubHelp logo

Use Path rather than Rect about haze HOT 7 CLOSED

chrisbanes avatar chrisbanes commented on August 21, 2024
Use Path rather than Rect

from haze.

Comments (7)

chrisbanes avatar chrisbanes commented on August 21, 2024

This is unlikely to be achievable, as paths aren't feasible to be passed over to a Skia shader. If anyone has any ideas on how to achieve this, let me know.

We probably probably could achieve on Android this (via clipPath).

from haze.

Kyant0 avatar Kyant0 commented on August 21, 2024

Is it achievable to use Rect + Shape?

from haze.

Kyant0 avatar Kyant0 commented on August 21, 2024

Since I have customed shapes which can't be approximated by RoundRect

from haze.

chrisbanes avatar chrisbanes commented on August 21, 2024

We'd have to manually write support into the shader to support various shapes, and then include a function to determine whether a pixel is in that shape (usually copied from here). It's not impossible, but very cumbersome.

What shape are you trying to support here?

from haze.

Kyant0 avatar Kyant0 commented on August 21, 2024

the "cut corner" shape

from haze.

Kyant0 avatar Kyant0 commented on August 21, 2024

I only use Compose for Android, but this library is multiplatform. I think it is hard to achieve this, or are you able to provide some Android specific API?

from haze.

chrisbanes avatar chrisbanes commented on August 21, 2024

Released in 0.4.0

from haze.

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.