00001
00002
00003
#ifndef GUARD_NODEMAP_h
00004
#define GUARD_NODEMAP_h
00005
00006
#include <vector>
00007
#include <string>
00008
00009
#include "PNG.hpp"
00010
#include "Node.hpp"
00011
00012
using namespace std;
00013
static Channel channelPixelMap(&cout);
00014
00015
00016
00017 class PixelMap{
00018
00019 vector<Pixel>
data;
00020
00021 vector<int>
parent;
00022
00023 vector<bool>
border;
00024
00025 int width;
00026
00027 int height;
00028
protected:
00029
void findBorder();
00030
public:
00031
00032
00033
00034
PixelMap(
int,
int);
00035
00036 string
toString();
00037
00038
void addPixel(
Pixel);
00039
00040
void addPixel(
Pixel,
int);
00041
00042
Node makeComponent();
00043
00044
void drawBorderPNG(string);
00045
void parentToFile(string)const;
00046
00047 };
00048 #endif