ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gfxfilter.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 //=============================================================================
23 //
24 // Graphics filter interface
25 //
26 //=============================================================================
27 
28 #ifndef AGS_ENGINE_GFX_GFXFILTER_H
29 #define AGS_ENGINE_GFX_GFXFILTER_H
30 
31 #include "common/std/memory.h"
32 #include "ags/shared/util/geometry.h"
33 #include "ags/shared/util/string.h"
34 
35 namespace AGS3 {
36 namespace AGS {
37 namespace Engine {
38 
39 using Shared::String;
40 
41 struct GfxFilterInfo {
42  String Id;
43  String Name;
44  int MinScale;
45  int MaxScale;
46 
47  GfxFilterInfo() {
48  }
49  GfxFilterInfo(String id, String name, int min_scale = 0, int max_scale = 0)
50  : Id(id)
51  , Name(name)
52  , MinScale(min_scale)
53  , MaxScale(max_scale) {
54  }
55 };
56 
57 class IGfxFilter {
58 public:
59  virtual ~IGfxFilter() {}
60 
61  virtual const GfxFilterInfo &GetInfo() const = 0;
62 
63  // Init filter for the specified color depth
64  virtual bool Initialize(const int color_depth, String &err_str) = 0;
65  virtual void UnInitialize() = 0;
66  // Try to set rendering translation; returns actual supported destination rect
67  virtual Rect SetTranslation(const Size src_size, const Rect dst_rect) = 0;
68  // Get defined destination rect for this filter
69  virtual Rect GetDestination() const = 0;
70 };
71 
73 
74 } // namespace Engine
75 } // namespace AGS
76 } // namespace AGS3
77 
78 #endif
Definition: achievements_tables.h:27
Definition: gfxfilter.h:41
Definition: gfxfilter.h:57
Definition: geometry.h:219
Definition: string.h:62
Definition: geometry.h:148
Definition: ptr.h:159
Definition: engine.h:144
Definition: ags.h:40