RE: Drawing curves



I'm trying to figure out to draw parts of circles with GTK.  
gdk_draw_arc
will let you draw a "pie", but I don't want the inner portion 
of the circle
to be drawn.  I want a curved line with color & thickness 
that I specify.

I thought about drawing the full pie and then drawing a 
smaller pie with the
background color, but that seems suboptimal because I'll then 
draw over
anything behind the entire thing.  I would like to avoid this.

So then, whats the best way to draw curves?

Looking at the documentation:
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Drawing-Primitives.html#gdk-d
raw-arc

It says this:

Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
rectangle of the entire ellipse, and the start and end angles of the part of
the ellipse to be drawn.

These are the variables:

        drawable : a GdkDrawable (a GdkWindow or a GdkPixmap).
        gc : a GdkGC.
        filled : TRUE if the arc should be filled, producing a 'pie slice'.
        x : the x coordinate of the left edge of the bounding rectangle.
        y : the y coordinate of the top edge of the bounding rectangle.
        width : the width of the bounding rectangle.
        height : the height of the bounding rectangle.
        angle1 : the start angle of the arc, relative to the 3 o'clock
position, counter-clockwise, in 1/64ths of a degree.
        angle2 : the end angle of the arc, relative to angle1, in 1/64ths of
a degree.

Have you tried setting the "filled" variable to FALSE?

Regards,
Martyn



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]