aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/VectorRender
diff options
context:
space:
mode:
authorUbitUmarov2019-01-16 20:24:16 +0000
committerUbitUmarov2019-01-16 20:24:16 +0000
commitb2810c4ca718663f2bbc8c86646444d698873352 (patch)
treed29311e6cd4032fd5fa55f7c390782f9031f0da2 /OpenSim/Region/CoreModules/Scripting/VectorRender
parentmantis 8442 change alpha blending note BREAKING CHANGEgit push! old scripts u... (diff)
downloadopensim-SC-b2810c4ca718663f2bbc8c86646444d698873352.zip
opensim-SC-b2810c4ca718663f2bbc8c86646444d698873352.tar.gz
opensim-SC-b2810c4ca718663f2bbc8c86646444d698873352.tar.bz2
opensim-SC-b2810c4ca718663f2bbc8c86646444d698873352.tar.xz
mantis 8442 more changes to alpha blending
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/VectorRender')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index 475e8e9..00e4e78 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -354,6 +354,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
354 // under lock. 354 // under lock.
355 lock (this) 355 lock (this)
356 { 356 {
357
358 if (alpha == 256 && bgColor.A != 255)
359 alpha = bgColor.A;
360
357 if (alpha == 256) 361 if (alpha == 256)
358 { 362 {
359 bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb); 363 bitmap = new Bitmap(width, height, PixelFormat.Format32bppRgb);
@@ -367,13 +371,15 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
367 { 371 {
368 bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); 372 bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb);
369 graph = Graphics.FromImage(bitmap); 373 graph = Graphics.FromImage(bitmap);
374
370 Color newbg = Color.FromArgb(alpha,bgColor); 375 Color newbg = Color.FromArgb(alpha,bgColor);
371 using (SolidBrush bgFillBrush = new SolidBrush(newbg)) 376 using (SolidBrush bgFillBrush = new SolidBrush(newbg))
372 { 377 {
378 graph.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceCopy;
373 graph.FillRectangle(bgFillBrush, 0, 0, width, height); 379 graph.FillRectangle(bgFillBrush, 0, 0, width, height);
374 } 380 }
375 } 381 }
376 382 graph.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
377 GDIDraw(data, graph, altDataDelim, out reuseable); 383 GDIDraw(data, graph, altDataDelim, out reuseable);
378 } 384 }
379 385