Re: [gtk-list] small circles are square ... :(
- From: "José Miguel R. Barrientos" <jmiguel ceselsa es>
- To: luther dpt-info u-strasbg fr
- CC: gtk-list redhat com
- Subject: Re: [gtk-list] small circles are square ... :(
- Date: Thu, 20 May 1999 14:58:01 +0000
Sven LUTHER wrote:
>
> Hello,
>
> Why are small circles square ?
>
> try
>
> gdk_draw_arc drawable white true x y 5 5 0 (360*64)
>
> this draws : while this is more round :
>
> XXXXX XXX
> XXXXX XXXXX
> XXXXX XXXXX
> XXXXX XXXXX
> XXXXX XXX
>
>
> But then this is a X problem, right ?
>
> but could we not supply our own circle drawing primitive in case the default
> one is not ok ? just for very small diameters ? i was forced to draw the second
> shape by hand for this with lots of gdk_draw_points :(
>
>
> Friendly,
>
> Sven LUTHER
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
It's a problem with XFillArc (a X11 primitive).
But there's a workaround (don't ask me why it works), create a drawing_area and
try this:
/* */
void widget_exposed(GtkWidget *wid, GdkEventExpose *ev) {
int w;
for(w = 10; w > 2; w--) {
/* Empty */
gdk_draw_arc(wid->window, wid->style->white_gc,
FALSE, 90-(8*w), 90-(8*w), w, w, 0, (long)(64*360));
/* Filled */
gdk_draw_arc(wid->window, wid->style->white_gc,
FALSE, 90-(8*w), 110-(8*w), w, w, 0, (long)(64*360));
gdk_draw_arc(wid->window, wid->style->white_gc,
TRUE, 90-(8*w), 110-(8*w), w, w, 0, (long)(64*360));
}
}
Regards,
- José Miguel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]