Re: [gtk-list] small circles are square ... :(
- From: Sven LUTHER <luther maxime u-strasbg fr>
- To: jmiguel ceselsa es, luther dpt-info u-strasbg fr
- Cc: gtk-list redhat com
- Subject: Re: [gtk-list] small circles are square ... :(
- Date: Thu, 20 May 1999 16:16:35 +0200
On Thu, May 20, 1999 at 02:58:01PM +0000, José Miguel R. Barrientos wrote:
> 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));
> }
> }
It works, ...
guess it has to do with the empty circles that we draw first ...
Thanks,
Friendly,
Sven LUTHER
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]