Thank you kindly, StrawberryFride, for a patch that:
Adds a test to see if the first option on osDynamicTextureData is "AltDelim", then picks up the first character after the whitespace and uses as a delimiter instead of ;. If this string does not appear at the start of the data, the default ; will be used, hence this should not break existing code.0.6.5-rc1
parent
8e08dd20dc
commit
aa86305a41
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
private string m_name = "VectorRenderModule";
|
private string m_name = "VectorRenderModule";
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
private IDynamicTextureManager m_textureManager;
|
private IDynamicTextureManager m_textureManager;
|
||||||
|
|
||||||
public VectorRenderModule()
|
public VectorRenderModule()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -152,6 +152,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
int height = 256;
|
int height = 256;
|
||||||
int alpha = 255; // 0 is transparent
|
int alpha = 255; // 0 is transparent
|
||||||
Color bgColour = Color.White; // Default background color
|
Color bgColour = Color.White; // Default background color
|
||||||
|
char altDataDelim = ';';
|
||||||
|
|
||||||
char[] paramDelimiter = { ',' };
|
char[] paramDelimiter = { ',' };
|
||||||
char[] nvpDelimiter = { ':' };
|
char[] nvpDelimiter = { ':' };
|
||||||
|
@ -248,7 +249,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
{
|
{
|
||||||
bgColour = Color.FromName(value);
|
bgColour = Color.FromName(value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "altdatadelim":
|
||||||
|
altDataDelim = value.ToCharArray()[0];
|
||||||
|
break;
|
||||||
case "":
|
case "":
|
||||||
// blank string has been passed do nothing just use defaults
|
// blank string has been passed do nothing just use defaults
|
||||||
break;
|
break;
|
||||||
|
@ -311,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GDIDraw(data, graph);
|
GDIDraw(data, graph, altDataDelim);
|
||||||
|
|
||||||
byte[] imageJ2000 = new byte[0];
|
byte[] imageJ2000 = new byte[0];
|
||||||
|
|
||||||
|
@ -382,7 +386,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private void GDIDraw(string data, Graphics graph)
|
private void GDIDraw(string data, Graphics graph, char dataDelim)
|
||||||
{
|
{
|
||||||
Point startPoint = new Point(0, 0);
|
Point startPoint = new Point(0, 0);
|
||||||
Point endPoint = new Point(0, 0);
|
Point endPoint = new Point(0, 0);
|
||||||
|
@ -391,7 +395,8 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||||
float fontSize = 14;
|
float fontSize = 14;
|
||||||
Font myFont = new Font(fontName, fontSize);
|
Font myFont = new Font(fontName, fontSize);
|
||||||
SolidBrush myBrush = new SolidBrush(Color.Black);
|
SolidBrush myBrush = new SolidBrush(Color.Black);
|
||||||
char[] lineDelimiter = {';'};
|
|
||||||
|
char[] lineDelimiter = {dataDelim};
|
||||||
char[] partsDelimiter = {','};
|
char[] partsDelimiter = {','};
|
||||||
string[] lines = data.Split(lineDelimiter);
|
string[] lines = data.Split(lineDelimiter);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue