mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
38 lines
729 B
C++
38 lines
729 B
C++
#ifndef _plugin_ppm_ppm_h_
|
|
#define _plugin_ppm_ppm_h_
|
|
|
|
#include <Draw/Draw.h>
|
|
|
|
namespace Upp {
|
|
|
|
class PPMRaster : public StreamRaster {
|
|
Size size;
|
|
bool is16;
|
|
RasterFormat fmt;
|
|
int64 pixel_pos;
|
|
|
|
public:
|
|
virtual bool Create();
|
|
virtual Info GetInfo();
|
|
virtual Size GetSize();
|
|
virtual Line GetLine(int line);
|
|
virtual int GetPaletteCount();
|
|
virtual RGBA *GetPalette();
|
|
virtual const RasterFormat *GetFormat();
|
|
|
|
PPMRaster();
|
|
~PPMRaster();
|
|
};
|
|
|
|
class PPMEncoder : public StreamRasterEncoder {
|
|
Size size;
|
|
|
|
public:
|
|
virtual int GetPaletteCount();
|
|
virtual void Start(Size sz);
|
|
virtual void WriteLineRaw(const byte *data);
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|