X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fimage.h;h=9f170046a333880bcad995e2fbd3e0574b28e538;hb=8e58f5bca4258e73e84e604ff2573fe9713b7b3f;hp=bfaeef84a00fbf7b945dbac8cc51d0fc593673bd;hpb=cfd3548464e6424fc9decf0539d6cd04b031ba10;p=libs%2Fgui.git diff --git a/source/graphics/image.h b/source/graphics/image.h index bfaeef8..9f17004 100644 --- a/source/graphics/image.h +++ b/source/graphics/image.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include "pixelformat.h" namespace Msp { @@ -19,9 +19,12 @@ public: PixelFormat fmt; unsigned width; unsigned height; + unsigned stride; char *data; Data(); + Data(const Data &); + Data &operator=(const Data &); ~Data(); }; @@ -30,12 +33,13 @@ private: public: void load_file(const std::string &); - void load_io(IO::Base &); + void load_io(IO::Seekable &); void load(ImageLoader &); PixelFormat get_format() const { return data.fmt; } unsigned get_width() const { return data.width; } unsigned get_height() const { return data.height; } + unsigned get_stride() const { return data.stride; } const void *get_data() const { return data.data; } };