This is done using Mono.Cairo, which is a wrapper around its own drawing library (like GDI +), so it works pretty well.
Example (draw a line):
using (Cairo.Context g = CairoHelper.Create (myWindow.GdkWindow)) { g.MoveTo (0, 0); g.LineTo (10, 10); g.Color = new Color (1, 1, 1); g.Stroke (); }
Cairo lacks higher-level features such as DrawRectangle and FillRectangle. Pinta has many extension methods that add these features that you can see:
https://github.com/jpobst/Pinta/blob/master/Pinta.Core/Extensions/CairoExtensions.cs
source share