BitmapData.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. //
  2. // System.Drawing.Imaging.BitmapData.cs
  3. //
  4. // Author:
  5. // Miguel de Icaza ([email protected])
  6. // Vladimir Vukicevic ([email protected])
  7. //
  8. // (C) 2002 Ximian, Inc. http://www.ximian.com
  9. // Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
  10. //
  11. // Permission is hereby granted, free of charge, to any person obtaining
  12. // a copy of this software and associated documentation files (the
  13. // "Software"), to deal in the Software without restriction, including
  14. // without limitation the rights to use, copy, modify, merge, publish,
  15. // distribute, sublicense, and/or sell copies of the Software, and to
  16. // permit persons to whom the Software is furnished to do so, subject to
  17. // the following conditions:
  18. //
  19. // The above copyright notice and this permission notice shall be
  20. // included in all copies or substantial portions of the Software.
  21. //
  22. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  23. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  24. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  25. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  26. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  27. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  28. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29. //
  30. using System.Runtime.InteropServices;
  31. namespace System.Drawing.Imaging
  32. {
  33. // MUST BE KEPT IN SYNC WITH gdip.h in libgdiplus!
  34. #if TARGET_JVM
  35. [MonoTODO]
  36. #endif
  37. [StructLayout(LayoutKind.Sequential)]
  38. public sealed class BitmapData {
  39. internal int width;
  40. internal int height;
  41. internal int stride;
  42. internal PixelFormat pixel_format; // int
  43. internal IntPtr scan0;
  44. internal int reserved;
  45. internal IntPtr palette;
  46. internal int property_count;
  47. internal IntPtr property;
  48. internal float dpi_horz;
  49. internal float dpi_vert;
  50. internal int image_flags;
  51. internal int left;
  52. internal int top;
  53. internal int x;
  54. internal int y;
  55. internal int transparent;
  56. public int Height {
  57. get {
  58. return height;
  59. }
  60. set {
  61. height = value;
  62. }
  63. }
  64. public int Width {
  65. get {
  66. return width;
  67. }
  68. set {
  69. width = value;
  70. }
  71. }
  72. public PixelFormat PixelFormat {
  73. get {
  74. return pixel_format;
  75. }
  76. set {
  77. pixel_format = value;
  78. }
  79. }
  80. public int Reserved {
  81. get {
  82. return reserved;
  83. }
  84. set {
  85. reserved = value;
  86. }
  87. }
  88. public IntPtr Scan0 {
  89. get {
  90. return scan0;
  91. }
  92. set {
  93. scan0 = value;
  94. }
  95. }
  96. public int Stride {
  97. get {
  98. return stride;
  99. }
  100. set {
  101. stride = value;
  102. }
  103. }
  104. }
  105. }