mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
* 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.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
@@ -34,10 +35,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
private readonly IObject m_obj;
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private readonly IGraphics m_graphics;
|
||||
private Scene m_scene;
|
||||
|
||||
public Host(IObject m_obj)
|
||||
public Host(IObject m_obj, Scene m_scene)
|
||||
{
|
||||
this.m_obj = m_obj;
|
||||
this.m_scene = m_scene;
|
||||
|
||||
m_graphics = new Graphics(m_scene);
|
||||
}
|
||||
|
||||
public IObject Object
|
||||
@@ -49,5 +55,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
get { return m_log; }
|
||||
}
|
||||
|
||||
public IGraphics Graphics
|
||||
{
|
||||
get { return m_graphics; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user