New test.
[mono.git] / mcs / class / System.Drawing / System.Drawing.Imaging / BitmapData.cs
index bf937143559d70887aaf1767491343f25a5f6088..0aa8c680f1703a356aeafd6561d89b4a5381738e 100644 (file)
@@ -6,10 +6,7 @@
 //   Vladimir Vukicevic (vladimir@pobox.com)
 //
 // (C) 2002 Ximian, Inc.  http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.Runtime.InteropServices;
-using System.IO;
 
 namespace System.Drawing.Imaging
 {
        // MUST BE KEPT IN SYNC WITH gdip.h in libgdiplus!
+       // The first 6 fields MUST also match MS definition
 #if TARGET_JVM
        [MonoTODO]
 #endif
        [StructLayout(LayoutKind.Sequential)]
        public sealed class BitmapData {
-               internal int width;
-               internal int height;
-               internal int stride;
-               internal PixelFormat pixel_format; // int
-               internal IntPtr address;
-               internal int reserved;
-
-               // following added to keep track of frames
-               internal int top;
-               internal int left;
-               internal int byteCount;
-               internal IntPtr bytes;
-               
+               private int             width;
+               private int             height;
+               private int             stride;
+               private PixelFormat     pixel_format; // int
+               private IntPtr          scan0;
+               private int             reserved;
+
+               // *** Warning ***      don't depend on those fields in managed
+               //                      code as they won't exists when using MS
+               //                      GDI+
+               private IntPtr  palette;
+               private int             property_count;
+               private IntPtr  property;
+               private float           dpi_horz;
+               private float           dpi_vert;
+               private int             image_flags;
+               private int             left;
+               private int             top;
+               private int             x;
+               private int             y;
+               private int             transparent;
+               // *** Warning ***
+
+
                public int Height {
                        get {
                                return height;
@@ -99,11 +106,11 @@ namespace System.Drawing.Imaging
 
                public IntPtr Scan0 {
                        get {
-                               return address;
+                               return scan0;
                        }
 
                        set {
-                               address = value;
+                               scan0 = value;
                        }
                }