From eb7715e2f8f18dedd850bba990e77fa06d7641fd Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 30 Jan 2019 00:12:46 +0000 Subject: a few changes to last commits --- .../Scripting/VectorRender/VectorRenderModule.cs | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/CoreModules/Scripting') diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index c9423f0..aabf674 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -504,10 +504,24 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender foreach (string line in GetLines(data, dataDelim)) { - string nextLine = line.Trim(); + string nextLine = line.TrimStart(); // m_log.DebugFormat("[VECTOR RENDER MODULE]: Processing line '{0}'", nextLine); + if (nextLine.StartsWith("Text") && nextLine.Length > 5) + { + int start = 4; + if (nextLine[4] == ' ') + start++; + if (start < nextLine.Length) + { + nextLine = nextLine.Substring(start); + graph.DrawString(nextLine, myFont, myBrush, startPoint); + } + continue; + } + + nextLine = nextLine.TrimEnd(); if (nextLine.StartsWith("ResetTransf")) { graph.ResetTransform(); @@ -552,14 +566,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender startPoint.X = endPoint.X; startPoint.Y = endPoint.Y; } - else if (nextLine.StartsWith("Text")) - { - int start = 4; - if(nextLine[4] == ' ') - start++; - nextLine = nextLine.Substring(start); - graph.DrawString(nextLine, myFont, myBrush, startPoint); - } else if (nextLine.StartsWith("Image")) { // We cannot reuse any generated texture involving fetching an image via HTTP since that image -- cgit v1.1