procedure TForm1.Button1Click(Sender: TObject);
begin
Randomize;
Canvas.Polygon([
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight))]);
end;procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Canvas.Brush.Color := RGB(Random(256), Random(256), Random(256));
Canvas.FloodFill(X, Y, clBlack, fsBorder);
//也可以用 ExtFloodFill(Canvas.Handle, X, Y, clBlack, FLOODFILLBORDER);
end;
begin
Randomize;
Canvas.Polygon([
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight)),
Point(Random(ClientWidth), Random(ClientHeight))]);
end;procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Canvas.Brush.Color := RGB(Random(256), Random(256), Random(256));
Canvas.FloodFill(X, Y, clBlack, fsBorder);
//也可以用 ExtFloodFill(Canvas.Handle, X, Y, clBlack, FLOODFILLBORDER);
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货