2 * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
5 * This file is part of TUD:OS and distributed under the terms of the
6 * GNU General Public License 2.
7 * Please see the COPYING-GPL-2 file for details.
11 #include <l4/mag-gfx/clip_guard>
12 #include <l4/mag-gfx/mem_texture>
17 namespace Mag_server {
19 using namespace Mag_gfx;
21 template< typename PT >
22 class Mouse_cursor : public View
25 Mem::Texture<PT> const *_t;
28 Mouse_cursor(Texture const *t)
29 : View(Rect(Point(0,0), t->size()), F_transparent),
30 _t(static_cast<Mem::Texture<PT> const *>(t))
33 void draw(Canvas *canvas, View_stack const *s, Mode, bool) const
35 Clip_guard g(canvas, *this);
37 s->draw_recursive(View::next(), 0, *this);
38 canvas->draw_texture(_t, Rgb32::Black, p1(), Canvas::Masked);