ScummVM API documentation
paint32.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 SCI_GRAPHICS_PAINT32_H
23#define SCI_GRAPHICS_PAINT32_H
24
25#include "graphics/primitives.h"
26
27namespace Sci {
28class Plane;
29class SciBitmap;
30class ScreenItem;
31class SegManager;
32
33enum LineStyle {
34 kLineStyleSolid,
35 kLineStyleDashed,
36 kLineStylePattern
37};
38
43public:
44 GfxPaint32(SegManager *segMan);
45
46private:
47 SegManager *_segMan;
48
49#pragma mark -
50#pragma mark Line drawing
51public:
52 reg_t kernelAddLine(const reg_t planeObject, const Common::Point &startPoint, const Common::Point &endPoint, const int16 priority, const uint8 color, const LineStyle style, const uint16 pattern, const uint8 thickness);
53 void kernelUpdateLine(ScreenItem *screenItem, Plane *plane, const Common::Point &startPoint, const Common::Point &endPoint, const int16 priority, const uint8 color, const LineStyle style, const uint16 pattern, const uint8 thickness);
54 void kernelDeleteLine(const reg_t screenItemObject, const reg_t planeObject);
55
56private:
57 typedef struct {
58 SciBitmap *bitmap;
59 bool pattern[16];
60 uint8 patternIndex;
61 bool solid;
62 bool horizontal;
63 int lastAddress;
64 } LineProperties;
65
66 class Primitives : public Graphics::Primitives {
67 void drawPoint(int x, int y, uint32 color, void *data) override;
68 };
69
70 reg_t makeLineBitmap(const Common::Point &startPoint, const Common::Point &endPoint, const int16 priority, const uint8 color, const LineStyle style, const uint16 pattern, const uint8 thickness, Common::Rect &outRect);
71};
72
73} // End of namespace Sci
74
75#endif // SCI_GRAPHICS_PAINT32_H
Definition: primitives.h:29
Definition: paint32.h:42
Definition: plane32.h:103
Definition: screen_item32.h:53
Definition: seg_manager.h:48
Definition: console.h:28
Definition: rect.h:144
Definition: rect.h:536
Definition: vm_types.h:39