void DrawSolutionIcon(CairoContextEx cr, double x, double y, double width, double height) { string image; int img_index = (int) SolutionIcon; switch (SolutionIcon) { case SolutionType.CorrectAnswer: image = "gtk-ok.svg"; break; case SolutionType.InvalidAnswer: image = "gtk-stop.svg"; break; case SolutionType.Tip: image = "gtk-info.svg"; break; default: return; } // In memory games, the image gets painted several dozen times if (images [img_index] == null) { images [img_index] = new SVGImage (System.Reflection.Assembly.GetExecutingAssembly (), image); } cr.DrawImage (images [img_index], x + icon_margin, y, width, height); }