~ubuntu-branches/ubuntu/raring/python-scipy/raring-proposed

« back to all changes in this revision

Viewing changes to Lib/xplt/src/play/x11/ellipse.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * ellipse.c -- $Id: ellipse.c,v 1.1 2003/03/08 15:26:51 travo Exp $
3
 
 * p_ellipse for X11
4
 
 *
5
 
 * Copyright (c) 1998.  See accompanying LEGAL file for details.
6
 
 */
7
 
 
8
 
#include "config.h"
9
 
#include "playx.h"
10
 
 
11
 
void
12
 
p_ellipse(p_win *w, int x0, int y0, int x1, int y1, int border)
13
 
{
14
 
  p_scr *s = w->s;
15
 
  Display *dpy = s->xdpy->dpy;
16
 
  GC gc = x_getgc(s, w, FillSolid);
17
 
  int tmp;
18
 
  if (x1 > x0) x1 -= x0;
19
 
  else tmp = x0-x1, x0 = x1, x1 = tmp;
20
 
  if (y1 > y0) y1 -= y0;
21
 
  else tmp = y0-y1, y0 = y1, y1 = tmp;
22
 
  if (border)
23
 
    XDrawArc(dpy, w->d, gc, x0, y0, x1, y1, 0, 360*64);
24
 
  else
25
 
    XFillArc(dpy, w->d, gc, x0-1, y0-1, x1+2, y1+2, 0, 360*64);
26
 
  if (p_signalling) p_abort();
27
 
}