Added new drawing command "PenColour", with format "PenColour <colourname>;" colour name can be any of the predefined .net System.Drawing.Color names.

0.6.0-stable
MW 2008-03-08 22:06:24 +00:00
parent 6eeb25ee33
commit 52d867e600
1 changed files with 12 additions and 1 deletions

View File

@ -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;
}
}
}
}