FloodFill works.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1588 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
yangjixian
2011-04-21 02:04:35 +00:00
parent c84f1319f7
commit bc0375d331
4 changed files with 95 additions and 81 deletions

View File

@ -65,6 +65,7 @@ type
procedure CopyToClipboard; virtual;
procedure PasteFromClipboard; virtual;
procedure Delete; virtual;
procedure FloodFill (x,y:integer);
property FillColor: TColor read GetFillColor write SetFillColor;
property OutlineColor: TColor read GetOutlineColor write SetOutlineColor;
property PaperColor: TColor read GetPaperColor write SetPaperColor;
@ -363,6 +364,12 @@ begin
tmp.Free;
end;
procedure TDLBitmap.FloodFill (x, y:integer);
begin
Canvas.Brush.Color := FFillColor;
Canvas.FloodFill(x, y, Canvas.Pixels[x,y], fsSurface);
end;
procedure TDLBitmap.FillEllipse(X1, Y1, X2, Y2: integer);
begin