[Mono-dev] Mono, zedgraph and System.Drawing

Sebastien Pouliot sebastien.pouliot at gmail.com
Thu Oct 18 13:24:20 EDT 2007


Bonjour Hubert,

On Thu, 2007-10-18 at 17:47 +0200, Hubert FONGARNAND wrote:
> Hi,
> 
> I thought that mono implementation of System.Drawing for .NET 1.1 was
> enough complete... I was wrong... 

It depends on what you require. Bugs apart there's a list of missing
things on the Wiki: http://www.mono-project.com/Libgdiplus

> 
> I need to generate some graph for our intranet and i've take a look on
> ZedGraph which is referenced on the mono website :
> 
> I try a simple program :
> 
> private void ZedGraphWeb1_RenderGraph(ZedGraph.Web.ZedGraphWeb webObject, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane)
> 		{
> 		
> 			GraphPane myPane=masterPane[0];
> 			myPane.Title.Text = "Nombre d'accès total mensuel";
> 			myPane.XAxis.Title.Text = "";
> 			myPane.YAxis.Title.Text = "";
> 
> 			// Make up some random data points
> 			double[] y = { 10, 20, 40,10, 10 };
> 			double[] y2 = { 70, 50, 85, 54, 63 };
> 			string[] str = { "Jan 2007", "Fev 2007", "Mar 2007", "Avr 2007", "Mai 2007" };
> 
> 			// Add a bar to the graph
> 			
> 			BarItem myCurve = myPane.AddBar( "Curve 1", null, y, Color.White );// Access an image from a file (use your own filename here)
> 			// create a brush with the image
> 			myCurve.Bar.Fill = new Fill(new Color[]{Color.LightGray,Color.DarkGray});
> 			// turn off the bar border
> 			myCurve.Bar.Border.IsVisible = true;
> 			
> 			
> 			myPane.XAxis.Scale.TextLabels = str;
> 			
> 			myPane.XAxis.Type = AxisType.Text;
> 
> 			myPane.Legend.IsVisible = false;
> 
> 			// Calculate the Axis Scale Ranges
> 			//myPane.AxisChange();
> 		}
> 	}
> 
> First Problem i've to disable myPane.AxisChange() because it crash mono with : 
> hubert at hublinux /tmp/TestZDGraph $ xsp --port 8090
> xsp
> Listening on port: 8090 (non-secure)
> Listening on address: 0.0.0.0
> Root directory: /tmp/TestZDGraph
> Hit Return to stop the server.
> X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
>   Major opcode of failed request:  14 (X_GetGeometry)
>   Resource id in failed request:  0x0
>   Serial number of failed request:  7
>   Current serial number in output stream:  7
> 
> And with myPane.AxisChange(); commented out :
> 
> Here are the result of dotnet and mono output...
> 
> MS.NET 1.1

> Mono 1.2.5 (and mono 1.2.5 svn)

> 
> PS : please note that the mono version is unusable because of the Y Axis...
> 
> Could someone help me!!!!

Please fill a bug at bugzilla.novell.com and include a small but
complete (not just some code snippet) test case.

Merci,
Sebastien

> Thanks
> 
> _______________________________________________
> Ce message et les éventuels documents joints peuvent contenir des
> informations confidentielles.
> Au cas où il ne vous serait pas destiné, nous vous remercions de bien
> vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute
> utilisation de ce message non conforme à sa destination, toute
> diffusion ou publication, totale ou partielle et quel qu'en soit le
> moyen est formellement interdite.
> Les communications sur internet n'étant pas sécurisées, l'intégrité de
> ce message n'est pas assurée et la société émettrice ne peut être
> tenue pour responsable de son contenu.
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list