Language:
Русский
English
{Sector.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the Sector procedure.}
uses Graph;
const R = 50;
var
Driver, Mode: Integer;
Xasp, Yasp: Word;
begin
Driver := Detect;{ Put in graphics mode }
InitGraph(Driver, Mode, '');
if GraphResult < 0 then
Halt(1);
Sector(GetMaxX div 2, GetMaxY div 2, 0, 45, R, R);
GetAspectRatio(Xasp, Yasp);{ Draw circular sector }
Sector(GetMaxX div 2, GetMaxY div 2,{ Center point }
180, 135,{ Mirror angle above }
R, R * Longint(Xasp) div Yasp);{ Circular }
Readln;
CloseGraph;
end.