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.
parent
c04899b60a
commit
58ce8f3818
|
@ -1902,6 +1902,66 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
m_LSL_Functions.osSetPrimFloatOnWater(floatYN);
|
||||
}
|
||||
|
||||
//Texture Draw functions
|
||||
|
||||
public string osMovePen(string drawList, int x, int y)
|
||||
{
|
||||
return m_LSL_Functions.osMovePen(drawList, x, y);
|
||||
}
|
||||
|
||||
public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
|
||||
{
|
||||
return m_LSL_Functions.osDrawLine(drawList, startX, startY, endX, endY);
|
||||
}
|
||||
|
||||
public string osDrawLine(string drawList, int endX, int endY)
|
||||
{
|
||||
return m_LSL_Functions.osDrawLine(drawList, endX, endY);
|
||||
}
|
||||
|
||||
public string osDrawText(string drawList, string text)
|
||||
{
|
||||
return m_LSL_Functions.osDrawText(drawList, text);
|
||||
}
|
||||
|
||||
public string osDrawEllipse(string drawList, int width, int height)
|
||||
{
|
||||
return m_LSL_Functions.osDrawEllipse(drawList, width, height);
|
||||
}
|
||||
|
||||
public string osDrawRectangle(string drawList, int width, int height)
|
||||
{
|
||||
return osDrawRectangle(drawList, width, height);
|
||||
}
|
||||
|
||||
public string osDrawFilledRectangle(string drawList, int width, int height)
|
||||
{
|
||||
return osDrawFilledRectangle(drawList, width, height);
|
||||
}
|
||||
|
||||
public string osSetFontSize(string drawList, int fontSize)
|
||||
{
|
||||
return m_LSL_Functions.osSetFontSize(drawList, fontSize);
|
||||
}
|
||||
|
||||
public string osSetPenSize(string drawList, int penSize)
|
||||
{
|
||||
return m_LSL_Functions.osSetPenSize(drawList, penSize);
|
||||
}
|
||||
|
||||
public string osSetPenColour(string drawList, string colour)
|
||||
{
|
||||
return m_LSL_Functions.osSetPenColour(drawList, colour);
|
||||
}
|
||||
|
||||
public string osDrawImage(string drawList, int width, int height, string imageUrl)
|
||||
{
|
||||
return m_LSL_Functions.osDrawImage(drawList, width, height, imageUrl);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
public double llList2Float(LSL_Types.list src, int index)
|
||||
{
|
||||
return m_LSL_Functions.llList2Float(src, index);
|
||||
|
|
|
@ -4425,6 +4425,73 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
}
|
||||
}
|
||||
|
||||
//Texture draw functions
|
||||
public string osMovePen(string drawList, int x, int y)
|
||||
{
|
||||
drawList += "MoveTo " + x + "," + y + ";";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
|
||||
{
|
||||
drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osDrawLine(string drawList, int endX, int endY)
|
||||
{
|
||||
drawList += "LineTo " + endX + "," + endY + "; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osDrawText(string drawList, string text)
|
||||
{
|
||||
drawList += "Text " + text + "; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osDrawEllipse(string drawList, int width, int height)
|
||||
{
|
||||
drawList += "Ellipse " + width + "," + height + "; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osDrawRectangle(string drawList, int width, int height)
|
||||
{
|
||||
drawList += "Rectangle " + width + "," + height + "; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osDrawFilledRectangle(string drawList, int width, int height)
|
||||
{
|
||||
drawList += "FillRectangle " + width + "," + height + "; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osSetFontSize(string drawList, int fontSize)
|
||||
{
|
||||
drawList += "FontSize "+ fontSize +"; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osSetPenSize(string drawList, int penSize)
|
||||
{
|
||||
drawList += "PenSize " + penSize + "; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osSetPenColour(string drawList, string colour)
|
||||
{
|
||||
drawList += "PenColour " + colour + "; ";
|
||||
return drawList;
|
||||
}
|
||||
|
||||
public string osDrawImage(string drawList, int width, int height, string imageUrl)
|
||||
{
|
||||
drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ;
|
||||
return drawList;
|
||||
}
|
||||
|
||||
private void NotImplemented(string command)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
|
|
@ -650,5 +650,18 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
void osSetParcelMediaURL(string url);
|
||||
void osSetPrimFloatOnWater(int floatYN);
|
||||
|
||||
//texture draw functions
|
||||
string osMovePen(string drawList, int x, int y);
|
||||
string osDrawLine(string drawList, int startX, int startY, int endX, int endY);
|
||||
string osDrawLine(string drawList, int endX, int endY);
|
||||
string osDrawText(string drawList, string text);
|
||||
string osDrawEllipse(string drawList, int width, int height);
|
||||
string osDrawRectangle(string drawList, int width, int height);
|
||||
string osDrawFilledRectangle(string drawList, int width, int height);
|
||||
string osSetFontSize(string drawList, int fontSize);
|
||||
string osSetPenSize(string drawList, int penSize);
|
||||
string osSetPenColour(string drawList, string colour);
|
||||
string osDrawImage(string drawList, int width, int height, string imageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue