Color.cpp
上传用户:yffx2008
上传日期:2014-10-12
资源大小:12414k
文件大小:3k
- // Color.cpp: implementation of the CColor class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "GpsSC.h"
- #include "Color.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CColor::CColor()
- {
- crRed = new CBrush(RGB(255, 8, 0)); //红色
- crGreen = new CBrush(RGB( 15,161, 29)); //绿色
- crBlue = new CBrush(RGB( 0,153,255)); //蓝色
- crYellow = new CBrush(RGB(255,255, 0)); //黄色
- crCyan = new CBrush(RGB(0 ,255,255)); //青色
- crWhite = new CBrush(RGB(254,254,254)); //白色
- crBlack = new CBrush(RGB( 0, 0, 0)); //黑色
- crAqua = new CBrush(RGB(103,251, 4)); //浅绿色
- crOrange = new CBrush(RGB(255,174, 0)); //橙色
- crPurple = new CBrush(RGB(188,163,224)); //紫色
- // crThinBlue = new CBrush(RGB(215,226,242)); //淡蓝色
- // crThinYellow= new CBrush(RGB(204,255,0 )); //淡黄色
- ColorArray[0] = crBlue;
- ColorArray[1] = crGreen;
- ColorArray[2] = crRed;
- ColorArray[3] = crYellow;
- ColorArray[4] = crCyan;
- ColorArray[5] = crAqua;
- ColorArray[6] = crOrange;
- ColorArray[7] = crBlack;
- ColorArray[8] = crWhite;
- ColorArray[9] = crPurple;
- // ColorArray[10] = crThinBlue;
- // ColorArray[11] = crThinYellow;
-
- Blue = new CPen(PS_SOLID,1,RGB(212,247,227));
- Yellow = new CPen(PS_SOLID,1,RGB(255,255,200));
- Cyan = new CPen(PS_SOLID,1,RGB(204,255, 0));
- Red = new CPen(PS_SOLID,1,RGB(247,202,219));
- Purple = new CPen(PS_SOLID,1,RGB(219,206,235));
- PurpleR = new CPen(PS_SOLID,1,RGB(250,198,168));
- Green = new CPen(PS_SOLID,1,RGB(127,184,227));
- ThinBlue = new CPen(PS_SOLID,1,RGB(215,226,242)); //淡蓝色
- ThinYellow = new CPen(PS_SOLID,1,RGB(205,245,177)); //淡黄色
- MapColor[0] = Blue;
- MapColor[1] = Yellow;
- MapColor[2] = Cyan;
- MapColor[3] = Red;
- MapColor[4] = Purple;
- MapColor[5] = PurpleR;
- MapColor[6] = Green;
- MapColor[7] = ThinBlue;
- MapColor[8] = ThinYellow;
- rRed = new CPen(PS_SOLID,1,RGB(255, 0, 0));
- rGreen = new CPen(PS_SOLID,1,RGB(0 ,146, 64));
- rYellow = new CPen(PS_SOLID,1,RGB(212,212, 0));
- rGray = new CPen(PS_SOLID,1,RGB(148,141, 87));
- rPurple = new CPen(PS_SOLID,1,RGB(161, 73,140));
- rWhite = new CPen(PS_SOLID,1,RGB(195,195,194));
- RoadColor[0] = rRed;
- RoadColor[1] = rGreen;
- RoadColor[2] = rYellow;
- RoadColor[3] = rGray;
- RoadColor[4] = rPurple;
- RoadColor[5] = rWhite;
- }
- CColor::~CColor()
- {
- delete crRed;
- delete crGreen;
- delete crBlue;
- delete crYellow;
- delete crCyan;
- delete crWhite;
- delete crBlack;
- delete crAqua;
- delete crOrange;
- delete crPurple;
- delete Blue;
- delete Red;
- delete Purple;
- delete PurpleR;
- delete Yellow;
- delete Cyan;
- delete Green;
- delete ThinBlue;
- delete ThinYellow;
- delete rRed;
- delete rGreen;
- delete rYellow;
- delete rGray;
- delete rPurple;
- delete rWhite;
- }