aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJeff Ames2009-02-20 02:33:54 +0000
committerJeff Ames2009-02-20 02:33:54 +0000
commit7d4846462bf5f3c7fe862c7466d0461b6c5d228f (patch)
tree5edbd1f773a8a2a291de31b46a98a8086b0cac96 /OpenSim/Region/CoreModules
parent* Another stab at removing AssetServer.exe dependencies (diff)
downloadopensim-SC_OLD-7d4846462bf5f3c7fe862c7466d0461b6c5d228f.zip
opensim-SC_OLD-7d4846462bf5f3c7fe862c7466d0461b6c5d228f.tar.gz
opensim-SC_OLD-7d4846462bf5f3c7fe862c7466d0461b6c5d228f.tar.bz2
opensim-SC_OLD-7d4846462bf5f3c7fe862c7466d0461b6c5d228f.tar.xz
Update svn properties, add copyright headers, minor formatting cleanup.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs92
1 files changed, 43 insertions, 49 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index 86f836c..7cee0cf 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
147 int width = 256; 147 int width = 256;
148 int height = 256; 148 int height = 256;
149 int alpha = 255; // 0 is transparent 149 int alpha = 255; // 0 is transparent
150 Color bgColour = Color.White; // Default background color 150 Color bgColour = Color.White; // Default background color
151 151
152 char[] paramDelimiter = { ',' }; 152 char[] paramDelimiter = { ',' };
153 char[] nvpDelimiter = { ':' }; 153 char[] nvpDelimiter = { ':' };
@@ -230,18 +230,17 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
230 } 230 }
231 } 231 }
232 break; 232 break;
233 case "bgcolour": 233 case "bgcolour":
234 int hex = 0; 234 int hex = 0;
235 if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) 235 if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex))
236 { 236 {
237 bgColour = Color.FromArgb(hex); 237 bgColour = Color.FromArgb(hex);
238 } 238 }
239 else 239 else
240 { 240 {
241 241 bgColour = Color.FromName(value);
242 bgColour = Color.FromName(value); 242 }
243 } 243 break;
244 break;
245 case "": 244 case "":
246 // blank string has been passed do nothing just use defaults 245 // blank string has been passed do nothing just use defaults
247 break; 246 break;
@@ -271,7 +270,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
271 } 270 }
272 break; 271 break;
273 } 272 }
274
275 } 273 }
276 274
277 Bitmap bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); 275 Bitmap bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb);
@@ -282,8 +280,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
282 // background color in their scripts, only do when fully opaque 280 // background color in their scripts, only do when fully opaque
283 if (alpha == 255) 281 if (alpha == 255)
284 { 282 {
285 graph.FillRectangle(new SolidBrush(bgColour), 0, 0, width, height); 283 graph.FillRectangle(new SolidBrush(bgColour), 0, 0, width, height);
286
287 } 284 }
288 285
289 for (int w = 0; w < bitmap.Width; w++) 286 for (int w = 0; w < bitmap.Width; w++)
@@ -294,7 +291,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
294 } 291 }
295 } 292 }
296 293
297
298 GDIDraw(data, graph); 294 GDIDraw(data, graph);
299 295
300 byte[] imageJ2000 = new byte[0]; 296 byte[] imageJ2000 = new byte[0];
@@ -326,10 +322,8 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
326 } 322 }
327 323
328 return parsed; 324 return parsed;
329
330 } 325 }
331 326
332
333/* 327/*
334 private void CairoDraw(string data, System.Drawing.Graphics graph) 328 private void CairoDraw(string data, System.Drawing.Graphics graph)
335 { 329 {
@@ -462,38 +456,38 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
462 fontSize = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture); 456 fontSize = Convert.ToSingle(nextLine, CultureInfo.InvariantCulture);
463 myFont = new Font(fontName, fontSize); 457 myFont = new Font(fontName, fontSize);
464 } 458 }
465 else if (nextLine.StartsWith("FontProp")) 459 else if (nextLine.StartsWith("FontProp"))
466 { 460 {
467 nextLine = nextLine.Remove(0, 8); 461 nextLine = nextLine.Remove(0, 8);
468 nextLine = nextLine.Trim(); 462 nextLine = nextLine.Trim();
469 463
470 string [] fprops = nextLine.Split(partsDelimiter); 464 string [] fprops = nextLine.Split(partsDelimiter);
471 foreach (string prop in fprops) { 465 foreach (string prop in fprops) {
472 466
473 switch (prop) 467 switch (prop)
474 { 468 {
475 case "B": 469 case "B":
476 if(!(myFont.Bold)) 470 if (!(myFont.Bold))
477 myFont = new Font(myFont, myFont.Style | FontStyle.Bold); 471 myFont = new Font(myFont, myFont.Style | FontStyle.Bold);
478 break; 472 break;
479 case "I": 473 case "I":
480 if(!(myFont.Italic)) 474 if (!(myFont.Italic))
481 myFont = new Font(myFont, myFont.Style | FontStyle.Italic); 475 myFont = new Font(myFont, myFont.Style | FontStyle.Italic);
482 break; 476 break;
483 case "U": 477 case "U":
484 if(!(myFont.Underline)) 478 if (!(myFont.Underline))
485 myFont = new Font(myFont, myFont.Style | FontStyle.Underline); 479 myFont = new Font(myFont, myFont.Style | FontStyle.Underline);
486 break; 480 break;
487 case "S": 481 case "S":
488 if(!(myFont.Strikeout)) 482 if (!(myFont.Strikeout))
489 myFont = new Font(myFont, myFont.Style | FontStyle.Strikeout); 483 myFont = new Font(myFont, myFont.Style | FontStyle.Strikeout);
490 break; 484 break;
491 case "R": 485 case "R":
492 myFont = new Font(myFont, FontStyle.Regular); 486 myFont = new Font(myFont, FontStyle.Regular);
493 break; 487 break;
494 } 488 }
495 } 489 }
496 } 490 }
497 else if (nextLine.StartsWith("FontName")) 491 else if (nextLine.StartsWith("FontName"))
498 { 492 {
499 nextLine = nextLine.Remove(0, 8); 493 nextLine = nextLine.Remove(0, 8);