MetaHeader.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //
  2. // System.Drawing.Imaging.MetaHeader.cs
  3. //
  4. // Authors:
  5. // Everaldo Canuto ([email protected])
  6. // Andreas Nahr ([email protected])
  7. // Dennis Hayes ([email protected])
  8. // Sebastien Pouliot <[email protected]>
  9. //
  10. // (C) 2002 Ximian, Inc. http://www.ximian.com
  11. // Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
  12. //
  13. // Permission is hereby granted, free of charge, to any person obtaining
  14. // a copy of this software and associated documentation files (the
  15. // "Software"), to deal in the Software without restriction, including
  16. // without limitation the rights to use, copy, modify, merge, publish,
  17. // distribute, sublicense, and/or sell copies of the Software, and to
  18. // permit persons to whom the Software is furnished to do so, subject to
  19. // the following conditions:
  20. //
  21. // The above copyright notice and this permission notice shall be
  22. // included in all copies or substantial portions of the Software.
  23. //
  24. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  25. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  26. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  27. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  28. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  29. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  30. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  31. //
  32. using System.Runtime.InteropServices;
  33. namespace System.Drawing.Imaging {
  34. [StructLayout (LayoutKind.Sequential)]
  35. public sealed class MetaHeader {
  36. // field order match: http://wvware.sourceforge.net/caolan/ora-wmf.html
  37. // for WMFHEAD structure
  38. private short file_type;
  39. private short header_size;
  40. private short version;
  41. private int file_size;
  42. private short num_of_objects;
  43. private int max_record_size;
  44. private short num_of_params;
  45. public MetaHeader ()
  46. {
  47. }
  48. public short HeaderSize {
  49. get { return header_size; }
  50. set { header_size = value; }
  51. }
  52. public int MaxRecord {
  53. get { return max_record_size; }
  54. set { max_record_size = value; }
  55. }
  56. public short NoObjects {
  57. get { return num_of_objects; }
  58. set { num_of_objects = value; }
  59. }
  60. public short NoParameters {
  61. get { return num_of_params; }
  62. set { num_of_params = value; }
  63. }
  64. public int Size {
  65. get { return file_size; }
  66. set { file_size = value; }
  67. }
  68. public short Type {
  69. get { return file_type; }
  70. set { file_type = value; }
  71. }
  72. public short Version {
  73. get { return version; }
  74. set { version = value; }
  75. }
  76. }
  77. }