File: circle.c

package info (click to toggle)
sam 4.3-9
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,416 kB
  • ctags: 1,660
  • sloc: ansic: 14,329; makefile: 204; sh: 189
file content (22 lines) | stat: -rw-r--r-- 404 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Copyright (c) 1992 AT&T - All rights reserved. */
#include <libc.h>
#include <libg.h>
#include "libgint.h"

void
circle(Bitmap *b, Point p, int r, int v, Fcode f)
{
	unsigned int d;
	int x, y;
	GC g;

	x = p.x - r;
	y = p.y - r;
	if (b->flag&SHIFT){
		x -= b->r.min.x;
		y -= b->r.min.y;
	}
	d = 2*r;
	g = _getfillgc(f, b, v);
	XDrawArc(_dpy, (Drawable)b->id, g, x, y, d, d, 0, 23040/* 360 deg */);
}