1 /**
2  ** BCC2GRX  -  Interfacing Borland based graphics programs to LIBGRX
3  ** Copyright (C) 1993-97 by Hartmut Schirmer
4  **
5  **
6  ** Contact :                Hartmut Schirmer
7  **                          Feldstrasse 118
8  **                  D-24105 Kiel
9  **                          Germany
10  **
11  ** e-mail : hsc@techfak.uni-kiel.de
12  **
13  ** This file is part of the GRX graphics library.
14  **
15  ** The GRX graphics library is free software; you can redistribute it
16  ** and/or modify it under some conditions; see the "copying.grx" file
17  ** for details.
18  **
19  ** This library is distributed in the hope that it will be useful,
20  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
21  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22  **
23  **/
24 
25 #include "bccgrx00.h"
26 
fillellipse(int x,int y,int xradius,int yradius)27 void fillellipse( int x, int y, int xradius, int yradius)
28 {
29   _DO_INIT_CHECK;
30   x += VL;
31   y += VT+PY;
32   xradius = XR(xradius);
33   yradius = YR(yradius);
34   switch (FPATT) {
35     case SOLID_FILL :
36       GrFilledEllipse( x, y, xradius, yradius, FILL);
37       if (COL != FILL)
38 	GrEllipse( x, y, xradius, yradius, COL);
39       break;
40     case EMPTY_FILL :
41       GrFilledEllipse( x, y, xradius, yradius, COLBG);
42       if (COL != COLBG)
43 	GrEllipse( x, y, xradius, yradius, COL);
44       break;
45     default :
46       FILLP.gp_bmp_fgcolor = FILL;
47       FILLP.gp_bmp_bgcolor = COLBG;
48       GrPatternFilledEllipse( x, y, xradius, yradius, &FILLP);
49       GrEllipse( x, y, xradius, yradius, COL);
50       break;
51   }
52 }
53 
54