procedure Kreis4Farben(cav: TCanvas; iLeft, iTop, DMesser: integer);
var
PTemp: TPoint;
Halb: integer;
begin
Halb := DMesser
div 2;
with cav
do
begin
//GetViewportOrgEx(Handle, PTemp);
//SetViewportOrgEx(Handle, iLeft, iTop, nil);
cav.Ellipse(0, 0, DMesser, DMesser);
Brush.Color := clSilver;
FloodFill(Halb, Halb, Pen.Color, fsBorder);
Pen.Color:= clRed;
Arc(0, 0, DMesser, DMesser, DMesser, Halb, Halb, 0);
Pen.Color:= clYellow;
Arc(0, 0, DMesser, DMesser, Halb, 0, 0, Halb);
Pen.Color := clGreen;
Arc(0, 0, DMesser, DMesser, 0, Halb, Halb, DMesser);
Pen.Color := clAqua;
Arc(0, 0, DMesser, DMesser, Halb, DMesser, DMesser, Halb);
//SetViewportOrgEx(Handle, PTemp.X, PTemp.Y, nil);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Kreis4Farben(image1.Canvas,0, 0, 120);
end;