diff options
author | MW | 2008-03-08 22:06:24 +0000 |
---|---|---|
committer | MW | 2008-03-08 22:06:24 +0000 |
commit | 52d867e600a3afab691888031fdde764c41f0000 (patch) | |
tree | c8454e5b2b649099344d684f7f247a94570bf3be /OpenSim | |
parent | * Slight tweak for the above. (diff) | |
download | opensim-SC_OLD-52d867e600a3afab691888031fdde764c41f0000.zip opensim-SC_OLD-52d867e600a3afab691888031fdde764c41f0000.tar.gz opensim-SC_OLD-52d867e600a3afab691888031fdde764c41f0000.tar.bz2 opensim-SC_OLD-52d867e600a3afab691888031fdde764c41f0000.tar.xz |
Added new drawing command "PenColour", with format "PenColour <colourname>;" colour name can be any of the predefined .net System.Drawing.Color names.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/VectorRenderModule.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs index d033170..6b80eb1 100644 --- a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules | |||
140 | foreach (string line in lines) | 140 | foreach (string line in lines) |
141 | { | 141 | { |
142 | string nextLine = line.Trim(); | 142 | string nextLine = line.Trim(); |
143 | 143 | //replace with switch, or even better, do some proper parsing | |
144 | if (nextLine.StartsWith("MoveTo")) | 144 | if (nextLine.StartsWith("MoveTo")) |
145 | { | 145 | { |
146 | float x = 0; | 146 | float x = 0; |
@@ -225,6 +225,17 @@ namespace OpenSim.Region.Environment.Modules | |||
225 | float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); | 225 | float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); |
226 | drawPen.Width = size; | 226 | drawPen.Width = size; |
227 | } | 227 | } |
228 | else if (nextLine.StartsWith("PenColour")) | ||
229 | { | ||
230 | nextLine = nextLine.Remove(0, 9); | ||
231 | nextLine = nextLine.Trim(); | ||
232 | Color newColour = Color.FromName(nextLine); | ||
233 | if (newColour != null) | ||
234 | { | ||
235 | myBrush.Color = newColour; | ||
236 | drawPen.Color = newColour; | ||
237 | } | ||
238 | } | ||
228 | } | 239 | } |
229 | } | 240 | } |
230 | 241 | ||