Re: [gtk-list] Drawing Arc problem
- From: Havoc Pennington <rhp zirx pair com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Drawing Arc problem
- Date: Tue, 13 Apr 1999 00:10:53 -0400 (EDT)
On Tue, 13 Apr 1999, Guillaume Patry wrote:
>
> Could anyone help me with the "gdk.drawable.draw_arc" function ?
> I've got some problems with the angle1 and angle2 params. I tought
> they were suposed to be in 64th of degree, as in Xlib, but it does
> not seem to be the case.
>
It has to be. Look:
void
gdk_draw_arc (GdkDrawable *drawable,
GdkGC *gc,
gint filled,
gint x,
gint y,
gint width,
gint height,
gint angle1,
gint angle2)
GdkWindowPrivate *drawable_private;
GdkGCPrivate *gc_private;
g_return_if_fail (drawable != NULL);
g_return_if_fail (gc != NULL);
drawable_private = (GdkWindowPrivate*) drawable;
if (drawable_private->destroyed)
return;
gc_private = (GdkGCPrivate*) gc;
if (width == -1)
width = drawable_private->width;
if (height == -1)
height = drawable_private->height;
if (filled)
XFillArc (drawable_private->xdisplay, drawable_private->xwindow,
gc_private->xgc, x, y, width, height, angle1, angle2);
else
XDrawArc (drawable_private->xdisplay, drawable_private->xwindow,
gc_private->xgc, x, y, width, height, angle1, angle2);
}
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]