简体   繁体   English

GDK中的椭圆对象

[英]Ellipse object in GDK

In GDK there's an object called GdkRectangle that is used to draw rectangles. 在GDK中,有一个名为GdkRectangle的对象,用于绘制矩形。 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. 否。实际上, GdkRectangle不是直接用于绘制矩形,而只是用于指定矩形位置。 For instance, gdk_draw_rectangle() doesn't even accept any GdkRectangle argument. 例如, gdk_draw_rectangle()甚至不接受任何GdkRectangle参数。 To draw an ellipse, you could use gdk_draw_arc() . 要绘制椭圆,可以使用gdk_draw_arc()

Note that using GDK for drawing is quite outdated. 请注意,使用GDK进行绘制已经过时了。 You could use Cairo and functions cairo_rectangle() and cairo_arc() for this. 您可以cairo_arc()使用开罗以及函数cairo_rectangle()cairo_arc()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM