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
2010-05-22 11:37:45
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
2010-05-22 16:42:02
@Pieter: No, there is no direct analogue. Nothing precludes you from defining your own structure, though.
doublep
2010-05-22 17:07:14