---
name: "gl_bcircle"
section: "3vga"
platform: "linux"
package: "svgalibg1-dev"
version: "1:1.4.3-7"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/gl_bcircle/3vga"
---

# gl\_bcircle(3vga)

draw a filled or unfilled Bresenham circle

## NAME

gl\_bcircle - draw a filled or unfilled Bresenham circle

## SYNOPSIS

**#include \<vgagl.h\>**

**void gl\_bcircle(int** *x***, int** *y***, int** *r***, int** *c***, int** *fill***);**

## DESCRIPTION

Draw a Bresenham circle of radius *r* in color *c ,* centered at *( x ,  y ).*

*Fill* should be 0 for a hollow circle, or any other value for a solid color.

This function differs from gl\_circle (3) and gl\_fillcircle (3) in that it looks good in 320 x 200 screen modes. The modified algorithm was provided by Chris Atenasio \<chris@svgalib.org\>, and is based upon Bresenham's formula.

Note that the "circle" is technically an ellipse, and is actually wider than it is tall. Therefore, *r* is equal to the circle's height, but is less than its width. This distortion is necessary to accomodate the 8:5 aspect ratio (e.g., 320 x 200).

I don't recommend using this function in standard 4:3 screen modes (e.g., 640 x 480 and higher). Furthermore, care must be taken so that a circle drawn with this function isn't copied to a screen with a different aspect ratio. Otherwise, the result may be undesirable.

## SEE ALSO

[**svgalib**(7)](/svgalib/7.md), [**vgagl**(7)](/vgagl/7.md), **svgalib.conf**(5), **threedkit**(7), **testgl**(1), **plane**(1), **wrapdemo**(1), [**gl\_circle**(3)](/gl_circle/3.md), [**gl\_clearscreen**(3)](/gl_clearscreen/3.md), [**gl\_colorfont**(3)](/gl_colorfont/3.md), [**gl\_disableclipping**(3)](/gl_disableclipping/3.md), [**gl\_enableclipping**(3)](/gl_enableclipping/3.md), [**gl\_fillbox**(3)](/gl_fillbox/3.md), [**gl\_fillcircle**(3)](/gl_fillcircle/3.md), [**gl\_hline**(3)](/gl_hline/3.md), [**gl\_line**(3)](/gl_line/3.md), [**gl\_setclippingwindow**(3)](/gl_setclippingwindow/3.md), [**gl\_setpalette**(3)](/gl_setpalette/3.md), [**gl\_setpalettecolor**(3)](/gl_setpalettecolor/3.md), [**gl\_setpalettecolors**(3)](/gl_setpalettecolors/3.md), [**gl\_setpixel**(3)](/gl_setpixel/3.md), [**gl\_setpixelrgb**(3)](/gl_setpixelrgb/3.md), [**gl\_setrgbpalette**(3)](/gl_setrgbpalette/3.md), [**gl\_setwritemode**(3)](/gl_setwritemode/3.md).

## AUTHOR

This manual page was written by Jay Link \<jlink@svgalib.org\>.
