#pragma once #include #include #include #include #include namespace dchat { class GtkScaledImageException : public std::runtime_error { public: GtkScaledImageException(const std::string &errMsg) : std::runtime_error(errMsg) {} }; class GtkScaledImage : public StaticImage { public: // Throws GtkScaledImageException on error GtkScaledImage(const boost::filesystem::path &filepath); virtual ~GtkScaledImage(){} void draw(const Cairo::RefPtr &cairo, int width, int height, bool circularMask); private: Cairo::RefPtr surface; }; }