aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs50
1 files changed, 38 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 2335bea..be6b240 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1241,7 +1241,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1241 } 1241 }
1242 else 1242 else
1243 { 1243 {
1244 OSDArray responsearr = new OSDArray(m_scene.GetRootAgentCount()); 1244 OSDArray responsearr = new OSDArray(); // Don't preallocate. MT (m_scene.GetRootAgentCount());
1245 m_scene.ForEachRootScenePresence(delegate(ScenePresence sp) 1245 m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
1246 { 1246 {
1247 OSDMap responsemapdata = new OSDMap(); 1247 OSDMap responsemapdata = new OSDMap();
@@ -1460,9 +1460,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1460 Color background = Color.FromArgb(0, 0, 0, 0); 1460 Color background = Color.FromArgb(0, 0, 0, 0);
1461 SolidBrush transparent = new SolidBrush(background); 1461 SolidBrush transparent = new SolidBrush(background);
1462 Graphics g = Graphics.FromImage(overlay); 1462 Graphics g = Graphics.FromImage(overlay);
1463 g.FillRectangle(transparent, 0, 0, 256, 256); 1463 g.FillRectangle(transparent, 0, 0, 255, 255);
1464 1464
1465 SolidBrush yellow = new SolidBrush(Color.FromArgb(255, 249, 223, 9)); 1465 SolidBrush yellow = new SolidBrush(Color.FromArgb(255, 249, 223, 9));
1466 Pen grey = new Pen(Color.FromArgb(255, 92, 92, 92));
1466 1467
1467 foreach (ILandObject land in parcels) 1468 foreach (ILandObject land in parcels)
1468 { 1469 {
@@ -1470,8 +1471,42 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1470 if ((land.LandData.Flags & (uint)ParcelFlags.ForSale) != 0) 1471 if ((land.LandData.Flags & (uint)ParcelFlags.ForSale) != 0)
1471 { 1472 {
1472 landForSale = true; 1473 landForSale = true;
1474
1475 bool[,] landBitmap = land.GetLandBitmap();
1476
1477 for (int x = 0 ; x < 64 ; x++)
1478 {
1479 for (int y = 0 ; y < 64 ; y++)
1480 {
1481 if (landBitmap[x, y])
1482 {
1483 g.FillRectangle(yellow, x * 4, 252 - (y * 4), 4, 4);
1484
1485 if (x > 0)
1486 {
1487 if ((saleBitmap[x - 1, y] || landBitmap[x - 1, y]) == false)
1488 g.DrawLine(grey, x * 4, 252 - (y * 4), x * 4, 255 - (y * 4));
1489 }
1490 if (y > 0)
1491 {
1492 if ((saleBitmap[x, y-1] || landBitmap[x, y-1]) == false)
1493 g.DrawLine(grey, x * 4, 255 - (y * 4), x * 4 + 3, 255 - (y * 4));
1494 }
1495 if (x < 63)
1496 {
1497 if ((saleBitmap[x + 1, y] || landBitmap[x + 1, y]) == false)
1498 g.DrawLine(grey, x * 4 + 3, 252 - (y * 4), x * 4 + 3, 255 - (y * 4));
1499 }
1500 if (y < 63)
1501 {
1502 if ((saleBitmap[x, y + 1] || landBitmap[x, y + 1]) == false)
1503 g.DrawLine(grey, x * 4, 252 - (y * 4), x * 4 + 3, 252 - (y * 4));
1504 }
1505 }
1506 }
1507 }
1473 1508
1474 saleBitmap = land.MergeLandBitmaps(saleBitmap, land.GetLandBitmap()); 1509 saleBitmap = land.MergeLandBitmaps(saleBitmap, landBitmap);
1475 } 1510 }
1476 } 1511 }
1477 1512
@@ -1483,15 +1518,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1483 1518
1484 m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, generating overlay", m_scene.RegionInfo.RegionName); 1519 m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, generating overlay", m_scene.RegionInfo.RegionName);
1485 1520
1486 for (int x = 0 ; x < 64 ; x++)
1487 {
1488 for (int y = 0 ; y < 64 ; y++)
1489 {
1490 if (saleBitmap[x, y])
1491 g.FillRectangle(yellow, x * 4, 252 - (y * 4), 4, 4);
1492 }
1493 }
1494
1495 try 1521 try
1496 { 1522 {
1497 return OpenJPEG.EncodeFromImage(overlay, true); 1523 return OpenJPEG.EncodeFromImage(overlay, true);