From 52d867e600a3afab691888031fdde764c41f0000 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 8 Mar 2008 22:06:24 +0000 Subject: [PATCH] Added new drawing command "PenColour", with format "PenColour ;" colour name can be any of the predefined .net System.Drawing.Color names. --- .../Environment/Modules/VectorRenderModule.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs index d03317098d..6b80eb146d 100644 --- a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs @@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules foreach (string line in lines) { string nextLine = line.Trim(); - + //replace with switch, or even better, do some proper parsing if (nextLine.StartsWith("MoveTo")) { float x = 0; @@ -225,6 +225,17 @@ namespace OpenSim.Region.Environment.Modules float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); drawPen.Width = size; } + else if (nextLine.StartsWith("PenColour")) + { + nextLine = nextLine.Remove(0, 9); + nextLine = nextLine.Trim(); + Color newColour = Color.FromName(nextLine); + if (newColour != null) + { + myBrush.Color = newColour; + drawPen.Color = newColour; + } + } } }