diff options
author | pixel <pixel> | 2004-11-27 21:46:02 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-11-27 21:46:02 +0000 |
commit | ae2779e504ca5ae11a87e047b4536a5f428cce4d (patch) | |
tree | 19604ce1873e9cc98be9b840b894cb7eae341532 /include/Image.h | |
parent | 583964f9f8e954eb57b31663065c5b9e833d045e (diff) |
Large dos2unix commit...
Diffstat (limited to 'include/Image.h')
-rw-r--r-- | include/Image.h | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/include/Image.h b/include/Image.h index 4a7d0ef..633ab55 100644 --- a/include/Image.h +++ b/include/Image.h @@ -1,53 +1,53 @@ -#ifndef __IMAGE_H__
-#define __IMAGE_H__
-
-#include <Buffer.h>
-#include <generic.h>
-#include <Color.h>
-
-enum {
- FORMAT_TGA_BASIC
-};
-
-class Image : public Buffer {
- public:
- Image(unsigned int, unsigned int);
- virtual ~Image();
- Color GetPixel(unsigned int, unsigned int) const;
- void SetPixel(unsigned int, unsigned int, Color);
- bool Prepare(unsigned int = FORMAT_TGA_BASIC);
- void Fill(Color = Color(0, 0, 0));
- virtual String GetName() const;
- virtual bool CanWrite() const;
-
- private:
- typedef unsigned char Byte;
- typedef unsigned short int Word;
- typedef unsigned long int DWord;
- struct TGAHeader {
- Byte IDLength;
- Byte ColorMapType;
- Byte ImageType;
- Word CM_FirstEntry;
- Word CM_Length;
- Byte CM_EntrySize;
- Word IS_XOrigin;
- Word IS_YOrigin;
- Word IS_Width;
- Word IS_Height;
- Byte IS_Depth;
- Byte IS_Descriptor;
- } PACKED;
-
- struct TGAFooter {
- DWord ExtOffset;
- DWord DevOffset;
- char Sig[18];
- } PACKED;
-
- unsigned int x, y;
- bool r;
- Color * img;
-};
-
-#endif
+#ifndef __IMAGE_H__ +#define __IMAGE_H__ + +#include <Buffer.h> +#include <generic.h> +#include <Color.h> + +enum { + FORMAT_TGA_BASIC +}; + +class Image : public Buffer { + public: + Image(unsigned int, unsigned int); + virtual ~Image(); + Color GetPixel(unsigned int, unsigned int) const; + void SetPixel(unsigned int, unsigned int, Color); + bool Prepare(unsigned int = FORMAT_TGA_BASIC); + void Fill(Color = Color(0, 0, 0)); + virtual String GetName() const; + virtual bool CanWrite() const; + + private: + typedef unsigned char Byte; + typedef unsigned short int Word; + typedef unsigned long int DWord; + struct TGAHeader { + Byte IDLength; + Byte ColorMapType; + Byte ImageType; + Word CM_FirstEntry; + Word CM_Length; + Byte CM_EntrySize; + Word IS_XOrigin; + Word IS_YOrigin; + Word IS_Width; + Word IS_Height; + Byte IS_Depth; + Byte IS_Descriptor; + } PACKED; + + struct TGAFooter { + DWord ExtOffset; + DWord DevOffset; + char Sig[18]; + } PACKED; + + unsigned int x, y; + bool r; + Color * img; +}; + +#endif |