I was learning about bitmaps and canvas and was curious about one thing . Does a pixel only store color information related to an image or also the strokes involved within a drawing .For example , if I just draw a circle on a canvas . Now , will the pixels in the bitmap related to the canvas also store what was drawn on the canvas or simply store the color of the circle?
Asked
Active
Viewed 16 times
1 Answers
1
Any shape in a bitmap is a combination of pixels and every pixel has a specific position(x,y) in a plane. A pixel only has a color code information. To get a color code of a specific pixel:
int color = bitmap.getPixel(x,y)

Umer Farooq
- 583
- 3
- 17