Im making a program using Java for android.
I’m drawing alot of rectangles on a bitmap using 4 lines connecting. ATM the lines are black and the background is white, i want to fill these “boxes” with colour and i cant figure out how to do it.
to change from drawing 4 lines into making a box from the start is not an option, i have to draw lines that form a box.
im thinking of something that takes an argument of x,y in the middle of the “box” and then filling it with pixles until it hits the edge of the box but i cant get it to work.
it needs to be reapeteble too, i have alot of boxes to fill.
im using android 2.1 with API 7
You can quite simply do this with a
Path. It works as you’re talking about — move from point to point “drawing lines” — but when you’re done you can fill it.