Hola.
FloodFill es una función que ya existía en Turbo Pascal y sirve para pintar un área con la brocha actual.
Cita:
|
procedure FloodFill(X, Y: Integer; Color: TColor; FillStyle: TFillStyle);
|
Pintar un rectángulo amarillo con borde negro con
FloodFill:
Código Delphi
[-]
with Canvas do
begin
Brush.Color:= clYellow;
Rectangle(100,100,180,180);
FloodFill(110, 110, clBlack, fsSurface);
end;
Otra forma de hacer lo mismo:
Código Delphi
[-]
var
R: TRect;
begin
with Canvas do
begin
Brush.Color:= clBlack;
Rectangle(10,10,80,80);
R.Left:= 11;
R.Top:= 11;
R.Right:= 79;
R.Bottom:= 79;
Brush.Color:= clYellow;
FillRect(R);
end;
O de igual modo:
Código Delphi
[-]
with Canvas do
begin
Brush.Color := clYellow;
Brush.Style := bsSolid;
Pen.Color:= clBlack;
Rectangle(200, 200, 280, 280);
end;
Saludos.