aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2012-01-31 06:31:02 +0100
committerMelanie2012-01-31 06:31:02 +0100
commitc305b5501226a4ecaea83b01499e7841ad1c94fb (patch)
tree68aacd7df39f890fc20526669283dbe7031892fd
parentMake parcel sale overlays work. No auction support. (diff)
downloadopensim-SC_OLD-c305b5501226a4ecaea83b01499e7841ad1c94fb.zip
opensim-SC_OLD-c305b5501226a4ecaea83b01499e7841ad1c94fb.tar.gz
opensim-SC_OLD-c305b5501226a4ecaea83b01499e7841ad1c94fb.tar.bz2
opensim-SC_OLD-c305b5501226a4ecaea83b01499e7841ad1c94fb.tar.xz
Draw brders around parcels for sale
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs48
1 files changed, 37 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index c2303ef..a4210b2 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1458,9 +1458,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1458 Color background = Color.FromArgb(0, 0, 0, 0); 1458 Color background = Color.FromArgb(0, 0, 0, 0);
1459 SolidBrush transparent = new SolidBrush(background); 1459 SolidBrush transparent = new SolidBrush(background);
1460 Graphics g = Graphics.FromImage(overlay); 1460 Graphics g = Graphics.FromImage(overlay);
1461 g.FillRectangle(transparent, 0, 0, 256, 256); 1461 g.FillRectangle(transparent, 0, 0, 255, 255);
1462 1462
1463 SolidBrush yellow = new SolidBrush(Color.FromArgb(255, 249, 223, 9)); 1463 SolidBrush yellow = new SolidBrush(Color.FromArgb(255, 249, 223, 9));
1464 Pen grey = new Pen(Color.FromArgb(255, 92, 92, 92));
1464 1465
1465 foreach (ILandObject land in parcels) 1466 foreach (ILandObject land in parcels)
1466 { 1467 {
@@ -1469,7 +1470,41 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1469 { 1470 {
1470 landForSale = true; 1471 landForSale = true;
1471 1472
1472 saleBitmap = land.MergeLandBitmaps(saleBitmap, land.GetLandBitmap()); 1473 bool[,] landBitmap = land.GetLandBitmap();
1474
1475 for (int x = 0 ; x < 64 ; x++)
1476 {
1477 for (int y = 0 ; y < 64 ; y++)
1478 {
1479 if (landBitmap[x, y])
1480 {
1481 g.FillRectangle(yellow, x * 4, 252 - (y * 4), 4, 4);
1482
1483 if (x > 0)
1484 {
1485 if ((saleBitmap[x - 1, y] || landBitmap[x - 1, y]) == false)
1486 g.DrawLine(grey, x * 4, 252 - (y * 4), x * 4, 255 - (y * 4));
1487 }
1488 if (y > 0)
1489 {
1490 if ((saleBitmap[x, y-1] || landBitmap[x, y-1]) == false)
1491 g.DrawLine(grey, x * 4, 255 - (y * 4), x * 4 + 3, 255 - (y * 4));
1492 }
1493 if (x < 63)
1494 {
1495 if ((saleBitmap[x + 1, y] || landBitmap[x + 1, y]) == false)
1496 g.DrawLine(grey, x * 4 + 3, 252 - (y * 4), x * 4 + 3, 255 - (y * 4));
1497 }
1498 if (y < 63)
1499 {
1500 if ((saleBitmap[x, y + 1] || landBitmap[x, y + 1]) == false)
1501 g.DrawLine(grey, x * 4, 252 - (y * 4), x * 4 + 3, 252 - (y * 4));
1502 }
1503 }
1504 }
1505 }
1506
1507 saleBitmap = land.MergeLandBitmaps(saleBitmap, landBitmap);
1473 } 1508 }
1474 } 1509 }
1475 1510
@@ -1481,15 +1516,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1481 1516
1482 m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, genrating overlay", m_scene.RegionInfo.RegionName); 1517 m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, genrating overlay", m_scene.RegionInfo.RegionName);
1483 1518
1484 for (int x = 0 ; x < 64 ; x++)
1485 {
1486 for (int y = 0 ; y < 64 ; y++)
1487 {
1488 if (saleBitmap[x, y])
1489 g.FillRectangle(yellow, x * 4, 252 - (y * 4), 4, 4);
1490 }
1491 }
1492
1493 try 1519 try
1494 { 1520 {
1495 return OpenJPEG.EncodeFromImage(overlay, true); 1521 return OpenJPEG.EncodeFromImage(overlay, true);