include/pixmap.h
branchpyrit
changeset 96 9eb71e76c7fd
parent 95 ca7d4c665531
child 98 64638385798a
equal deleted inserted replaced
95:ca7d4c665531 96:9eb71e76c7fd
    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 	Colour get(int x, int y) { return data[y*w + x]; };
    70 	const Colour &get(int x, int y) const { return data[y*w + x]; };
    71 	const int &getWidth() const { return w; };
    71 	const int &getWidth() const { return w; };
    72 	const int &getHeight() const { return h; };
    72 	const int &getHeight() const { return h; };
    73 	Float*& getFloatData() { return fdata; };
    73 	Float*& getFloatData() { return fdata; };
    74 	unsigned char *getCharData() const;
    74 	unsigned char *getCharData() const;
    75 	int writePNG(const char *fname) const;
    75 	int writePNG(const char *fname) const;