0

I'm working in a simple game, and having problems on collision detecting. I've found on this question a method called isFilled

    private static boolean isFilled(int pixel) {
      return pixel != Color.TRANSPARENT;
    }

The argument int pixel comes from bitmap.getPixel(x,y) Is there an equivalent method to bitmap.getPixel(x,y) for a View?

Community
  • 1
  • 1
Rafael
  • 3,042
  • 3
  • 20
  • 36

1 Answers1

1

You can use View.draw(Canvas c) and draw the View into a Canvas created from a Bitmap using Canvas(Bitmap b).

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134