aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index e83b1a8..bf275fa 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,12 @@ 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 }
126 } 133 }
127 134
128 public void PostInitialise() 135 public void PostInitialise()
@@ -397,7 +404,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
397 Point startPoint = new Point(0, 0); 404 Point startPoint = new Point(0, 0);
398 Point endPoint = new Point(0, 0); 405 Point endPoint = new Point(0, 0);
399 Pen drawPen = new Pen(Color.Black, 7); 406 Pen drawPen = new Pen(Color.Black, 7);
400 string fontName = "Arial"; 407 string fontName = m_fontName;
401 float fontSize = 14; 408 float fontSize = 14;
402 Font myFont = new Font(fontName, fontSize); 409 Font myFont = new Font(fontName, fontSize);
403 SolidBrush myBrush = new SolidBrush(Color.Black); 410 SolidBrush myBrush = new SolidBrush(Color.Black);
@@ -449,8 +456,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
449 } 456 }
450 else 457 else
451 { 458 {
452 graph.DrawString("URL couldn't be resolved or is", new Font("Arial",6), myBrush, startPoint); 459 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)); 460 myBrush, startPoint);
461 graph.DrawString("not an image. Please check URL.", new Font(m_fontName, 6),
462 myBrush, new Point(startPoint.X, 12 + startPoint.Y));
454 graph.DrawRectangle(drawPen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y); 463 graph.DrawRectangle(drawPen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y);
455 } 464 }
456 startPoint.X += endPoint.X; 465 startPoint.X += endPoint.X;