3 * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
12 #include <l4/scout-gfx/widget>
13 #include <l4/mag-gfx/texture>
20 class Png_image : public Widget
25 Mag_gfx::Texture *_texture;
32 explicit Png_image(void *png_data)
33 : _png_data(png_data), _texture(0)
39 inline void *png_data() const { return _png_data; }
44 void fill_cache(Mag_gfx::Pixel_info const *);
45 void flush_cache(Mag_gfx::Pixel_info const *);
46 void draw(Canvas *c, Point const &p);
49 Area min_size() const { return _size; }
50 Area preferred_size() const { return _size; }
51 Area max_size() const { return _size; }
52 bool empty() const { return false; }
53 Orientations expanding() const { return 0; }
54 void set_geometry(Rect const &s) { _pos = s.p1(); }