ScummVM API documentation
dirtyrects.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef GRAPHICS_DIRTYRECTS_H
23#define GRAPHICS_DIRTYRECTS_H
24
25#include "common/list.h"
26#include "common/rect.h"
27
28namespace Graphics {
29
44public:
47protected:
52
53protected:
57 bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2);
58
59public:
63 void merge();
64
68 bool empty() const { return _dirtyRects.empty(); }
69
73 void clear() { _dirtyRects.clear(); }
74
79 template<class... TArgs>
80 void emplace_back(TArgs &&...args) { _dirtyRects.emplace_back(Common::forward<TArgs>(args)...); }
81
87
93
99 return _dirtyRects.begin();
100 }
101
104 return _dirtyRects.end();
105 }
106};
108} // End of namespace Graphics
109
110#endif
iterator begin()
Definition: list.h:266
void clear()
Definition: list.h:245
void emplace_back(TArgs &&...args)
Definition: list.h:169
void push_back(const t_T &element)
Definition: list.h:174
iterator end()
Definition: list.h:279
bool empty() const
Definition: list.h:258
Definition: dirtyrects.h:43
void emplace_back(TArgs &&...args)
Definition: dirtyrects.h:80
Common::List< Common::Rect >::const_iterator const_iterator
Definition: dirtyrects.h:45
bool empty() const
Definition: dirtyrects.h:68
Common::List< Common::Rect > _dirtyRects
Definition: dirtyrects.h:51
const_iterator end() const
Definition: dirtyrects.h:103
const_iterator begin() const
Definition: dirtyrects.h:98
void push_back(Common::Rect &&r)
Definition: dirtyrects.h:92
bool unionRectangle(Common::Rect &destRect, const Common::Rect &src1, const Common::Rect &src2)
void clear()
Definition: dirtyrects.h:73
void push_back(const Common::Rect &r)
Definition: dirtyrects.h:86
Out move(In first, In last, Out dst)
Definition: algorithm.h:109
Definition: formatinfo.h:28
Definition: list_intern.h:108
Definition: rect.h:536