emSize exception
Posted: Tue Dec 16, 2008 4:51 pm
I just updated from 3.5.3105.20152 to 3.5.3225.32185. In the new version I'm getting an exception (text below) when I do a Refresh(). If I go back to the older version, the error goes away. Any idea what could be causing this? I don't do anything to set the fonts on the plot. So, I'm not sure what should be changed to fix this, or why this is now a problem.
An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dll
Additional information: Value of '0' is not valid for 'emSize'. 'emSize' should be greater than 0 and less than or equal to System.Single.MaxValue.
at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style)
at Steema.TeeChart.Drawing.ChartFont.SetDrawingFont()
at Steema.TeeChart.Drawing.ChartFont.get_DrawingFont()
at Steema.TeeChart.Drawing.Graphics3DGdiPlus.MeasureString(ChartFont f, String text)
at Steema.TeeChart.Drawing.Graphics3D.TextHeight(ChartFont f, String text)
at Steema.TeeChart.Drawing.Graphics3D.FontTextHeight(ChartFont f)
at Steema.TeeChart.Axis.InternalCalcSize(ChartFont tmpFont, Int32 tmpAngle, String tmpText, Int32 tmpSize)
at Steema.TeeChart.Axis.CalcRect(Rectangle& r, Boolean inflateChartRectangle)
at Steema.TeeChart.Chart.AxisRect(Axis a, Rectangle& r)
at Steema.TeeChart.Chart.CalcAxisRect()
at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.UpdateWindow(HandleRef hWnd)
at System.Windows.Forms.Control.Update()
at System.Windows.Forms.Control.Refresh()
An unhandled exception of type 'System.ArgumentException' occurred in System.Drawing.dll
Additional information: Value of '0' is not valid for 'emSize'. 'emSize' should be greater than 0 and less than or equal to System.Single.MaxValue.
at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style)
at Steema.TeeChart.Drawing.ChartFont.SetDrawingFont()
at Steema.TeeChart.Drawing.ChartFont.get_DrawingFont()
at Steema.TeeChart.Drawing.Graphics3DGdiPlus.MeasureString(ChartFont f, String text)
at Steema.TeeChart.Drawing.Graphics3D.TextHeight(ChartFont f, String text)
at Steema.TeeChart.Drawing.Graphics3D.FontTextHeight(ChartFont f)
at Steema.TeeChart.Axis.InternalCalcSize(ChartFont tmpFont, Int32 tmpAngle, String tmpText, Int32 tmpSize)
at Steema.TeeChart.Axis.CalcRect(Rectangle& r, Boolean inflateChartRectangle)
at Steema.TeeChart.Chart.AxisRect(Axis a, Rectangle& r)
at Steema.TeeChart.Chart.CalcAxisRect()
at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.UpdateWindow(HandleRef hWnd)
at System.Windows.Forms.Control.Update()
at System.Windows.Forms.Control.Refresh()