diff options
author | Marck | 2010-12-10 22:13:05 +0100 |
---|---|---|
committer | Marck | 2010-12-10 22:20:35 +0100 |
commit | b512ecd1dc538f029e6772f526db78eb6687d938 (patch) | |
tree | 4796be07591156845a0cb94f4bcc77b27a4fcee2 /OpenSim/Region/CoreModules | |
parent | Revert "A stab at mantis #5256. Separate ScenePresence updates from SceneObje... (diff) | |
download | opensim-SC_OLD-b512ecd1dc538f029e6772f526db78eb6687d938.zip opensim-SC_OLD-b512ecd1dc538f029e6772f526db78eb6687d938.tar.gz opensim-SC_OLD-b512ecd1dc538f029e6772f526db78eb6687d938.tar.bz2 opensim-SC_OLD-b512ecd1dc538f029e6772f526db78eb6687d938.tar.xz |
Normalization of OSSL function names.
Added the following replacement functions for compliance to the OSSL standards stated on the wiki:
osGetTerrainHeight
osSetTerrainHeight
osGetSunParam
osSetSunParam
osSetPenColor
The functions that do not comply to the standard give a warning when used but work normally otherwise.
The graphics primitive drawing command "PenColor" has also been added as well as dynamic texture parameter "bgcolor" as an alternative to "bgcolour".
The following two functions have been renamed because they are not enabled yet aynway:
osWindParamSet => osSetWindParam
osWindParamGet => osGetWindParam
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 3291be4..7316e5b 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | |||
@@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
165 | int width = 256; | 165 | int width = 256; |
166 | int height = 256; | 166 | int height = 256; |
167 | int alpha = 255; // 0 is transparent | 167 | int alpha = 255; // 0 is transparent |
168 | Color bgColour = Color.White; // Default background color | 168 | Color bgColor = Color.White; // Default background color |
169 | char altDataDelim = ';'; | 169 | char altDataDelim = ';'; |
170 | 170 | ||
171 | char[] paramDelimiter = { ',' }; | 171 | char[] paramDelimiter = { ',' }; |
@@ -253,15 +253,16 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
253 | alpha = 256; | 253 | alpha = 256; |
254 | } | 254 | } |
255 | break; | 255 | break; |
256 | case "bgcolor": | ||
256 | case "bgcolour": | 257 | case "bgcolour": |
257 | int hex = 0; | 258 | int hex = 0; |
258 | if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) | 259 | if (Int32.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) |
259 | { | 260 | { |
260 | bgColour = Color.FromArgb(hex); | 261 | bgColor = Color.FromArgb(hex); |
261 | } | 262 | } |
262 | else | 263 | else |
263 | { | 264 | { |
264 | bgColour = Color.FromName(value); | 265 | bgColor = Color.FromName(value); |
265 | } | 266 | } |
266 | break; | 267 | break; |
267 | case "altdatadelim": | 268 | case "altdatadelim": |
@@ -315,7 +316,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
315 | // background color in their scripts, only do when fully opaque | 316 | // background color in their scripts, only do when fully opaque |
316 | if (alpha >= 255) | 317 | if (alpha >= 255) |
317 | { | 318 | { |
318 | graph.FillRectangle(new SolidBrush(bgColour), 0, 0, width, height); | 319 | graph.FillRectangle(new SolidBrush(bgColor), 0, 0, width, height); |
319 | } | 320 | } |
320 | 321 | ||
321 | for (int w = 0; w < bitmap.Width; w++) | 322 | for (int w = 0; w < bitmap.Width; w++) |
@@ -616,25 +617,25 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
616 | } | 617 | } |
617 | } | 618 | } |
618 | } | 619 | } |
619 | else if (nextLine.StartsWith("PenColour")) | 620 | else if (nextLine.StartsWith("PenColour") || nextLine.StartsWith("PenColor")) |
620 | { | 621 | { |
621 | nextLine = nextLine.Remove(0, 9); | 622 | nextLine = nextLine.Remove(0, 9); |
622 | nextLine = nextLine.Trim(); | 623 | nextLine = nextLine.Trim(); |
623 | int hex = 0; | 624 | int hex = 0; |
624 | 625 | ||
625 | Color newColour; | 626 | Color newColor; |
626 | if (Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) | 627 | if (Int32.TryParse(nextLine, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hex)) |
627 | { | 628 | { |
628 | newColour = Color.FromArgb(hex); | 629 | newColor = Color.FromArgb(hex); |
629 | } | 630 | } |
630 | else | 631 | else |
631 | { | 632 | { |
632 | // this doesn't fail, it just returns black if nothing is found | 633 | // this doesn't fail, it just returns black if nothing is found |
633 | newColour = Color.FromName(nextLine); | 634 | newColor = Color.FromName(nextLine); |
634 | } | 635 | } |
635 | 636 | ||
636 | myBrush.Color = newColour; | 637 | myBrush.Color = newColor; |
637 | drawPen.Color = newColour; | 638 | drawPen.Color = newColor; |
638 | } | 639 | } |
639 | } | 640 | } |
640 | } | 641 | } |