Skip to content

Instantly share code, notes, and snippets.

@vertrigo
Created December 1, 2012 18:55
Show Gist options
  • Save vertrigo/4184055 to your computer and use it in GitHub Desktop.
Save vertrigo/4184055 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <conio.h>
#include <graphics.h>
void axes(int xc, int yc)
{
line(xc-100,yc,xc+100,yc);
line(xc+100,yc,xc+95,yc-2);
line(xc+100,yc,xc+95,yc+2);
line(xc,yc-100,xc,yc+100);
line(xc,yc-100,xc-2,yc-95);
line(xc,yc-100,xc+2,yc-95);
}
void main()
{
int xc,yc,*gd,*gm;
*gd=0;
initgraph(gd,gm,"");
if (graphresult() !=0 ) {printf("Error!'");}
xc=200;yc=200;axes(xc,yc);
setfillstyle(3,getmaxcolor());
pieslice(xc,yc,0,90,50);
pieslice(xc,yc,270,360,50);
line(xc,yc-50,xc-50,yc);floodfill(xc-2,yc-2,getmaxcolor());
line(xc-50,yc,xc,yc+50);floodfill(xc-2,yc+2,getmaxcolor());
getch();
closegraph();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment