Color.cpp
上传用户:yffx2008
上传日期:2014-10-12
资源大小:12414k
文件大小:3k
源码类别:

交通/航空行业

开发平台:

Visual C++

  1. // Color.cpp: implementation of the CColor class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "GpsSC.h"
  6. #include "Color.h"
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char THIS_FILE[]=__FILE__;
  10. #define new DEBUG_NEW
  11. #endif
  12. //////////////////////////////////////////////////////////////////////
  13. // Construction/Destruction
  14. //////////////////////////////////////////////////////////////////////
  15. CColor::CColor()
  16. {
  17. crRed = new CBrush(RGB(255,  8,  0)); //红色
  18. crGreen = new CBrush(RGB( 15,161, 29)); //绿色
  19. crBlue = new CBrush(RGB(  0,153,255)); //蓝色
  20. crYellow = new CBrush(RGB(255,255,  0)); //黄色
  21. crCyan = new CBrush(RGB(0  ,255,255)); //青色
  22. crWhite = new CBrush(RGB(254,254,254)); //白色
  23. crBlack = new CBrush(RGB(  0,  0,  0)); //黑色
  24. crAqua = new CBrush(RGB(103,251, 4)); //浅绿色
  25. crOrange = new CBrush(RGB(255,174,  0)); //橙色
  26. crPurple = new CBrush(RGB(188,163,224)); //紫色
  27. // crThinBlue = new CBrush(RGB(215,226,242)); //淡蓝色
  28. // crThinYellow= new CBrush(RGB(204,255,0  )); //淡黄色
  29. ColorArray[0] = crBlue;
  30. ColorArray[1] = crGreen;
  31. ColorArray[2] = crRed;
  32. ColorArray[3] = crYellow;
  33. ColorArray[4] = crCyan;
  34. ColorArray[5] = crAqua;
  35. ColorArray[6] = crOrange;
  36. ColorArray[7] = crBlack;
  37. ColorArray[8] = crWhite;
  38. ColorArray[9] = crPurple;
  39. // ColorArray[10] = crThinBlue;
  40. // ColorArray[11] = crThinYellow;
  41. Blue = new CPen(PS_SOLID,1,RGB(212,247,227));
  42. Yellow  = new CPen(PS_SOLID,1,RGB(255,255,200));
  43. Cyan = new CPen(PS_SOLID,1,RGB(204,255, 0));
  44. Red = new CPen(PS_SOLID,1,RGB(247,202,219));
  45. Purple = new CPen(PS_SOLID,1,RGB(219,206,235));
  46. PurpleR = new CPen(PS_SOLID,1,RGB(250,198,168));
  47. Green = new CPen(PS_SOLID,1,RGB(127,184,227));
  48. ThinBlue = new CPen(PS_SOLID,1,RGB(215,226,242)); //淡蓝色
  49. ThinYellow = new CPen(PS_SOLID,1,RGB(205,245,177)); //淡黄色
  50. MapColor[0] = Blue;
  51. MapColor[1] = Yellow;
  52. MapColor[2] = Cyan;
  53. MapColor[3] = Red;
  54. MapColor[4] = Purple;
  55. MapColor[5] = PurpleR;
  56. MapColor[6] = Green;
  57. MapColor[7] = ThinBlue;
  58. MapColor[8] = ThinYellow;
  59. rRed = new CPen(PS_SOLID,1,RGB(255,  0,  0));
  60. rGreen = new CPen(PS_SOLID,1,RGB(0  ,146, 64));
  61. rYellow = new CPen(PS_SOLID,1,RGB(212,212,  0));
  62. rGray = new CPen(PS_SOLID,1,RGB(148,141, 87));
  63. rPurple = new CPen(PS_SOLID,1,RGB(161, 73,140));
  64. rWhite = new CPen(PS_SOLID,1,RGB(195,195,194));
  65. RoadColor[0] = rRed;
  66. RoadColor[1] = rGreen;
  67. RoadColor[2] = rYellow;
  68. RoadColor[3] = rGray;
  69. RoadColor[4] = rPurple;
  70. RoadColor[5] = rWhite;
  71. }
  72. CColor::~CColor()
  73. {
  74. delete  crRed;
  75. delete crGreen;
  76. delete crBlue;
  77. delete  crYellow;
  78. delete crCyan;
  79. delete crWhite;
  80. delete crBlack;
  81. delete crAqua;
  82. delete crOrange;
  83. delete crPurple;
  84. delete Blue;
  85. delete Red;
  86. delete Purple;
  87. delete PurpleR;
  88. delete Yellow;
  89. delete Cyan;
  90. delete Green;
  91. delete ThinBlue;
  92. delete ThinYellow;
  93. delete rRed;
  94. delete rGreen;
  95. delete rYellow;
  96. delete rGray;
  97. delete rPurple;
  98. delete rWhite;
  99. }