L
Lloyd Dupont
I'm using 2.0 beta2
I have this method which, occasionally throw an OverflowException with the
message:
An arithmetic, casting, or conversion operation in a checked context results
in a overflow
I created everything with code looking like:
override OnPaint(PaintEventArgs e)
{
e.Graphics.Transform = new Matrix(1, 0, 0, 1, -2411, -724);
GraphicsPath path = new GraphicsPath();
path.StartFigure();
path.AddLine(new PointF(2824, 793), new PointF(2839, 792));
path.AddLine(new PointF(2839, 792), new PointF(2838, 799));
path.CloseFigure();
Pen pen = new Pen(Color.FromArgb(79, 0, 0, 255), 3.0f);
e.Graphics.DrawPath(pen, path); // <= overflow exception here
}
what could it be?
my value (like 2824) appear correctly in the debugger....
I even wrap all my code in an
unchecked
{
}
block but it didn't help...
any idea?
I have this method which, occasionally throw an OverflowException with the
message:
An arithmetic, casting, or conversion operation in a checked context results
in a overflow
I created everything with code looking like:
override OnPaint(PaintEventArgs e)
{
e.Graphics.Transform = new Matrix(1, 0, 0, 1, -2411, -724);
GraphicsPath path = new GraphicsPath();
path.StartFigure();
path.AddLine(new PointF(2824, 793), new PointF(2839, 792));
path.AddLine(new PointF(2839, 792), new PointF(2838, 799));
path.CloseFigure();
Pen pen = new Pen(Color.FromArgb(79, 0, 0, 255), 3.0f);
e.Graphics.DrawPath(pen, path); // <= overflow exception here
}
what could it be?
my value (like 2824) appear correctly in the debugger....
I even wrap all my code in an
unchecked
{
}
block but it didn't help...
any idea?