From efb287f28f89eee06c6b90ad13297a2d33058409 Mon Sep 17 00:00:00 2001 From: Arthur Valadares Date: Tue, 25 Aug 2009 10:32:45 -0300 Subject: 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. --- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 +++++++++ OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 + OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 5 +++++ 3 files changed, 15 insertions(+) (limited to 'OpenSim/Region/ScriptEngine') 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 return drawList; } + public string osSetPenCap(string drawList, string direction, string type) + { + CheckThreatLevel(ThreatLevel.None, "osSetPenColour"); + + m_host.AddScriptLPS(1); + drawList += "PenCap " + direction + "," + type + "; "; + return drawList; + } + public string osDrawImage(string drawList, int width, int height, string imageUrl) { 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 string osSetFontSize(string drawList, int fontSize); string osSetPenSize(string drawList, int penSize); string osSetPenColour(string drawList, string colour); + string osSetPenCap(string drawList, string direction, string type); string osDrawImage(string drawList, int width, int height, string imageUrl); vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize); 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 return m_OSSL_Functions.osSetPenSize(drawList, penSize); } + public string osSetPenCap(string drawList, string direction, string type) + { + return m_OSSL_Functions.osSetPenCap(drawList, direction, type); + } + public string osSetPenColour(string drawList, string colour) { return m_OSSL_Functions.osSetPenColour(drawList, colour); -- cgit v1.1