[prev in list] [next in list] [prev in thread] [next in thread]
List: mono-patches
Subject: [Mono-patches] r67179 -
From: "Sebastien Pouliot (sebastien () ximian ! com)"
Date: 2006-10-31 15:29:52
Message-ID: 20061031152952.EAEAE9472C () mono-cvs ! ximian ! com
[Download RAW message or body]
Author: spouliot
Date: 2006-10-31 10:29:52 -0500 (Tue, 31 Oct 2006)
New Revision: 67179
Modified:
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/MetaHeader.cs
trunk/mcs/class/System.Drawing/System.Drawing.Imaging/WmfPlaceableFileHeader.cs
Log:
2006-10-31 Sebastien Pouliot <sebastien@ximian.com>
* MetaHeader.cs: Fix layout (order is important in sequential structs)
and use the struct field names;
* WmfPlaceableFileHeader.cs: Implement all TODO.
Modified: trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog 2006-10-31 \
15:15:33 UTC (rev 67178)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog 2006-10-31 \
15:29:52 UTC (rev 67179) @@ -1,3 +1,9 @@
+2006-10-31 Sebastien Pouliot <sebastien@ximian.com>
+
+ * MetaHeader.cs: Fix layout (order is important in sequential structs)
+ and use the struct field names;
+ * WmfPlaceableFileHeader.cs: Implement all TODO.
+
2006-09-14 Sebastien Pouliot <sebastien@ximian.com>
* BitmapData.cs: Change fields visibility to private as they either
Modified: trunk/mcs/class/System.Drawing/System.Drawing.Imaging/MetaHeader.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/MetaHeader.cs 2006-10-31 \
15:15:33 UTC (rev 67178)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/MetaHeader.cs 2006-10-31 \
15:29:52 UTC (rev 67179) @@ -5,13 +5,11 @@
// Everaldo Canuto (everaldo.canuto@bol.com.br)
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
// Dennis Hayes (dennish@raytek.com)
+// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2002 Ximian, Inc. http://www.ximian.com
+// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
//
-
-//
-// Copyright (C) 2004 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
// "Software"), to deal in the Software without restriction, including
@@ -32,63 +30,62 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
using System.Runtime.InteropServices;
namespace System.Drawing.Imaging {
- [StructLayout(LayoutKind.Sequential)]
+ [StructLayout (LayoutKind.Sequential)]
public sealed class MetaHeader {
- private short headerSize;
- private int maxRecord;
- private short noObjects;
- private short noParameters;
- private int size;
- private short type;
+ // field order match: http://wvware.sourceforge.net/caolan/ora-wmf.html
+ // for WMFHEAD structure
+ private short file_type;
+ private short header_size;
private short version;
+ private int file_size;
+ private short num_of_objects;
+ private int max_record_size;
+ private short num_of_params;
- // constructors
- public MetaHeader()
+
+ public MetaHeader ()
{
}
- // properties
+
public short HeaderSize {
- get { return headerSize; }
- set { headerSize = value; }
+ get { return header_size; }
+ set { header_size = value; }
}
public int MaxRecord {
- get { return maxRecord; }
- set { maxRecord = value; }
+ get { return max_record_size; }
+ set { max_record_size = value; }
}
public short NoObjects {
- get { return noObjects; }
- set { noObjects = value; }
+ get { return num_of_objects; }
+ set { num_of_objects = value; }
}
public short NoParameters {
- get { return noParameters; }
- set { noParameters = value; }
+ get { return num_of_params; }
+ set { num_of_params = value; }
}
public int Size {
- get { return size; }
- set { size = value; }
+ get { return file_size; }
+ set { file_size = value; }
}
public short Type {
- get { return type; }
- set { type = value; }
+ get { return file_type; }
+ set { file_type = value; }
}
public short Version {
get { return version; }
set { version = value; }
}
-
}
-
}
Modified: trunk/mcs/class/System.Drawing/System.Drawing.Imaging/WmfPlaceableFileHeader.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing.Imaging/WmfPlaceableFileHeader.cs 2006-10-31 \
15:15:33 UTC (rev 67178)
+++ trunk/mcs/class/System.Drawing/System.Drawing.Imaging/WmfPlaceableFileHeader.cs 2006-10-31 \
15:29:52 UTC (rev 67179) @@ -1,15 +1,14 @@
//
// System.Drawing.Imaging.WmfPlaceableFileHeader.cs
//
+// Authors:
+// Everaldo Canuto <everaldo.canuto@bol.com.br>
+// Dennis Hayes (dennish@raytek.com)
+// Sebastien Pouliot <sebastien@ximian.com>
+//
// (C) 2002 Ximian, Inc. http://www.ximian.com
-// Author: Everaldo Canuto
-// eMail: everaldo.canuto@bol.com.br
-// Dennis Hayes (dennish@raytek.com)
+// Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
//
-
-//
-// Copyright (C) 2004 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
// "Software"), to deal in the Software without restriction, including
@@ -29,75 +28,77 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
+
using System.Runtime.InteropServices;
namespace System.Drawing.Imaging {
- [StructLayout(LayoutKind.Sequential)]
+ [StructLayout (LayoutKind.Sequential)]
public sealed class WmfPlaceableFileHeader {
- // constructors
- [MonoTODO]
- public WmfPlaceableFileHeader() {
- throw new NotImplementedException ();
+ // field order match: http://wvware.sourceforge.net/caolan/ora-wmf.html
+ // for PLACEABLEMETAHEADER structure
+ private int key;
+ private short handle;
+ private short left;
+ private short top;
+ private short right;
+ private short bottom;
+ private short inch;
+ private int reserved;
+ private short checksum;
+
+
+ public WmfPlaceableFileHeader ()
+ {
+ // header magic number
+ key = unchecked ((int) 0x9AC6CDD7);
}
- // properties
- [MonoTODO]
+
public short BboxBottom {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return bottom; }
+ set { bottom = value; }
}
- [MonoTODO]
public short BboxLeft {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return left; }
+ set { left = value; }
}
- [MonoTODO]
public short BboxRight {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return right; }
+ set { right = value; }
}
- [MonoTODO]
public short BboxTop {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return top; }
+ set { top = value; }
}
- [MonoTODO]
public short Checksum {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return checksum; }
+ set { checksum = value; }
}
- [MonoTODO]
public short Hmf {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return handle; }
+ set { handle = value; }
}
- [MonoTODO]
public short Inch {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return inch; }
+ set { inch = value; }
}
- [MonoTODO]
public int Key {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return key; }
+ set { key = value; }
}
- [MonoTODO]
public int Reserved {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return reserved; }
+ set { reserved = value; }
}
-
}
-
}
_______________________________________________
Mono-patches maillist - Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic