private void textToolStripMenuItem_Click(object sender, EventArgs e)
{
lastSelected = "text";
OnPaintAction = cr =>
{
cr.SelectFontFace("Microsoft Sans Serif", FontSlant.Normal, FontWeight.Bold);
cr.SetFontSize(90.0);
cr.MoveTo(10.0, 135.0);
cr.ShowText("Hello");
cr.MoveTo(70.0, 165.0);
cr.TextPath("void");
cr.SetSourceRGB(0.5, 0.5, 1);
cr.FillPreserve();
cr.SetSourceRGB(0, 0, 0);
cr.LineWidth = 2.56;
cr.Stroke();
/* draw helping lines */
cr.SetSourceRGBA(1, 0.2, 0.2, 0.6);
cr.Arc(10.0, 135.0, 5.12, 0, 2 * Math.PI);
cr.ClosePath();
cr.Arc(70.0, 165.0, 5.12, 0, 2 * Math.PI);
cr.Fill();
};
Invalidate();
}