Android Question Anti-aliased clippath or 8bit selection mask

Discussion in 'Android Questions' started by NeoTechni, Mar 28, 2015.

  1. NeoTechni

    NeoTechni Well-Known Member Licensed User

    Instead of a binary clippath (pixel is or isn't selected) is there a way to have 8bit/anti-aliased clip path?

    Or even a mask? (you have an image that acts as the clip path based on the shade of grey the pixel is)
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is possible to create a mask. However why not use two layers? It will be simpler.
     
  3. NeoTechni

    NeoTechni Well-Known Member Licensed User

    Layers? I don't follow.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    What exactly are you trying to implement? I thought that you were asking about a selection box.
     
  5. NeoTechni

    NeoTechni Well-Known Member Licensed User

    I want to draw a bitmap using a second bitmap as a mask. The mask would control the alpha of each pixel, based on what shade of grey the corresponding pixel in the mask is. white = 0, black=255
    I've read it has something to do with Paint.setXfermode
     
    Troberg likes this.
  6. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice