Added new drawing command "PenColour", with format "PenColour <colourname>;" colour name can be any of the predefined .net System.Drawing.Color names.
parent
6eeb25ee33
commit
52d867e600
|
@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
foreach (string line in lines)
|
foreach (string line in lines)
|
||||||
{
|
{
|
||||||
string nextLine = line.Trim();
|
string nextLine = line.Trim();
|
||||||
|
//replace with switch, or even better, do some proper parsing
|
||||||
if (nextLine.StartsWith("MoveTo"))
|
if (nextLine.StartsWith("MoveTo"))
|
||||||
{
|
{
|
||||||
float x = 0;
|
float x = 0;
|
||||||
|
@ -225,6 +225,17 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture);
|
float size = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture);
|
||||||
drawPen.Width = size;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue