Implements osDrawPolygon, similar to already implemented osDrawFilledPolygon

This commit is contained in:
Arthur Valadares
2009-08-28 17:48:03 -03:00
parent 33004b613d
commit 3d6edc04a3
4 changed files with 31 additions and 0 deletions

View File

@@ -852,6 +852,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return drawList;
}
public string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
{
CheckThreatLevel(ThreatLevel.None, "osDrawFilledPolygon");
m_host.AddScriptLPS(1);
if (x.Length != y.Length || x.Length < 3)
{
return "";
}
drawList += "Polygon " + x.GetLSLStringItem(0) + "," + y.GetLSLStringItem(0);
for (int i = 1; i < x.Length; i++)
{
drawList += "," + x.GetLSLStringItem(i) + "," + y.GetLSLStringItem(i);
}
drawList += "; ";
return drawList;
}
public string osSetFontSize(string drawList, int fontSize)
{
CheckThreatLevel(ThreatLevel.None, "osSetFontSize");