X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mcs%2Fclass%2FSystem.Drawing%2FSystem.Drawing.Imaging%2FBitmapData.cs;h=0aa8c680f1703a356aeafd6561d89b4a5381738e;hb=0443306d611d0830e27327e1f0a3ef3457dfa535;hp=bf937143559d70887aaf1767491343f25a5f6088;hpb=94ce5c5aaf912e55f106bbf3250612b02ac850b5;p=mono.git diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs index bf937143559..0aa8c680f17 100644 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs @@ -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 @@ -31,31 +28,41 @@ // 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; } }