diff options
author | Charles Krinke | 2009-04-18 17:05:51 +0000 |
---|---|---|
committer | Charles Krinke | 2009-04-18 17:05:51 +0000 |
commit | aa86305a41a0cc2e6eb956d097ba63e3fe12f7ee (patch) | |
tree | bf0d075318a888b359500ce1ae974aa2e066c8b4 /OpenSim/Region/CoreModules | |
parent | Thank you dslake for diagnosing and fixing a race condition in OGS1SecureInve... (diff) | |
download | opensim-SC_OLD-aa86305a41a0cc2e6eb956d097ba63e3fe12f7ee.zip opensim-SC_OLD-aa86305a41a0cc2e6eb956d097ba63e3fe12f7ee.tar.gz opensim-SC_OLD-aa86305a41a0cc2e6eb956d097ba63e3fe12f7ee.tar.bz2 opensim-SC_OLD-aa86305a41a0cc2e6eb956d097ba63e3fe12f7ee.tar.xz |
Thank you kindly, StrawberryFride, for a patch that:
Adds a test to see if the first option on osDynamicTextureData is "AltDelim",
then picks up the first character after the whitespace and uses as a delimiter
instead of ;. If this string does not appear at the start of the data, the
default ; will be used, hence this should not break existing code.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 4fb500e..49dcf03 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
50 | private string m_name = "VectorRenderModule"; | 50 | private string m_name = "VectorRenderModule"; |
51 | private Scene m_scene; | 51 | private Scene m_scene; |
52 | private IDynamicTextureManager m_textureManager; | 52 | private IDynamicTextureManager m_textureManager; |
53 | 53 | ||
54 | public VectorRenderModule() | 54 | public VectorRenderModule() |
55 | { | 55 | { |
56 | } | 56 | } |
@@ -152,6 +152,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
152 | int height = 256; | 152 | int height = 256; |
153 | int alpha = 255; // 0 is transparent | 153 | int alpha = 255; // 0 is transparent |
154 | Color bgColour = Color.White; // Default background color | 154 | Color bgColour = Color.White; // Default background color |
155 | char altDataDelim = ';'; | ||
155 | 156 | ||
156 | char[] paramDelimiter = { ',' }; | 157 | char[] paramDelimiter = { ',' }; |
157 | char[] nvpDelimiter = { ':' }; | 158 | char[] nvpDelimiter = { ':' }; |
@@ -248,7 +249,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
248 | { | 249 | { |
249 | bgColour = Color.FromName(value); | 250 | bgColour = Color.FromName(value); |
250 | } | 251 | } |
251 | break; | 252 | break; |
253 | case "altdatadelim": | ||
254 | altDataDelim = value.ToCharArray()[0]; | ||
255 | break; | ||
252 | case "": | 256 | case "": |
253 | // blank string has been passed do nothing just use defaults | 257 | // blank string has been passed do nothing just use defaults |
254 | break; | 258 | break; |
@@ -311,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
311 | } | 315 | } |
312 | } | 316 | } |
313 | 317 | ||
314 | GDIDraw(data, graph); | 318 | GDIDraw(data, graph, altDataDelim); |
315 | 319 | ||
316 | byte[] imageJ2000 = new byte[0]; | 320 | byte[] imageJ2000 = new byte[0]; |
317 | 321 | ||
@@ -382,7 +386,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
382 | } | 386 | } |
383 | */ | 387 | */ |
384 | 388 | ||
385 | private void GDIDraw(string data, Graphics graph) | 389 | private void GDIDraw(string data, Graphics graph, char dataDelim) |
386 | { | 390 | { |
387 | Point startPoint = new Point(0, 0); | 391 | Point startPoint = new Point(0, 0); |
388 | Point endPoint = new Point(0, 0); | 392 | Point endPoint = new Point(0, 0); |
@@ -391,7 +395,8 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
391 | float fontSize = 14; | 395 | float fontSize = 14; |
392 | Font myFont = new Font(fontName, fontSize); | 396 | Font myFont = new Font(fontName, fontSize); |
393 | SolidBrush myBrush = new SolidBrush(Color.Black); | 397 | SolidBrush myBrush = new SolidBrush(Color.Black); |
394 | char[] lineDelimiter = {';'}; | 398 | |
399 | char[] lineDelimiter = {dataDelim}; | ||
395 | char[] partsDelimiter = {','}; | 400 | char[] partsDelimiter = {','}; |
396 | string[] lines = data.Split(lineDelimiter); | 401 | string[] lines = data.Split(lineDelimiter); |
397 | 402 | ||