diff options
author | Adam Frisby | 2009-04-09 14:19:49 +0000 |
---|---|---|
committer | Adam Frisby | 2009-04-09 14:19:49 +0000 |
commit | c77e7fce9ebbdb0a7a5baee316fcf940bf641416 (patch) | |
tree | 5930b5f6c76983c1fe4ea44285ad6f163570b953 /OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs | |
parent | * Adds World.OnNewUser += delegate(IWorld sender, NewUserEventArgs e); (diff) | |
download | opensim-SC_OLD-c77e7fce9ebbdb0a7a5baee316fcf940bf641416.zip opensim-SC_OLD-c77e7fce9ebbdb0a7a5baee316fcf940bf641416.tar.gz opensim-SC_OLD-c77e7fce9ebbdb0a7a5baee316fcf940bf641416.tar.bz2 opensim-SC_OLD-c77e7fce9ebbdb0a7a5baee316fcf940bf641416.tar.xz |
* Implements IGraphics interface for MRM Scripting.
* This allows you to utilize System.Drawing tools on textures within the region.
* Example: use System.Drawing.Bitmap to make your texture, then use Host.Graphics.SaveBitmap to make an asset from it in JPEG2K. You can edit (but not overwrite) existing textures using Host.Graphics.LoadBitmap.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs index 394e024..f5953d0 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Host.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using log4net; | 29 | using log4net; |
30 | using OpenSim.Region.Framework.Scenes; | ||
30 | 31 | ||
31 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 32 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
32 | { | 33 | { |
@@ -34,10 +35,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
34 | { | 35 | { |
35 | private readonly IObject m_obj; | 36 | private readonly IObject m_obj; |
36 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 37 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
38 | private readonly IGraphics m_graphics; | ||
39 | private Scene m_scene; | ||
37 | 40 | ||
38 | public Host(IObject m_obj) | 41 | public Host(IObject m_obj, Scene m_scene) |
39 | { | 42 | { |
40 | this.m_obj = m_obj; | 43 | this.m_obj = m_obj; |
44 | this.m_scene = m_scene; | ||
45 | |||
46 | m_graphics = new Graphics(m_scene); | ||
41 | } | 47 | } |
42 | 48 | ||
43 | public IObject Object | 49 | public IObject Object |
@@ -49,5 +55,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
49 | { | 55 | { |
50 | get { return m_log; } | 56 | get { return m_log; } |
51 | } | 57 | } |
58 | |||
59 | public IGraphics Graphics | ||
60 | { | ||
61 | get { return m_graphics; } | ||
62 | } | ||
52 | } | 63 | } |
53 | } | 64 | } |