Home > Back-end >  About C Builder pattern full filling
About C Builder pattern full filling

Time:10-23


I want to fill in the grid with blue, approach is as follows:
Image1 - & gt; Canvas - & gt; Brush - & gt; Color=clBlue;
Form2 - & gt; Image1 - & gt; Canvas - & gt; FloodFill (I * Scale + 1, j * Scale + 1, clGreen, fsBorder);

I checked some all around are clGreen color, some three sides are clGreen color, the other side is clRed,
The question is: are all around clGreen color can fill clBlue in color, but not a clGreen + clRed squares,
How to do??

CodePudding user response:

Could you describe clearly, square has four face?? Or four side,,,

CodePudding user response:

Is four side ~ ~ ~ ~

CodePudding user response:

Your pictures are posted each grid code, see these two lines of code will be a problem

CodePudding user response:

The side with the same color painting first, then fill inside each area, and then draw the edge with the actual color again

CodePudding user response:

I understand the FloodFill is to use brush color to fill, until FloodFill specified color,
Can have another function of the filling of the two kinds of color judgment to control (such as the text of the clGreen + clRed)

CodePudding user response:

What do you mean this
FsSurface fill all Color area designated by the Color parameters, when to stop when another Color

CodePudding user response:

Or stick to find our own way, using FillRect can solve!
  • Related