mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Implements osDrawPolygon, similar to already implemented osDrawFilledPolygon
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user