Hello,
I tried to fill a Rectangle with the Floodfill-Method, but it fails.
Some Code:
Code
Procedure TForm1.Button1Click(Sender: TObject);
Var
iRes: Integer;
Begin
iRes := Screen.PixelsPerInch;
PDF.BeginDoc;
PDF.StartPage(Round(21 / 2.54 * iRes), Round(29.7 / 2.54 * iRes), iRes, iRes, 0);
//Creating the Rectangle
PDF.Canvas.Rectangle(10, 10, 500, 500);
//Fill it red
PDF.Canvas.Brush.Color := clRed;
PDF.Canvas.FloodFill(12, 12, PDF.Canvas.Pixels[20, 20], fsSurface);
PDF.EndPage;
PDF.EndDoc;
End;
Alles anzeigen
Hope anybody could help - thx in advance!
(I need the Floodfill method because I have to fill several Regions within this Rectangle later with different colors)
(We work with wPDF Version 2)