Coder Social home page Coder Social logo

Comments (7)

IanChilds avatar IanChilds commented on April 28, 2024

Do you see the rounded corners correctly? Is it just the border that is the problem?

from fresco.

plamenko avatar plamenko commented on April 28, 2024

Also, if you add .setOverlayColor(0xFFFFFF00) while building RoundingParams, what happens? This will help us diagnose where the issue might be.

from fresco.

azfarsiddiqui avatar azfarsiddiqui commented on April 28, 2024

@IanChilds, I was able to round the image with the code I provided. I am currently only able to circle an image by using:

RoundingParams.asCircle()

@plamenko, If I use setOverlayColor() in conjunction with RoundingParams.asCircle(), the rectangular area holding the circle is painted using that overlay color. However, that color is not drawn over the actual image itself.

if I use setOverlayColor in conjunction with RoundingParams.fromCornersRadius(), there is no effect at all, as the image is itself rectangular therefore no area is left to be filled by the color.

from fresco.

azfarsiddiqui avatar azfarsiddiqui commented on April 28, 2024

Alright, I think i've narrowed down the problem. The setBorder() method seems to ignore android color references. For example If I run the following, I don't get expected result:

    RoundingParams roundingParams = RoundingParams.fromCornersRadius(25.0f).setBorder(android.R.color.holo_blue_bright, 5.0f);

However, when I remove the color reference and provide the color value directly, it works as expected:

    RoundingParams roundingParams = RoundingParams.fromCornersRadius(25.0f).setBorder(0xff00ddff, 5.0f);

from fresco.

plamenko avatar plamenko commented on April 28, 2024

Yes, this should be ARGB color, not a resource reference. Both of those use int type, and it makes more sense to interpret it as a color than as a resource id.

from fresco.

plamenko avatar plamenko commented on April 28, 2024

You can always get the color value from the resource id with getResources().getColor(R.color.holo_blue_bright)
I'm glad that you resolved the issue.

from fresco.

azfarsiddiqui avatar azfarsiddiqui commented on April 28, 2024

Thanks a lot @plamenko..

from fresco.

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.