mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +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");
|
||||
|
||||
@@ -97,6 +97,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
string osDrawEllipse(string drawList, int width, int height);
|
||||
string osDrawRectangle(string drawList, int width, int height);
|
||||
string osDrawFilledRectangle(string drawList, int width, int height);
|
||||
string osDrawPolygon(string drawList, LSL_List x, LSL_List y);
|
||||
string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y);
|
||||
string osSetFontSize(string drawList, int fontSize);
|
||||
string osSetPenSize(string drawList, int penSize);
|
||||
|
||||
@@ -267,6 +267,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osDrawFilledRectangle(drawList, width, height);
|
||||
}
|
||||
|
||||
public string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
|
||||
{
|
||||
return m_OSSL_Functions.osDrawPolygon(drawList, x, y);
|
||||
}
|
||||
|
||||
public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y)
|
||||
{
|
||||
return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y);
|
||||
|
||||
Reference in New Issue
Block a user