?? map.h
字號:
#ifndef MAP_H
#define MAP_H
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>
#include "conv.h"
#include "graphic.h"
/*
//定義點類型
typedef struct tagPoint{
long x; //x坐標(biāo)
long y; //y坐標(biāo)
}POINTSCR, *LPOINTSCR;
*/
//定義點類型
typedef struct tagPointdb{
double x; //x坐標(biāo)
double y; //y坐標(biāo)
}POINTDB;
//定義筆類型
typedef struct mapPEN{
int width; //筆寬
int pattern; //樣式
int color; //顏色
}MAPPEN;
//定義刷子類型
typedef struct mapBRUSH{
int pattern; //樣式
int forecolor; //前景色
int backcolor; //背景色
}MAPBRUSH;
//定義地圖點類型
typedef struct mapPOINT{
double x; //經(jīng)度轉(zhuǎn)換成直角坐標(biāo)
double y; //緯度轉(zhuǎn)換成直角坐標(biāo)
char *name ; //點對應(yīng)的文字
struct mapPOINT* next; //下一個節(jié)點
}MAPPOINT;
//定義地圖折線類型
typedef struct mapPLINE{
int num; //折線的點個數(shù)
POINTDB *points; //折線中的點
MAPPEN pen; //筆類型
POINTDB min; //最小坐標(biāo)
POINTDB max; //最大坐標(biāo)
char *name; //折線對應(yīng)的文字
struct mapPLINE* next; //下一個節(jié)點
}MAPPLINE;
//定義地圖區(qū)域類型
typedef struct mapREGION{
int num; //區(qū)域的點個數(shù)
POINTDB *points; //區(qū)域中的點
POINTDB min; //最小坐標(biāo)
POINTDB max; //最大坐標(biāo)
MAPPEN pen; //筆類型
MAPBRUSH brush; //刷子類型
POINTDB center; //區(qū)域中心坐標(biāo)
char *name; //區(qū)域?qū)?yīng)的文字
struct mapREGION* next; //下一個節(jié)點
}MAPREGION;
double m_fMaxCX,m_fMaxCY; //當(dāng)前地圖最大顯示范圍(直角坐標(biāo))
double m_fMapjw[4];//當(dāng)前地圖經(jīng)緯度范圍
/*
m_fMapjw[0]------左
m_fMapjw[1]------右
m_fMapjw[2]------上
m_fMapjw[3]------下
*/
MAPPOINT* point;
MAPPLINE* pline;
MAPREGION* region;
long offsetx;
long offsety;
double jingdu,weidu;
int maxpoints;
int char_num;
IMPORT int widthzoom;
IMPORT void testMove();
void initialize();
void getMapUnit(char* fileAddr);
void setOffset(double x, double y);
IMPORT void zoom(double zm);
IMPORT void draw_map_line(MAPPLINE*,LPOINTSCR,BMP *);
IMPORT void draw_map_region(MAPREGION*,LPOINTSCR,BMP *);
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -