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/mag-gfx/canvas>
22 Clip_guard(Clip_guard const &);
23 void operator = (Clip_guard const &);
26 Clip_guard() : _c(0), _o() {}
28 Clip_guard(Canvas *canvas, Rect const &n)
29 : _c(canvas), _o(_c->clip())
30 { _c->set_clipping(_o & n); }
32 void init(Canvas *c, Rect const &n)
36 _c->set_clipping(_o & n);
39 ~Clip_guard() { _c->set_clipping(_o); }