aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2009-08-31 11:58:49 +0100
committerMelanie2009-08-31 11:58:49 +0100
commit9e6684661ad0f65e2b9e87e44a03b858eea011ec (patch)
tree0828d50bfc7dde7966b05fd9501e57d634c1094a /OpenSim/Region
parentChange the return value if the compiler to "object" to allow compilers (diff)
parentoops. fixing missing argument. (diff)
downloadopensim-SC-9e6684661ad0f65e2b9e87e44a03b858eea011ec.zip
opensim-SC-9e6684661ad0f65e2b9e87e44a03b858eea011ec.tar.gz
opensim-SC-9e6684661ad0f65e2b9e87e44a03b858eea011ec.tar.bz2
opensim-SC-9e6684661ad0f65e2b9e87e44a03b858eea011ec.tar.xz
Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
6 files changed, 29 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index e83b1a8..bea6222 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -51,6 +51,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
51 private Scene m_scene; 51 private Scene m_scene;
52 private IDynamicTextureManager m_textureManager; 52 private IDynamicTextureManager m_textureManager;
53 private Graphics m_graph; 53 private Graphics m_graph;
54 private string m_fontName = "Arial";
54 55
55 public VectorRenderModule() 56 public VectorRenderModule()
56 { 57 {
@@ -123,6 +124,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
123 Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb); 124 Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb);
124 m_graph = Graphics.FromImage(bitmap); 125 m_graph = Graphics.FromImage(bitmap);
125 } 126 }
127
128 IConfig cfg = config.Configs["VectorRender"];
129 if (null != cfg)
130 {
131 m_fontName = cfg.GetString("font_name", m_fontName);
132 }
133 m_log.DebugFormat("[VECTORRENDERMODULE]: using font \"{0}\" for text rendering.", m_fontName);
126 } 134 }
127 135
128 public void PostInitialise() 136 public void PostInitialise()
@@ -397,7 +405,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
397 Point startPoint = new Point(0, 0); 405 Point startPoint = new Point(0, 0);
398 Point endPoint = new Point(0, 0); 406 Point endPoint = new Point(0, 0);
399 Pen drawPen = new Pen(Color.Black, 7); 407 Pen drawPen = new Pen(Color.Black, 7);
400 string fontName = "Arial"; 408 string fontName = m_fontName;
401 float fontSize = 14; 409 float fontSize = 14;
402 Font myFont = new Font(fontName, fontSize); 410 Font myFont = new Font(fontName, fontSize);
403 SolidBrush myBrush = new SolidBrush(Color.Black); 411 SolidBrush myBrush = new SolidBrush(Color.Black);
@@ -449,8 +457,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
449 } 457 }
450 else 458 else
451 { 459 {
452 graph.DrawString("URL couldn't be resolved or is", new Font("Arial",6), myBrush, startPoint); 460 graph.DrawString("URL couldn't be resolved or is", new Font(m_fontName,6),
453 graph.DrawString("not an image. Please check URL.", new Font("Arial", 6), myBrush, new Point(startPoint.X, 12 + startPoint.Y)); 461 myBrush, startPoint);
462 graph.DrawString("not an image. Please check URL.", new Font(m_fontName, 6),
463 myBrush, new Point(startPoint.X, 12 + startPoint.Y));
454 graph.DrawRectangle(drawPen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y); 464 graph.DrawRectangle(drawPen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y);
455 } 465 }
456 startPoint.X += endPoint.X; 466 startPoint.X += endPoint.X;
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
index 79c9839..a6e3859 100644
--- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
@@ -20,8 +20,6 @@ namespace OpenSim.Region.CoreModules.World.Land
20 get { return null; } 20 get { return null; }
21 } 21 }
22 22
23 public Type ReplacableInterface { get { return null; } }
24
25 private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>(); 23 private Dictionary<UUID, RegionConnections> m_regions = new Dictionary<UUID, RegionConnections>();
26 private bool enabledYN = false; 24 private bool enabledYN = false;
27 public void Initialise(IConfigSource source) 25 public void Initialise(IConfigSource source)
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs b/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
index ff606b1..9b1e4ca 100644
--- a/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
+++ b/OpenSim/Region/Framework/Interfaces/IRegionModuleBase.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Framework.Interfaces
47 /// has registered the interface by then, this module will be 47 /// has registered the interface by then, this module will be
48 /// activated, else it will remain inactive, letting the other module 48 /// activated, else it will remain inactive, letting the other module
49 /// take over. This should return non-null ONLY in modules that are 49 /// take over. This should return non-null ONLY in modules that are
50 /// intended to be easily replacable, e.g. stub implementations 50 /// intended to be easily replaceable, e.g. stub implementations
51 /// that the developer expects to be replaced by third party provided 51 /// that the developer expects to be replaced by third party provided
52 /// modules. 52 /// modules.
53 /// </summary> 53 /// </summary>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 0de5c9b..bca019b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -880,6 +880,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
880 return drawList; 880 return drawList;
881 } 881 }
882 882
883 public string osSetFontName(string drawList, string fontName)
884 {
885 CheckThreatLevel(ThreatLevel.None, "osSetFontName");
886
887 m_host.AddScriptLPS(1);
888 drawList += "FontName "+ fontName +"; ";
889 return drawList;
890 }
891
883 public string osSetPenSize(string drawList, int penSize) 892 public string osSetPenSize(string drawList, int penSize)
884 { 893 {
885 CheckThreatLevel(ThreatLevel.None, "osSetPenSize"); 894 CheckThreatLevel(ThreatLevel.None, "osSetPenSize");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index b129b39..49aa45a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -99,6 +99,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
99 string osDrawFilledRectangle(string drawList, int width, int height); 99 string osDrawFilledRectangle(string drawList, int width, int height);
100 string osDrawPolygon(string drawList, LSL_List x, LSL_List y); 100 string osDrawPolygon(string drawList, LSL_List x, LSL_List y);
101 string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y); 101 string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y);
102 string osSetFontName(string drawList, string fontName);
102 string osSetFontSize(string drawList, int fontSize); 103 string osSetFontSize(string drawList, int fontSize);
103 string osSetPenSize(string drawList, int penSize); 104 string osSetPenSize(string drawList, int penSize);
104 string osSetPenColour(string drawList, string colour); 105 string osSetPenColour(string drawList, string colour);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 45492dd..8f52d99 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -282,6 +282,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
282 return m_OSSL_Functions.osSetFontSize(drawList, fontSize); 282 return m_OSSL_Functions.osSetFontSize(drawList, fontSize);
283 } 283 }
284 284
285 public string osSetFontName(string drawList, string fontName)
286 {
287 return m_OSSL_Functions.osSetFontName(drawList, fontName);
288 }
289
285 public string osSetPenSize(string drawList, int penSize) 290 public string osSetPenSize(string drawList, int penSize)
286 { 291 {
287 return m_OSSL_Functions.osSetPenSize(drawList, penSize); 292 return m_OSSL_Functions.osSetPenSize(drawList, penSize);