---
name: "do_circle"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/do_circle"
---

# do\_circle(3alleg)

Calculates all the points in a circle. Allegro game programming library.

## NAME

do\_circle - Calculates all the points in a circle. Allegro game programming library.

## SYNOPSIS

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

**void do\_circle(BITMAP \*bmp, int x, int y, int radius, int d,** **void (\*proc)(BITMAP \*bmp, int x, int y, int d));**

## DESCRIPTION

Calculates all the points in a circle around point (x, y) with radius r,  calling the supplied function for each one. This will be passed a copy of  the bmp parameter, the x and y position, and a copy of the d parameter,  so it is suitable for use with putpixel(). Example:

```
   void draw_explosion_ring(BITMAP *bmp, int x, int y, int d)
   {
      ...
   }
      do_circle(screen, SCREEN_W/2, SCREEN_H/2,
                SCREEN_H/16, flame_color,
                draw_explosion_ring);
```

## SEE ALSO

[**do\_ellipse**(3alleg)](/do_ellipse/3alleg.md), [**do\_arc**(3alleg)](/do_arc/3alleg.md), [**do\_line**(3alleg)](/do_line/3alleg.md), [**circle**(3alleg)](/circle/3alleg.md), [**circlefill**(3alleg)](/circlefill/3alleg.md)
