l********r 发帖数: 140 | 1 It could be an old question:
Given a shape (any shape) of color X, click one point (x, y) in it, fill the
whole shape with color Y. How to do that? (this function is actually called
"fill with color" in MS Paint)
The only way I can think of is to fill (x, y) first and recursively do it
for the 4 points around it (with some boundary check based on color X). But
this sounds like pretty slow. Any better way? | p*****2 发帖数: 21240 | |
|