[Mono-bugs] [Bug 61957][Wis] New - Problems with GDIPlus

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 26 Jul 2004 11:43:50 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gmendes@interserv.com.br.

http://bugzilla.ximian.com/show_bug.cgi?id=61957

--- shadow/61957	2004-07-26 11:43:50.000000000 -0400
+++ shadow/61957.tmp.3540	2004-07-26 11:43:50.000000000 -0400
@@ -0,0 +1,147 @@
+Bug#: 61957
+Product: Mono: Runtime
+Version: unspecified
+OS: Red Hat 7.3
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gmendes@interserv.com.br               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Problems with GDIPlus
+
+Description of Problem:
+I've been trying to use Dundas Chart for .NET (www.dundas.com) with Mono 
+but I experienced some problems. I already installed the mono-drawing, 
+gdiplus, etc package but when I run with 'mono Dundas.exe'
+
+Unhandled Exception: System.NullReferenceException: Object reference not 
+set to an instance of an object
+in (unmanaged) (wrapper managed-to-native) 
+System.Drawing.GDIPlus:GdipMeasureString 
+(intptr,string,int,intptr,System.Drawing.RectangleF&,intptr,System.Drawing.
+RectangleF&,int&,int&)
+in <0x00004> (wrapper managed-to-native) 
+System.Drawing.GDIPlus:GdipMeasureString 
+(intptr,string,int,intptr,System.Drawing.RectangleF&,intptr,System.Drawing.
+RectangleF&,int&,int&)
+in <0x000ef> System.Drawing.Graphics:MeasureString 
+(string,System.Drawing.Font,System.Drawing.SizeF)
+in <0x000c8> (wrapper remoting-invoke-with-check) 
+System.Drawing.Graphics:MeasureString 
+(string,System.Drawing.Font,System.Drawing.SizeF)
+in <0x00085> System.Drawing.Graphics:MeasureString 
+(string,System.Drawing.Font)
+in <0x00085> (wrapper remoting-invoke-with-check) 
+System.Drawing.Graphics:MeasureString (string,System.Drawing.Font)
+in <0x0001e> Dundas.Charting.WebControl.GdiGraphics:MeasureString 
+(string,System.Drawing.Font)
+in <0x0002e> Dundas.Charting.WebControl.ChartRenderingEngine:MeasureString 
+(string,System.Drawing.Font)
+in <0x00024> Dundas.Charting.WebControl.ChartGraphics:MeasureStringRel 
+(string,System.Drawing.Font)
+in <0x0024b> Dundas.Charting.WebControl.Legend:RecalcLegendInfo 
+(Dundas.Charting.WebControl.ChartGraphics)
+in <0x00278> Dundas.Charting.WebControl.Legend:GetOptimalSize 
+(Dundas.Charting.WebControl.ChartGraphics,System.Drawing.SizeF)
+in <0x001a3> Dundas.Charting.WebControl.Legend:CalcLegendPosition 
+(Dundas.Charting.WebControl.ChartGraphics,System.Drawing.RectangleF&,single
+,single)
+in <0x000fc> 
+Dundas.Charting.WebControl.LegendCollection:CalcLegendPosition 
+(Dundas.Charting.WebControl.ChartGraphics,System.Drawing.RectangleF&,single
+,single)
+in <0x0066d> Dundas.Charting.WebControl.ChartPicture:Resize 
+(Dundas.Charting.WebControl.ChartGraphics,bool)
+in <0x006b3> Dundas.Charting.WebControl.ChartPicture:Paint 
+(System.Drawing.Graphics,bool,bool,System.Xml.XmlTextWriter,string,bool,boo
+l)
+
+
+Steps to reproduce the problem:
+
+1. Compile with: mcs Dundas.cs -r:System.Drawing -r:System.Web -
+r:DundasWebChart.dll -lib:DundasWebChart
+
+2. Run with 'mono Dundas.exe'
+
+Actual Results:
+The problem above
+
+Expected Results:
+A file called dun.jpg containing the chart
+
+How often does this happen? 
+every time you run :)
+
+Additional Information:
+
+Complete source code:
+
+using System;
+using Dundas.Charting.WebControl;
+using Dundas.Charting.WebControl.ChartTypes;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+
+namespace Teste {
+
+        public class TestesDundas {
+
+                static void Main()
+                {
+                        // Create a Chart
+                        Chart Chart1 = new Chart();
+
+                        // Create Chart Area
+                        ChartArea chartArea1 = new ChartArea();
+                        chartArea1.Area3DStyle.Enable3D = true;
+
+                        chartArea1.Area3DStyle.Light = 
+LightStyle.Simplistic;
+                        chartArea1.BackImageTranspColor = 
+Color.Transparent;
+
+                        // Add Chart Area to the Chart
+                        Chart1.ChartAreas.Add(chartArea1);
+
+                        // Create a data series
+                        Series series1 = new Series();
+                        Series series2 = new Series();
+
+                        // Add data points to the first series
+                        series1.Type = SeriesChartType.Pie;
+                        series1.Palette = 
+ChartColorPalette.SemiTransparent;
+                        //series1.Palette = 
+ChartColorPalette.SemiTransparent;
+
+                        series1.Points.Add(34);
+                        series1.Points.Add(24);
+                        series1.Points.Add(32);
+                        series1.Points.Add(28);
+                        series1.Points.Add(44);
+
+                        // Add series to the chart
+                        Chart1.Series.Add(series1);
+
+                        // Add series to the chart
+                        Chart1.Series.Add(series1);
+
+                        // Set chart control location
+                        //Chart1.Location = new System.Drawing.Point(16, 
+48);
+                        Chart1.BackColor = Color.White;
+
+                        Chart1.Save("dun.jpg",ChartImageFormat.Jpeg);
+                }
+
+        }
+}