ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 
27 namespace Sci {
28 class Plane;
29 class SciBitmap;
30 class ScreenItem;
31 class SegManager;
32 
33 enum LineStyle {
34  kLineStyleSolid,
35  kLineStyleDashed,
36  kLineStylePattern
37 };
38 
42 class GfxPaint32 {
43 public:
44  GfxPaint32(SegManager *segMan);
45 
46 private:
47  SegManager *_segMan;
48 
49 #pragma mark -
50 #pragma mark Line drawing
51 public:
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 
56 private:
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: plane32.h:103
Definition: rect.h:144
Definition: primitives.h:29
Definition: rect.h:45
Definition: console.h:28
Definition: seg_manager.h:48
Definition: screen_item32.h:53
Definition: vm_types.h:39
Definition: paint32.h:42