Skip to content

Instantly share code, notes, and snippets.

@vertrigo
Created October 13, 2012 14:38
Show Gist options
  • Select an option

  • Save vertrigo/3884848 to your computer and use it in GitHub Desktop.

Select an option

Save vertrigo/3884848 to your computer and use it in GitHub Desktop.
graphics
program graphics;
uses graph;
var gd,gm,xc,yc:integer;
fills:array[1..3] of PointType;
begin
gd:=detect;initgraph(gd,gm,'');
if graphresult <> 0 then halt(1);
xc:=100;yc:=100;
SetFillStyle(3,GetMaxColor);
pieslice(xc,yc,270,360,75);pieslice(xc,yc,0,90,75);
fills[1].x:=xc;fills[1].y:=yc-75;
fills[2].x:=xc-75;fills[2].y:=yc;
fills[3].x:=xc;fills[3].y:=yc+75;
FillPoly(SizeOf(fills) div SizeOf(PointType), fills);
line(xc-90,yc,xc+90,yc);line(xc,yc-90,xc,yc+90);
line(xc,yc-75,xc-75,yc);line(xc-75,yc,xc,yc+75);
moveto(xc-75-16,yc+2);outtext('-1');
moveto(xc+75+2,yc+2);outtext('1');
moveto(xc+2,yc-75-8);outtext('1');
moveto(xc+2,yc+75+2);outtext('-1');
moveto(xc+90-8,yc-9);outtext('X');
moveto(xc-9,yc-90);outtext('Y');
readln;cleardevice;
closegraph
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment