FrameDimension.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // created on 21.02.2002 at 17:06
  2. //
  3. // FrameDimension.cs
  4. //
  5. // Author: Christian Meyer
  6. // eMail: [email protected]
  7. // Dennis Hayes ([email protected])
  8. // Sanjay Gupta <[email protected]>
  9. // Jordi Mas i Hernanez ([email protected])
  10. //
  11. // Copyright (C) 2004 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. namespace System.Drawing.Imaging {
  33. using System;
  34. public sealed class FrameDimension {
  35. readonly Guid guid;
  36. // constructor
  37. public FrameDimension(Guid guid)
  38. {
  39. this.guid = guid;
  40. }
  41. //properties
  42. public Guid Guid {
  43. get {
  44. return guid;
  45. }
  46. }
  47. public static FrameDimension Page {
  48. get {
  49. return new FrameDimension (new Guid ("7462dc86-6180-4c7e-8e3f-ee7333a7a483"));
  50. }
  51. }
  52. public static FrameDimension Resolution {
  53. get {
  54. return new FrameDimension (new Guid ("84236f7b-3bd3-428f-8dab-4ea1439ca315" ));
  55. }
  56. }
  57. public static FrameDimension Time {
  58. get {
  59. return new FrameDimension (new Guid ("6aedbd6d-3fb5-418a-83a6-7f45229dc872" ));
  60. }
  61. }
  62. //methods
  63. public override bool Equals(object o)
  64. {
  65. if (!(o is FrameDimension))
  66. return false;
  67. return (guid == ((FrameDimension)o).guid);
  68. }
  69. public override int GetHashCode()
  70. {
  71. return guid.GetHashCode ();
  72. }
  73. public override string ToString()
  74. {
  75. return "FrameDimension :" + guid;
  76. }
  77. }
  78. }