In GDK there's an object called GdkRectangle that is used to draw rectangles. Is there a similar object for ellipses?
Asked
Active
Viewed 225 times
1 Answers
1
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.
-
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 May 22 '10 at 16:42
-
@Pieter: No, there is no direct analogue. Nothing precludes you from defining your own structure, though. – May 22 '10 at 17:07