aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting
diff options
context:
space:
mode:
authorMelanie2012-09-29 19:21:07 +0100
committerMelanie2012-09-29 19:21:07 +0100
commit71dd55a1ce8560dba3fbab76e25bbeaf974f422a (patch)
treeb1c3759d25e29b8ab9b2c61da3f408c6aa7803f4 /OpenSim/Region/CoreModules/Scripting
parentMerge branch 'avination' into careminster (diff)
parentGet rid of some unnecessary casts in RemoteAdminPlugin. (diff)
downloadopensim-SC-71dd55a1ce8560dba3fbab76e25bbeaf974f422a.zip
opensim-SC-71dd55a1ce8560dba3fbab76e25bbeaf974f422a.tar.gz
opensim-SC-71dd55a1ce8560dba3fbab76e25bbeaf974f422a.tar.bz2
opensim-SC-71dd55a1ce8560dba3fbab76e25bbeaf974f422a.tar.xz
Merge branch 'master' into careminster
Conflicts: CONTRIBUTORS.txt OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index 1e17b02..673c2d1 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -112,14 +112,19 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
112 public void GetDrawStringSize(string text, string fontName, int fontSize, 112 public void GetDrawStringSize(string text, string fontName, int fontSize,
113 out double xSize, out double ySize) 113 out double xSize, out double ySize)
114 { 114 {
115 using (Font myFont = new Font(fontName, fontSize)) 115 lock (this)
116 { 116 {
117 SizeF stringSize = new SizeF(); 117 using (Font myFont = new Font(fontName, fontSize))
118 lock (m_graph)
119 { 118 {
120 stringSize = m_graph.MeasureString(text, myFont); 119 SizeF stringSize = new SizeF();
121 xSize = stringSize.Width; 120
122 ySize = stringSize.Height; 121 // XXX: This lock may be unnecessary.
122 lock (m_graph)
123 {
124 stringSize = m_graph.MeasureString(text, myFont);
125 xSize = stringSize.Width;
126 ySize = stringSize.Height;
127 }
123 } 128 }
124 } 129 }
125 } 130 }