aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorArthur Valadares2009-08-25 10:32:45 -0300
committerArthur Valadares2009-08-25 10:32:45 -0300
commitefb287f28f89eee06c6b90ad13297a2d33058409 (patch)
tree89c52c4babfd581f06a98f58de5763c193a710b5 /OpenSim/Region/ScriptEngine
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim into arthursv (diff)
downloadopensim-SC-efb287f28f89eee06c6b90ad13297a2d33058409.zip
opensim-SC-efb287f28f89eee06c6b90ad13297a2d33058409.tar.gz
opensim-SC-efb287f28f89eee06c6b90ad13297a2d33058409.tar.bz2
opensim-SC-efb287f28f89eee06c6b90ad13297a2d33058409.tar.xz
Implemented osPenCap, that sets EndCap and StartCap to Pen. This allows using arrow, diamond, round and flat caps.
* Made image request safer, if it can't find an image for any reason, draws a square where the image should be and a message alerting the user.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
3 files changed, 15 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 b40e441..b1c357c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -879,6 +879,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
879 return drawList; 879 return drawList;
880 } 880 }
881 881
882 public string osSetPenCap(string drawList, string direction, string type)
883 {
884 CheckThreatLevel(ThreatLevel.None, "osSetPenColour");
885
886 m_host.AddScriptLPS(1);
887 drawList += "PenCap " + direction + "," + type + "; ";
888 return drawList;
889 }
890
882 public string osDrawImage(string drawList, int width, int height, string imageUrl) 891 public string osDrawImage(string drawList, int width, int height, string imageUrl)
883 { 892 {
884 CheckThreatLevel(ThreatLevel.None, "osDrawImage"); 893 CheckThreatLevel(ThreatLevel.None, "osDrawImage");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 202bf41..2365bee 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -101,6 +101,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
101 string osSetFontSize(string drawList, int fontSize); 101 string osSetFontSize(string drawList, int fontSize);
102 string osSetPenSize(string drawList, int penSize); 102 string osSetPenSize(string drawList, int penSize);
103 string osSetPenColour(string drawList, string colour); 103 string osSetPenColour(string drawList, string colour);
104 string osSetPenCap(string drawList, string direction, string type);
104 string osDrawImage(string drawList, int width, int height, string imageUrl); 105 string osDrawImage(string drawList, int width, int height, string imageUrl);
105 vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize); 106 vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize);
106 void osSetStateEvents(int events); 107 void osSetStateEvents(int events);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index b6bfb43..f877acb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -282,6 +282,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
282 return m_OSSL_Functions.osSetPenSize(drawList, penSize); 282 return m_OSSL_Functions.osSetPenSize(drawList, penSize);
283 } 283 }
284 284
285 public string osSetPenCap(string drawList, string direction, string type)
286 {
287 return m_OSSL_Functions.osSetPenCap(drawList, direction, type);
288 }
289
285 public string osSetPenColour(string drawList, string colour) 290 public string osSetPenColour(string drawList, string colour)
286 { 291 {
287 return m_OSSL_Functions.osSetPenColour(drawList, colour); 292 return m_OSSL_Functions.osSetPenColour(drawList, colour);