From c3dbf91152692734e46850036aae451d87eb9bae Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 24 Jun 2017 03:21:23 +0100 Subject: osDrawFilledEllipse or string comand FillEllipse identical do Ellipse one --- .../CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 11 +++++++++++ .../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 +++++ 4 files changed, 26 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index f12286d..5d4d0f5 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -625,6 +625,17 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender startPoint.X += endPoint.X; startPoint.Y += endPoint.Y; } + else if (nextLine.StartsWith("FillEllipse")) + { + float x = 0; + float y = 0; + GetParams(partsDelimiter, ref nextLine, 11, ref x, ref y); + endPoint.X = (int)x; + endPoint.Y = (int)y; + graph.FillEllipse(myBrush, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y); + startPoint.X += endPoint.X; + startPoint.Y += endPoint.Y; + } else if (nextLine.StartsWith("FontSize")) { nextLine = nextLine.Remove(0, 8); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e51a078..37f8970 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1191,6 +1191,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return drawList; } + public string osDrawFilledEllipse(string drawList, int width, int height) + { + CheckThreatLevel(ThreatLevel.None, "osDrawFilledEllipse"); + + m_host.AddScriptLPS(1); + drawList += "FillEllipse " + width + "," + height + "; "; + return drawList; + } + public string osDrawRectangle(string drawList, int width, int height) { CheckThreatLevel(ThreatLevel.None, "osDrawRectangle"); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index bd5d008..da3d6de 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -222,6 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces string osDrawLine(string drawList, int endX, int endY); string osDrawText(string drawList, string text); string osDrawEllipse(string drawList, int width, int height); + string osDrawFilledEllipse(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); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 9eac114..1451efc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -355,6 +355,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osDrawEllipse(drawList, width, height); } + public string osDrawFilledEllipse(string drawList, int width, int height) + { + return m_OSSL_Functions.osDrawFilledEllipse(drawList, width, height); + } + public string osDrawRectangle(string drawList, int width, int height) { return m_OSSL_Functions.osDrawRectangle(drawList, width, height); -- cgit v1.1