aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2018-04-27 22:30:47 +0100
committerUbitUmarov2018-04-27 22:30:47 +0100
commitc6c386cd806cfe27f79ce5ad4333272a81b16afd (patch)
tree63cedab736b9753ff91f0df5b4bffb9efac10b4c /OpenSim/Region/CoreModules
parentDo dispose and new Font only once when handling FontProp drawing command. (diff)
downloadopensim-SC-c6c386cd806cfe27f79ce5ad4333272a81b16afd.zip
opensim-SC-c6c386cd806cfe27f79ce5ad4333272a81b16afd.tar.gz
opensim-SC-c6c386cd806cfe27f79ce5ad4333272a81b16afd.tar.bz2
opensim-SC-c6c386cd806cfe27f79ce5ad4333272a81b16afd.tar.xz
recover previus behavior of FontProp
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index f4efb0a..880701e 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
493 Point endPoint = new Point(0, 0); 493 Point endPoint = new Point(0, 0);
494 Pen drawPen = null; 494 Pen drawPen = null;
495 Font myFont = null; 495 Font myFont = null;
496 FontStyle myFontStyle; 496
497 SolidBrush myBrush = null; 497 SolidBrush myBrush = null;
498 498
499 try 499 try
@@ -664,7 +664,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
664 } 664 }
665 else if (nextLine.StartsWith("FontProp")) 665 else if (nextLine.StartsWith("FontProp"))
666 { 666 {
667 myFontStyle = FontStyle.Regular; 667 FontStyle myFontStyle = myFont.Style;
668 668
669 nextLine = nextLine.Remove(0, 8); 669 nextLine = nextLine.Remove(0, 8);
670 nextLine = nextLine.Trim(); 670 nextLine = nextLine.Trim();
@@ -691,10 +691,12 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
691 break; 691 break;
692 } 692 }
693 } 693 }
694 694 if(myFontStyle != myFont.Style)
695 Font newFont = new Font(myFont, myFontStyle); 695 {
696 myFont.Dispose(); 696 Font newFont = new Font(myFont, myFontStyle);
697 myFont = newFont; 697 myFont.Dispose();
698 myFont = newFont;
699 }
698 } 700 }
699 else if (nextLine.StartsWith("FontName")) 701 else if (nextLine.StartsWith("FontName"))
700 { 702 {