BitmapData.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. //
  10. using System;
  11. using System.Runtime.InteropServices;
  12. using System.IO;
  13. namespace System.Drawing.Imaging
  14. {
  15. // MUST BE KEPT IN SYNC WITH gdip.h in libgdiplus!
  16. [StructLayout(LayoutKind.Sequential)]
  17. public sealed class BitmapData {
  18. internal int width;
  19. internal int height;
  20. internal int stride;
  21. internal PixelFormat pixel_format; // int
  22. internal IntPtr address;
  23. internal int reserved;
  24. public int Height {
  25. get {
  26. return height;
  27. }
  28. set {
  29. height = value;
  30. }
  31. }
  32. public int Width {
  33. get {
  34. return width;
  35. }
  36. set {
  37. width = value;
  38. }
  39. }
  40. public PixelFormat PixelFormat {
  41. get {
  42. return pixel_format;
  43. }
  44. set {
  45. pixel_format = value;
  46. }
  47. }
  48. public int Reserved {
  49. get {
  50. return reserved;
  51. }
  52. set {
  53. reserved = value;
  54. }
  55. }
  56. public IntPtr Scan0 {
  57. get {
  58. return address;
  59. }
  60. set {
  61. address = value;
  62. }
  63. }
  64. public int Stride {
  65. get {
  66. return stride;
  67. }
  68. set {
  69. stride = value;
  70. }
  71. }
  72. }
  73. }