Warning
gdk_draw_rectangle has been deprecated since version 2.22 and should not be used in newly-written code. Use cairo_rectangle() and cairo_fill() or cairo_stroke()
instead. For stroking, the same caveats for converting code apply as for
gdk_draw_line().
Draws a rectangular outline or filled rectangle, using the foreground color
and other attributes of the GdkGC.
A rectangle drawn filled is 1 pixel smaller in both dimensions than a
rectangle outlined. Calling
gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20)
results in a filled rectangle 20 pixels wide and 20 pixels high. Calling
gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20)
results in an outlined rectangle with corners at (0, 0), (0, 20), (20, 20),
and (20, 0), which makes it 21 pixels wide and 21 pixels high.
Note
Warning gdk_draw_rectangle has been deprecated since version 2.22 and should not be used in newly-written code. Use cairo_rectangle() and cairo_fill() or cairo_stroke() instead. For stroking, the same caveats for converting code apply as for gdk_draw_line(). Draws a rectangular outline or filled rectangle, using the foreground color and other attributes of the GdkGC. A rectangle drawn filled is 1 pixel smaller in both dimensions than a rectangle outlined. Calling gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20) results in a filled rectangle 20 pixels wide and 20 pixels high. Calling gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20) results in an outlined rectangle with corners at (0, 0), (0, 20), (20, 20), and (20, 0), which makes it 21 pixels wide and 21 pixels high. Note