aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMW2008-03-15 13:52:57 +0000
committerMW2008-03-15 13:52:57 +0000
commit58ce8f3818ec07267a62b7731d206549c10e4ca8 (patch)
treeabc4b8db62e0d69487077060ca181b5e69c6fd04 /OpenSim/Region
parentPart 2 of fixing inventory for client 1.19.1 (RC), inventory items should now... (diff)
downloadopensim-SC-58ce8f3818ec07267a62b7731d206549c10e4ca8.zip
opensim-SC-58ce8f3818ec07267a62b7731d206549c10e4ca8.tar.gz
opensim-SC-58ce8f3818ec07267a62b7731d206549c10e4ca8.tar.bz2
opensim-SC-58ce8f3818ec07267a62b7731d206549c10e4ca8.tar.xz
added some os helper functions for the texture drawing module. see http://opensimulator.org/wiki/OSSL_TextureDrawing for function prototypes and example script. Will expand that page later.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs60
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs67
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs13
3 files changed, 140 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
index 05a1a1d..957f55c 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
@@ -1902,6 +1902,66 @@ namespace OpenSim.Region.ScriptEngine.Common
1902 m_LSL_Functions.osSetPrimFloatOnWater(floatYN); 1902 m_LSL_Functions.osSetPrimFloatOnWater(floatYN);
1903 } 1903 }
1904 1904
1905 //Texture Draw functions
1906
1907 public string osMovePen(string drawList, int x, int y)
1908 {
1909 return m_LSL_Functions.osMovePen(drawList, x, y);
1910 }
1911
1912 public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
1913 {
1914 return m_LSL_Functions.osDrawLine(drawList, startX, startY, endX, endY);
1915 }
1916
1917 public string osDrawLine(string drawList, int endX, int endY)
1918 {
1919 return m_LSL_Functions.osDrawLine(drawList, endX, endY);
1920 }
1921
1922 public string osDrawText(string drawList, string text)
1923 {
1924 return m_LSL_Functions.osDrawText(drawList, text);
1925 }
1926
1927 public string osDrawEllipse(string drawList, int width, int height)
1928 {
1929 return m_LSL_Functions.osDrawEllipse(drawList, width, height);
1930 }
1931
1932 public string osDrawRectangle(string drawList, int width, int height)
1933 {
1934 return osDrawRectangle(drawList, width, height);
1935 }
1936
1937 public string osDrawFilledRectangle(string drawList, int width, int height)
1938 {
1939 return osDrawFilledRectangle(drawList, width, height);
1940 }
1941
1942 public string osSetFontSize(string drawList, int fontSize)
1943 {
1944 return m_LSL_Functions.osSetFontSize(drawList, fontSize);
1945 }
1946
1947 public string osSetPenSize(string drawList, int penSize)
1948 {
1949 return m_LSL_Functions.osSetPenSize(drawList, penSize);
1950 }
1951
1952 public string osSetPenColour(string drawList, string colour)
1953 {
1954 return m_LSL_Functions.osSetPenColour(drawList, colour);
1955 }
1956
1957 public string osDrawImage(string drawList, int width, int height, string imageUrl)
1958 {
1959 return m_LSL_Functions.osDrawImage(drawList, width, height, imageUrl);
1960 }
1961
1962
1963 //
1964
1905 public double llList2Float(LSL_Types.list src, int index) 1965 public double llList2Float(LSL_Types.list src, int index)
1906 { 1966 {
1907 return m_LSL_Functions.llList2Float(src, index); 1967 return m_LSL_Functions.llList2Float(src, index);
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index ab7519e..daf5e21 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4425,6 +4425,73 @@ namespace OpenSim.Region.ScriptEngine.Common
4425 } 4425 }
4426 } 4426 }
4427 4427
4428 //Texture draw functions
4429 public string osMovePen(string drawList, int x, int y)
4430 {
4431 drawList += "MoveTo " + x + "," + y + ";";
4432 return drawList;
4433 }
4434
4435 public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
4436 {
4437 drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; ";
4438 return drawList;
4439 }
4440
4441 public string osDrawLine(string drawList, int endX, int endY)
4442 {
4443 drawList += "LineTo " + endX + "," + endY + "; ";
4444 return drawList;
4445 }
4446
4447 public string osDrawText(string drawList, string text)
4448 {
4449 drawList += "Text " + text + "; ";
4450 return drawList;
4451 }
4452
4453 public string osDrawEllipse(string drawList, int width, int height)
4454 {
4455 drawList += "Ellipse " + width + "," + height + "; ";
4456 return drawList;
4457 }
4458
4459 public string osDrawRectangle(string drawList, int width, int height)
4460 {
4461 drawList += "Rectangle " + width + "," + height + "; ";
4462 return drawList;
4463 }
4464
4465 public string osDrawFilledRectangle(string drawList, int width, int height)
4466 {
4467 drawList += "FillRectangle " + width + "," + height + "; ";
4468 return drawList;
4469 }
4470
4471 public string osSetFontSize(string drawList, int fontSize)
4472 {
4473 drawList += "FontSize "+ fontSize +"; ";
4474 return drawList;
4475 }
4476
4477 public string osSetPenSize(string drawList, int penSize)
4478 {
4479 drawList += "PenSize " + penSize + "; ";
4480 return drawList;
4481 }
4482
4483 public string osSetPenColour(string drawList, string colour)
4484 {
4485 drawList += "PenColour " + colour + "; ";
4486 return drawList;
4487 }
4488
4489 public string osDrawImage(string drawList, int width, int height, string imageUrl)
4490 {
4491 drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ;
4492 return drawList;
4493 }
4494
4428 private void NotImplemented(string command) 4495 private void NotImplemented(string command)
4429 { 4496 {
4430 m_host.AddScriptLPS(1); 4497 m_host.AddScriptLPS(1);
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
index 381ca62..e0c35f0 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
@@ -650,5 +650,18 @@ namespace OpenSim.Region.ScriptEngine.Common
650 void osSetParcelMediaURL(string url); 650 void osSetParcelMediaURL(string url);
651 void osSetPrimFloatOnWater(int floatYN); 651 void osSetPrimFloatOnWater(int floatYN);
652 652
653 //texture draw functions
654 string osMovePen(string drawList, int x, int y);
655 string osDrawLine(string drawList, int startX, int startY, int endX, int endY);
656 string osDrawLine(string drawList, int endX, int endY);
657 string osDrawText(string drawList, string text);
658 string osDrawEllipse(string drawList, int width, int height);
659 string osDrawRectangle(string drawList, int width, int height);
660 string osDrawFilledRectangle(string drawList, int width, int height);
661 string osSetFontSize(string drawList, int fontSize);
662 string osSetPenSize(string drawList, int penSize);
663 string osSetPenColour(string drawList, string colour);
664 string osDrawImage(string drawList, int width, int height, string imageUrl);
665
653 } 666 }
654} 667}