osDrawFilledEllipse or string comand FillEllipse identical do Ellipse one

0.9.0-post-fixes
UbitUmarov 2017-06-24 03:21:23 +01:00
parent 191661b51d
commit c3dbf91152
5 changed files with 27 additions and 0 deletions

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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);

View File

@ -68,6 +68,7 @@
; ThreatLevel None
Allow_osDrawEllipse = true
Allow_osDrawFilledEllipse = true
Allow_osDrawFilledPolygon = true
Allow_osDrawFilledRectangle = true
Allow_osDrawImage = true