0
|
1 |
#ifndef _CONVERTMAP_H
|
|
2 |
#define _CONVERTMAP_H
|
|
3 |
|
|
4 |
/** convertMap.h
|
|
5 |
Functions for converting from one Map form to another
|
|
6 |
and extracting smaller maps. There are four polymorphic
|
|
7 |
functions. The general format is
|
|
8 |
|
|
9 |
convertMap(MapType * source,MapType * target, Point ul, Point lr)
|
|
10 |
|
|
11 |
MapTypes can be - BitMap, RLEMap, or VRLEMap
|
|
12 |
source - the map to be converted from
|
|
13 |
target - The map to be converted to. Memory will be allocated
|
|
14 |
for target's contents.
|
|
15 |
ul and lr mark a range to copy. If either are the global var NOPNT,
|
|
16 |
the entire map will be copied.
|
|
17 |
|
|
18 |
Functions return a MapStatus which will be VALID or OTHERERROR
|
|
19 |
if there was an error in the conversion. An error might be due
|
|
20 |
to a user specifying an out of range ul and lr.
|
|
21 |
|
|
22 |
**************************************************************/
|
|
23 |
#include "system.h"
|
|
24 |
#include "Point.h"
|
|
25 |
#include "BitMap.h"
|
|
26 |
#include "RLEPair.h"
|
|
27 |
#include "RLEMap.h"
|
|
28 |
#include "Point.h"
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
/**** BitMap Conversion ***/
|
|
33 |
MapStatus convertMap(BitMap * source, BitMap * target, Point ul = 0,
|
|
34 |
Point lr= 0);
|
|
35 |
MapStatus convertMap(BitMap * source, RLEMap * target, Point ul= 0,
|
|
36 |
Point lr= 0);
|
|
37 |
|
|
38 |
|
|
39 |
/**** RLEMap Conversion ***/
|
|
40 |
MapStatus convertMap(RLEMap * source, BitMap * target, Point ul = 0,
|
|
41 |
Point lr = 0);
|
|
42 |
MapStatus convertMap(RLEMap * source, RLEMap * target, Point ul= 0,
|
|
43 |
Point lr= 0);
|
|
44 |
#endif
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|