maptypes.h

来自「GPS导航的源代码」· C头文件 代码 · 共 96 行

H
96
字号
#ifndef MAPTYPES_H
#define MAPTYPES_H

#pragma pack(8)

//
struct MapPosition
{
	double x;
	double y;
};

//
struct MapRect
{
	MapPosition pt1;
	MapPosition pt2;
};

//
struct MapFeatureIDStr
{
	long int id;
	int type;
	char name[50];
	MapRect bound;
	unsigned long int offmap;
	unsigned long int offprop;
};

//
struct MapFeaturePart
{
	MapRect bound;
	unsigned long int npt;
	MapPosition pts[1];
};

//
struct MapFeatureData
{
	unsigned long int npart;
	MapFeaturePart parts[1];
};

//
struct MapFeatureProp
{
	unsigned int symbol;
	unsigned long int color;
	unsigned int width;
	unsigned long int style;
};

//
struct MapLayer
{
	TCHAR name[20];
	TCHAR file[MAX_PATH];
	BOOL visible;
	double scaleMin,scaleMax;
	BOOL label;
	double labelScaleMin,lableScaleMax;
};

//
struct MapSelection
{
	MapLayer *pLayer;
	MapFeatureIDStr *pidstr;
//	long int id;
//	unsigned long int offid;
};

#endif //MAPTYPES_H


/*  Data structure
1. ID
 MapFeatureIDStr | [MapFeatureIDStr] | ...

2. Map
 Dot
  MapPosition
  -----------
  point

 Line or Region
  unsigned long int | MapRect | unsigned long int | MapPosition
  -----------------   -----------------------------------------
  part number         [MapPart                                ] 
  -----------------   -------   -----------------   -----------
  npart               [bound    npt                 [points]  ]

(where [] means repeat zero or more times)
*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?