aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/Terrain/MapImageModule.cs44
1 files changed, 43 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/MapImageModule.cs b/OpenSim/Region/Environment/Modules/Terrain/MapImageModule.cs
index c4334e0..c791ac3 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/MapImageModule.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/MapImageModule.cs
@@ -58,6 +58,47 @@ namespace OpenSim.Region.Environment.Modules.Terrain
58 return imageData; 58 return imageData;
59 } 59 }
60 60
61 private void ShadeBuildings(ref Bitmap map)
62 {
63 lock (map)
64 {
65 lock (m_scene.Entities)
66 {
67 foreach (EntityBase entity in m_scene.Entities.Values)
68 {
69 if (entity is SceneObjectGroup)
70 {
71 SceneObjectGroup sog = (SceneObjectGroup)entity;
72
73 foreach (SceneObjectPart primitive in sog.Children.Values)
74 {
75 int x, y, w, h, dx, dy;
76 x = (int)(primitive.AbsolutePosition.X - (primitive.Scale.X / 2));
77 y = (int)(primitive.AbsolutePosition.Y - (primitive.Scale.Y / 2));
78 w = (int)primitive.Scale.X;
79 h = (int)primitive.Scale.Y;
80
81 for (dx = x; dx < x + w; dx++)
82 {
83 for (dy = y; dy < y + h; dy++)
84 {
85 if (x < 0 || y < 0)
86 continue;
87 if (x >= map.Width || y >= map.Height)
88 continue;
89
90 map.SetPixel(dx, dy, Color.DarkGray);
91 }
92 }
93
94
95 }
96 }
97 }
98 }
99 }
100 }
101
61 private Bitmap TerrainToBitmap(string gradientmap) 102 private Bitmap TerrainToBitmap(string gradientmap)
62 { 103 {
63 Bitmap gradientmapLd = new Bitmap(gradientmap); 104 Bitmap gradientmapLd = new Bitmap(gradientmap);
@@ -84,8 +125,9 @@ namespace OpenSim.Region.Environment.Modules.Terrain
84 bmp.SetPixel(x, copy.Height - y - 1, colours[colorindex]); 125 bmp.SetPixel(x, copy.Height - y - 1, colours[colorindex]);
85 } 126 }
86 } 127 }
128 ShadeBuildings(ref bmp);
129 return bmp;
87 } 130 }
88 return bmp;
89 } 131 }
90 132
91 133