PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/decoders/image/decoder.d

http://github.com/wilkie/djehuty
D | 33 lines | 26 code | 7 blank | 0 comment | 0 complexity | 63c7e0678343ac6d3ea10f4380a768a1 MD5 | raw file
 1module decoders.image.decoder;
 2
 3import graphics.bitmap;
 4
 5import core.string;
 6import core.stream;
 7import core.color;
 8import core.definitions;
 9
10import decoders.decoder;
11
12struct ImageFrameDescription {
13	uint time;			//time till the display of the next image
14	uint xoffset;		//the x offset of the image within the main image
15	uint yoffset;		//the y offset of the image within the main image
16	uint clearFirst;	//whether or not to clear the image prior to drawing next frame
17	Color clearColor;	//the color to use when clearing
18}
19
20abstract class ImageDecoder : Decoder {
21public:
22	StreamData decode(Stream stream, ref Bitmap view) {
23		return StreamData.Invalid;
24	}
25
26	StreamData decodeFrame(Stream stream, ref Bitmap view, ref ImageFrameDescription imageDesc) {
27		return StreamData.Invalid;
28	}
29
30	override string name() {
31		return "Unknown Image Decoder";
32	}
33}