ScummVM API documentation
visual_surface.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 ULTIMA_SHARED_GFX_VISUAL_SURFACE_H
23#define ULTIMA_SHARED_GFX_VISUAL_SURFACE_H
24
25#include "graphics/managed_surface.h"
26#include "ultima/shared/core/named_item.h"
27#include "ultima/shared/core/rect.h"
28#include "ultima/shared/gfx/screen.h"
29
30namespace Ultima {
31namespace Shared {
32
33class GameBase;
34
35namespace Gfx {
36
37class Font;
38
40private:
41 Rect _bounds;
42 Point _textPos;
43 byte _textColor;
44 byte _bgColor;
45public:
49 VisualSurface(const Graphics::ManagedSurface &src, const Rect &bounds, GameBase *game = nullptr);
50
54 void drawPoint(const Point &pt, byte color);
55
59 void setTextPos(const Point &pt) { _textPos = pt; }
60
64 void writeString(const Common::String &msg, const Point &pt, int color = -1, int bgColor = -1);
65
69 void writeString(const Common::String &msg, int color = -1, int bgColor = -1);
70
74 void writeChar(unsigned char c, const Point &pt, int color = -1, int bgColor = -1);
75
79 void writeChar(unsigned char c, int color = -1, int bgColor = -1);
80
84 size_t fontHeight();
85};
86
87} // End of namespace Gfx
88} // End of namespace Shared
89} // End of namespace Ultima
90
91#endif
Definition: str.h:59
Definition: managed_surface.h:51
Definition: game_base.h:53
Definition: visual_surface.h:39
void setTextPos(const Point &pt)
Definition: visual_surface.h:59
void writeChar(unsigned char c, int color=-1, int bgColor=-1)
void writeString(const Common::String &msg, const Point &pt, int color=-1, int bgColor=-1)
void writeChar(unsigned char c, const Point &pt, int color=-1, int bgColor=-1)
void writeString(const Common::String &msg, int color=-1, int bgColor=-1)
void drawPoint(const Point &pt, byte color)
VisualSurface(const Graphics::ManagedSurface &src, const Rect &bounds, GameBase *game=nullptr)
Definition: rect.h:144
Definition: rect.h:536