equal
deleted
inserted
replaced
65 #endif |
65 #endif |
66 }; |
66 }; |
67 |
67 |
68 void setData(Float *afdata, int aw, int ah) |
68 void setData(Float *afdata, int aw, int ah) |
69 { fdata = afdata; w = aw; h = ah; }; |
69 { fdata = afdata; w = aw; h = ah; }; |
|
70 |
|
71 /** get colour of pixel x,y */ |
70 const Colour &get(int x, int y) const { return data[y*w + x]; }; |
72 const Colour &get(int x, int y) const { return data[y*w + x]; }; |
71 const int &getWidth() const { return w; }; |
73 const int &getWidth() const { return w; }; |
72 const int &getHeight() const { return h; }; |
74 const int &getHeight() const { return h; }; |
|
75 |
|
76 /** get pixmap data as array of floats */ |
73 Float*& getFloatData() { return fdata; }; |
77 Float*& getFloatData() { return fdata; }; |
|
78 |
|
79 /** get pixmap data as array of chars */ |
74 unsigned char *getCharData() const; |
80 unsigned char *getCharData() const; |
|
81 |
|
82 /** write pixmap data to PNG file */ |
75 int writePNG(const char *fname) const; |
83 int writePNG(const char *fname) const; |
76 }; |
84 }; |
77 |
85 |
78 #endif |
86 #endif |