From 04f44bcf99be56ce26b918354400178040c1d5ae Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 18 Jan 2019 03:02:39 +0000 Subject: [PATCH] mantis 8442 more changes to alpha blending (mono does not like last) --- .../Scripting/VectorRender/VectorRenderModule.cs | 15 +++------------ OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 2 ++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 00e4e78609..9f34d7fcf8 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -362,24 +362,15 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender { bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb); graph = Graphics.FromImage(bitmap); - using (SolidBrush bgFillBrush = new SolidBrush(bgColor)) - { - graph.FillRectangle(bgFillBrush, 0, 0, width, height); - } + graph.Clear(bgColor); } else { + Color newbg = Color.FromArgb(alpha, bgColor); bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); graph = Graphics.FromImage(bitmap); - - Color newbg = Color.FromArgb(alpha,bgColor); - using (SolidBrush bgFillBrush = new SolidBrush(newbg)) - { - graph.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceCopy; - graph.FillRectangle(bgFillBrush, 0, 0, width, height); - } + graph.Clear(newbg); } - graph.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver; GDIDraw(data, graph, altDataDelim, out reuseable); } diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 80d3f62339..d0c48b7f7e 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -450,6 +450,8 @@ namespace OpenSim.Region.Framework.Scenes { // scan thru the dynAttrs map of this part for any textures used as materials OSD osdMaterials = null; + if(part.DynAttrs == null) + return; lock (part.DynAttrs) {