// 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;
public IntPtr Scan0 {
get {
- return address;
+ return scan0;
}
set {
- address = value;
+ scan0 = value;
}
}