diff options
author | Arthur Valadares | 2009-08-28 17:48:03 -0300 |
---|---|---|
committer | Arthur Valadares | 2009-08-28 17:48:03 -0300 |
commit | 3d6edc04a309757ce025e74aaf7168ef759a2ef3 (patch) | |
tree | 2523e70e2810467561a35b6f1e04c75dbdc77e7a /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Standardize FlotsamAssetCache header (diff) | |
download | opensim-SC_OLD-3d6edc04a309757ce025e74aaf7168ef759a2ef3.zip opensim-SC_OLD-3d6edc04a309757ce025e74aaf7168ef759a2ef3.tar.gz opensim-SC_OLD-3d6edc04a309757ce025e74aaf7168ef759a2ef3.tar.bz2 opensim-SC_OLD-3d6edc04a309757ce025e74aaf7168ef759a2ef3.tar.xz |
Implements osDrawPolygon, similar to already implemented osDrawFilledPolygon
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index b1c357c..0de5c9b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -852,6 +852,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
852 | return drawList; | 852 | return drawList; |
853 | } | 853 | } |
854 | 854 | ||
855 | public string osDrawPolygon(string drawList, LSL_List x, LSL_List y) | ||
856 | { | ||
857 | CheckThreatLevel(ThreatLevel.None, "osDrawFilledPolygon"); | ||
858 | |||
859 | m_host.AddScriptLPS(1); | ||
860 | |||
861 | if (x.Length != y.Length || x.Length < 3) | ||
862 | { | ||
863 | return ""; | ||
864 | } | ||
865 | drawList += "Polygon " + x.GetLSLStringItem(0) + "," + y.GetLSLStringItem(0); | ||
866 | for (int i = 1; i < x.Length; i++) | ||
867 | { | ||
868 | drawList += "," + x.GetLSLStringItem(i) + "," + y.GetLSLStringItem(i); | ||
869 | } | ||
870 | drawList += "; "; | ||
871 | return drawList; | ||
872 | } | ||
873 | |||
855 | public string osSetFontSize(string drawList, int fontSize) | 874 | public string osSetFontSize(string drawList, int fontSize) |
856 | { | 875 | { |
857 | CheckThreatLevel(ThreatLevel.None, "osSetFontSize"); | 876 | CheckThreatLevel(ThreatLevel.None, "osSetFontSize"); |