private void clipImageToolStripMenuItem_Click(object sender, EventArgs e)
{
lastSelected = "clipImage";
OnPaintAction = cr =>
{
int w, h;
ImageSurface image;
cr.Arc(128.0, 128.0, 76.8, 0, 2 * Math.PI);
cr.Clip();
cr.NewPath(); /* path not consumed by clip()*/
image = new ImageSurface(romedalenPngData);
w = image.Width;
h = image.Height;
cr.Scale(256.0 / w, 256.0 / h);
cr.SetSource(image, 0, 0);
cr.Paint();
image.Dispose();
};
Invalidate();
}