1 /*
2  * wangoverlay.h
3  * Copyright 2020, Thorbjørn Lindeijer <bjorn@lindeijer.nl>
4  *
5  * This file is part of Tiled.
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the Free
9  * Software Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
15  * more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #pragma once
22 
23 #include "wangset.h"
24 
25 #include <QIcon>
26 
27 class QPainter;
28 class QRect;
29 
30 namespace Tiled {
31 
32 enum WangOverlayOption {
33     WO_TransparentFill  = 0x1,
34     WO_Shadow           = 0x2,
35     WO_Outline          = 0x4,
36 };
37 Q_DECLARE_FLAGS(WangOverlayOptions, WangOverlayOption)
38 Q_DECLARE_OPERATORS_FOR_FLAGS(WangOverlayOptions);
39 
40 void paintWangOverlay(QPainter *painter,
41                       WangId wangId,
42                       const WangSet &wangSet,
43                       const QRect &rect,
44                       WangOverlayOptions options = WO_TransparentFill | WO_Shadow | WO_Outline);
45 
46 QIcon wangSetIcon(WangSet::Type type);
47 
48 } // namespace Tiled
49