Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 GDK 中有一个名为GdkRectangle的对象,用于绘制矩形。椭圆是否有类似的对象?
不,实际上,GdkRectangle不是用来直接绘制矩形,它只是用来指定矩形位置。例如,gdk_draw_rectangle()甚至不接受任何GdkRectangle论点。要绘制椭圆,您可以使用gdk_draw_arc().
GdkRectangle
gdk_draw_rectangle()
gdk_draw_arc()
请注意,使用 GDK 进行绘图已经过时了。您可以为此使用 Cairo 和函数cairo_rectangle()。cairo_arc()
cairo_rectangle()
cairo_arc()