diff options
author | Arthur Valadares | 2009-08-21 21:12:22 -0300 |
---|---|---|
committer | Arthur Valadares | 2009-08-21 21:12:22 -0300 |
commit | 7923fd29a019eae168b6793ed6e388bc27bc288e (patch) | |
tree | fda1b25c9f53afe3fa4aa2ca55a3ca3d648b6764 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Fix issue where conversion of temporary boolean variable fails on MySQL (diff) | |
download | opensim-SC_OLD-7923fd29a019eae168b6793ed6e388bc27bc288e.zip opensim-SC_OLD-7923fd29a019eae168b6793ed6e388bc27bc288e.tar.gz opensim-SC_OLD-7923fd29a019eae168b6793ed6e388bc27bc288e.tar.bz2 opensim-SC_OLD-7923fd29a019eae168b6793ed6e388bc27bc288e.tar.xz |
Adds osDrawPolygon to OSSL. Works a little different then other OS Drawing functions, this one has no start and end point, but a number of points that will form the desired polygon. Only FilledPolygon implemented so far.
* Also added some LSL transparent type conversion, as it's done in LSL scripting (string to integer, float to string, etc)
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 6190349..b40e441 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -833,6 +833,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
833 | return drawList; | 833 | return drawList; |
834 | } | 834 | } |
835 | 835 | ||
836 | public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y) | ||
837 | { | ||
838 | CheckThreatLevel(ThreatLevel.None, "osDrawFilledPolygon"); | ||
839 | |||
840 | m_host.AddScriptLPS(1); | ||
841 | |||
842 | if (x.Length != y.Length || x.Length < 3) | ||
843 | { | ||
844 | return ""; | ||
845 | } | ||
846 | drawList += "FillPolygon " + x.GetLSLStringItem(0) + "," + y.GetLSLStringItem(0); | ||
847 | for (int i = 1; i < x.Length; i++) | ||
848 | { | ||
849 | drawList += "," + x.GetLSLStringItem(i) + "," + y.GetLSLStringItem(i); | ||
850 | } | ||
851 | drawList += "; "; | ||
852 | return drawList; | ||
853 | } | ||
854 | |||
836 | public string osSetFontSize(string drawList, int fontSize) | 855 | public string osSetFontSize(string drawList, int fontSize) |
837 | { | 856 | { |
838 | CheckThreatLevel(ThreatLevel.None, "osSetFontSize"); | 857 | CheckThreatLevel(ThreatLevel.None, "osSetFontSize"); |