зеркало из https://github.com/mono/mail-archives.git
87 строки
2.9 KiB
HTML
87 строки
2.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-list] nplot + gtk.image?
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gallopma%40cyllene.uwa.edu.au">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="025613.html">
|
|
<LINK REL="Next" HREF="025616.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-list] nplot + gtk.image?
|
|
</H1>
|
|
<B>Mark Gallop
|
|
</B>
|
|
<A HREF="mailto:gallopma%40cyllene.uwa.edu.au"
|
|
TITLE="[Mono-list] nplot + gtk.image?">gallopma@cyllene.uwa.edu.au
|
|
</A><BR>
|
|
<I>Mon, 07 Feb 2005 15:37:31 +0800</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="025613.html">[Mono-list] mod_mono/XSP HEAD (source) + Mono 1.0.5 (source)+
|
|
Apache 2 (binary) + Debian Sarge
|
|
</A></li>
|
|
<LI> Next message: <A HREF="025616.html">[Mono-list] nplot + gtk.image?
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#25615">[ date ]</a>
|
|
<a href="thread.html#25615">[ thread ]</a>
|
|
<a href="subject.html#25615">[ subject ]</a>
|
|
<a href="author.html#25615">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Hello all,
|
|
|
|
I have been trying to get nplot 0.9.8.3 (<A HREF="http://netcontrols.org/nplot/">http://netcontrols.org/nplot/</A>)
|
|
to work with gtk/glade# but I can't work out how to correctly get the
|
|
returned system.drawing.graphics into a gtk.image.
|
|
|
|
Currently I am using with following:
|
|
...
|
|
NPlot.PlotSurface2D plotSurface;
|
|
[Widget] Gtk.Image image1;
|
|
|
|
...
|
|
Bitmap b = new Bitmap (Xmax, Ymax);
|
|
Graphics g = Graphics.FromImage (b);
|
|
g.FillRectangle (Brushes.White, 0, 0, Xmax, Ymax);
|
|
Rectangle bounds = new Rectangle (0, 0, Xmax, Ymax);
|
|
plotSurface.Draw(g,bounds);
|
|
|
|
b.Save ("file.png", ImageFormat.Png);
|
|
image1.FromFile = "file.png";
|
|
|
|
This works but doesn't seem very efficient. Should I not be using a
|
|
gtk.image? Should I be using a pixmap somewhere? Could someone please
|
|
give me some hints?
|
|
|
|
I am developing in linux with mono 1.0.5 and gtk# 1.0.4 but I would also
|
|
like it to run in win32 with .net/gtk#. Thanks in advance for any help.
|
|
|
|
Cheers,
|
|
Mark
|
|
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="025613.html">[Mono-list] mod_mono/XSP HEAD (source) + Mono 1.0.5 (source)+
|
|
Apache 2 (binary) + Debian Sarge
|
|
</A></li>
|
|
<LI> Next message: <A HREF="025616.html">[Mono-list] nplot + gtk.image?
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#25615">[ date ]</a>
|
|
<a href="thread.html#25615">[ thread ]</a>
|
|
<a href="subject.html#25615">[ subject ]</a>
|
|
<a href="author.html#25615">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|