aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs20
1 files changed, 9 insertions, 11 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs
index 8359f8e..8b5fbed 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs
@@ -26,18 +26,16 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using System.Drawing; 29using System.Drawing;
30using System.Drawing.Imaging;
33 31
34namespace libTerrain 32namespace libTerrain
35{ 33{
36 class Raster 34 internal class Raster
37 { 35 {
38 int w; 36 private int w;
39 int h; 37 private int h;
40 Bitmap bmp; 38 private Bitmap bmp;
41 39
42 /// <summary> 40 /// <summary>
43 /// Creates a new Raster channel for use with bitmap or GDI functions 41 /// Creates a new Raster channel for use with bitmap or GDI functions
@@ -48,7 +46,7 @@ namespace libTerrain
48 { 46 {
49 w = width; 47 w = width;
50 h = height; 48 h = height;
51 bmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); 49 bmp = new Bitmap(width, height, PixelFormat.Format24bppRgb);
52 } 50 }
53 51
54 /// <summary> 52 /// <summary>
@@ -65,7 +63,7 @@ namespace libTerrain
65 for (y = 0; y < bmp.Height; y++) 63 for (y = 0; y < bmp.Height; y++)
66 { 64 {
67 Color val = bmp.GetPixel(x, y); 65 Color val = bmp.GetPixel(x, y);
68 chan.map[x, y] = (((double)val.R + (double)val.G + (double)val.B) / 3.0) / 255.0; 66 chan.map[x, y] = (((double) val.R + (double) val.G + (double) val.B)/3.0)/255.0;
69 } 67 }
70 } 68 }
71 69
@@ -86,7 +84,7 @@ namespace libTerrain
86 sf.LineAlignment = StringAlignment.Center; 84 sf.LineAlignment = StringAlignment.Center;
87 85
88 Graphics gd = Graphics.FromImage(bmp); 86 Graphics gd = Graphics.FromImage(bmp);
89 gd.DrawString(txt, new Font(font, (float)size), new SolidBrush(Color.White), area, sf); 87 gd.DrawString(txt, new Font(font, (float) size), new SolidBrush(Color.White), area, sf);
90 } 88 }
91 } 89 }
92} 90} \ No newline at end of file