gl_bcircle(3)

gl_bcircle3

Draw a filled or unfilled bresenham circle

Usage

#include <vgagl.h>

void gl_bcircle(int x, int y, int r, int c, int fill);

Overview

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 <[email protected]>, 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.

Releases

Unchanged in 5 releases since Debian 3.1 (Sarge).

  1. 3.1–7

Author

This manual page was written by Jay Link <[email protected]>.

From libsvga1-dev 1:1.4.3-33 in Debian 7 (Wheezy). Parsed by carta from the page's man source.