home *** CD-ROM | disk | FTP | other *** search
/ FreeWare Collection 2 / FreeSoftwareCollection2pd199x-jp.img / ms_dos / fmgraph / g_carc.c < prev    next >
Text File  |  1990-06-14  |  802b  |  41 lines

  1. #include    <stdio.h>
  2. #include    <dos.h>
  3.  
  4. struct CIRCLEARC {
  5.     unsigned    type;
  6.     int            cx,cy,stx,sty,edx,edy,r;
  7. };
  8.  
  9. extern    unsigned    char    gds_fshift;
  10. extern    unsigned    gds_wrkoff;
  11. extern    unsigned    gds_wrkseg;
  12.  
  13. int    g_circle_arc(int centerx,int centery,int startx,int starty,
  14.         int endx,int endy,int r)
  15. {
  16.     union REGS    reg;
  17.     struct SREGS    seg;
  18.     struct {
  19.         unsigned    len;
  20.         struct CIRCLEARC    arc;
  21.     }    gdata;
  22.  
  23.     segread(&seg);
  24.     reg.h.ah=gds_fshift+0x0f;
  25.     reg.x.di=(unsigned)&gdata;
  26.     seg.ds=seg.ss;
  27.     gdata.len=16;
  28.     gdata.arc.type=0x41ee;
  29.     gdata.arc.cx=centerx;
  30.     gdata.arc.cy=centery;
  31.     gdata.arc.stx=startx;
  32.     gdata.arc.sty=starty;
  33.     gdata.arc.edx=endx;
  34.     gdata.arc.edy=endy;
  35.     gdata.arc.r=r;
  36.     reg.x.bx=gds_wrkoff;
  37.     seg.es=gds_wrkseg;
  38.     int86x(0x92,®,®,&seg);
  39.     return (int)reg.h.ah;
  40. }
  41.