1gl_bcircle(3) Svgalib User Manual gl_bcircle(3)
2
3
4
6 gl_bcircle - draw a filled or unfilled Bresenham circle
7
8
10 #include <vgagl.h>
11
12 void gl_bcircle(int x, int y, int r, int c, int fill);
13
14
16 Draw a Bresenham circle of radius r in color c , centered at ( x , y
17 ).
18
19 Fill should be 0 for a hollow circle, or any other value for a solid
20 color.
21
22 This function differs from gl_circle (3) and gl_fillcircle (3) in that
23 it looks good in 320 x 200 screen modes. The modified algorithm was
24 provided by Chris Atenasio <chris@svgalib.org>, and is based upon Bre‐
25 senham's formula.
26
27 Note that the "circle" is technically an ellipse, and is actually wider
28 than it is tall. Therefore, r is equal to the circle's height, but is
29 less than its width. This distortion is necessary to accomodate the 8:5
30 aspect ratio (e.g., 320 x 200).
31
32 I don't recommend using this function in standard 4:3 screen modes
33 (e.g., 640 x 480 and higher). Furthermore, care must be taken so that a
34 circle drawn with this function isn't copied to a screen with a differ‐
35 ent aspect ratio. Otherwise, the result may be undesirable.
36
37
39 svgalib(7), vgagl(7), svgalib.conf(5), threedkit(7), testgl(1),
40 plane(1), wrapdemo(1), gl_circle(3), gl_clearscreen(3), gl_color‐
41 font(3), gl_disableclipping(3), gl_enableclipping(3), gl_fillbox(3),
42 gl_fillcircle(3), gl_hline(3), gl_line(3), gl_setclippingwindow(3),
43 gl_setpalette(3), gl_setpalettecolor(3), gl_setpalettecolors(3),
44 gl_setpixel(3), gl_setpixelrgb(3), gl_setrgbpalette(3), gl_setwrite‐
45 mode(3).
46
47
49 This manual page was written by Jay Link <jlink@svgalib.org>.
50
51
52
53Svgalib (>= 1.4.1) 4 Dec 1999 gl_bcircle(3)