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

This commit is contained in:
MW
2008-03-08 22:06:24 +00:00
parent 6eeb25ee33
commit 52d867e600

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