ColorPalette.cs 876 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // System.Drawing.Imaging.ColorPalette.cs
  3. //
  4. // (C) 2002 Ximian, Inc. http://www.ximian.com
  5. //
  6. // Author:
  7. // Miguel de Icaza ([email protected]
  8. //
  9. using System;
  10. using System.Drawing;
  11. namespace System.Drawing.Imaging
  12. {
  13. public sealed class ColorPalette {
  14. // 0x1: the color values in the array contain alpha information
  15. // 0x2: the color values are grayscale values.
  16. // 0x4: the colors in the array are halftone values.
  17. int flags;
  18. Color [] entries;
  19. //
  20. // There is no public constructor, this will be used somewhere in the
  21. // drawing code
  22. //
  23. internal ColorPalette ()
  24. {
  25. flags = 0;
  26. entries = new Color [0];
  27. }
  28. internal ColorPalette (int flags, Color[] colors) {
  29. this.flags = flags;
  30. entries = colors;
  31. }
  32. public Color [] Entries {
  33. get {
  34. return entries;
  35. }
  36. }
  37. public int Flags {
  38. get {
  39. return flags;
  40. }
  41. }
  42. }
  43. }