tags:

views:

32

answers:

1

In GDK there's an object called GdkRectangle that is used to draw rectangles. Is there a similar object for ellipses?

+1  A: 

No. Actually, GdkRectangle is not used to draw rectangles directly, it is merely used to specify rectangle position. For instance, gdk_draw_rectangle() doesn't even accept any GdkRectangle argument. To draw an ellipse, you could use gdk_draw_arc().

Note that using GDK for drawing is quite outdated. You could use Cairo and functions cairo_rectangle() and cairo_arc() for this.

doublep
Okay, but I need to a linked list of drawn rectangles so `GdkRectangle` comes in handy. Does `GdkRectangle` have a counterpart for ellipses?I cannot use Cairo since this is part of a school assignment where we have to build on existing code.
Pieter
@Pieter: No, there is no direct analogue. Nothing precludes you from defining your own structure, though.
doublep