开发者

Ellipse object in GDK

开发者 https://www.devze.com 2022-12-31 00:55 出处:网络
In G开发者_开发技巧DK there\'s an object called GdkRectangle that is used to draw rectangles. Is there a similar object for ellipses?No.Actually, GdkRectangle is not used to draw rectangles directly,

In G开发者_开发技巧DK there's an object called GdkRectangle that is used to draw rectangles. Is there a similar object for ellipses?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消