[Mono-list] Cairo bug?
Brandon Perry
bperry.volatile at gmail.com
Mon Oct 22 08:53:59 EDT 2007
I am doing some work with Cairo (gbrainy) and have run across what seems
like it would be a bug. I get a System.FormatException crash when
attempting to draw a certain puzzle. Here is the code:
public override void Draw (Cairo.Context gr, int area_width, int
area_height)
{
double x = DrawAreaX;
gr.Scale (area_width, area_height);
DrawBackground (gr);
PrepareGC (gr);
gr.SetFontSize (0.05);
gr.MoveTo (x + 0.3, DrawAreaY + 0.2);
gr.ShowText (String.Format ("{0} ? {1} ? {2} = {3}", number_a, number_b,
number_c, total));
gr.MoveTo (x + 0.05, DrawAreaY + 0.3);
//gr.ShowText (String.Format (" {1}", number_b));
gr.MoveTo (x + 0.05, DrawAreaY + 0.4);
//gr.ShowText (String.Format (" {2}", number_c));
gr.MoveTo (x + 0.15, DrawAreaY + 0.5);
gr.ShowText ("_______________");
gr.MoveTo (x + 0.2, DrawAreaY + 0.6);
//gr.ShowText (String.Format("{3}", total));
}
It crashes on the lines that are commented out (the first gr.ShowText is
there to show that the variables do indeed have a value). Any thoughts?
More information about the Mono-list
mailing list