Debian Codegraph @

RSPiX/Src/ORANGE/DirtRect/DirtRect.h

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////cxx . . $ `<file>/RSPiX/Src/ORANGE/DirtRect/DirtRect.h`/
2 //
3 // Copyright 2016 RWS Inc, All Rights Reserved
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of version 2 of the GNU General Public License as published by
7 // the Free Software Foundation
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License along
15 // with this program; if not, write to the Free Software Foundation, Inc.,
16 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 //
18 #ifndef DIRTRECT_H
19 #define DIRTRECT_Hcxx . . $ `RSPiX/Src/ORANGE/DirtRect/DirtRect.h:19:9`!
20
21 //////////////////////////////////////////////////////////////////////////////
22 // Headers.
23 //////////////////////////////////////////////////////////////////////////////
24 #include "System.h"cxx . . $ `<file>/RSPiX/Src/BLUE/System.h`/
25
26 // If PATHS_IN_INCLUDES macro is defined, we can utilized relative
27 // paths to a header file. In this case we generally go off of our
28 // RSPiX root directory. System.h MUST be included before this macro
29 // is evaluated. System.h is the header that, based on the current
30 // platform (or more so in this case on the compiler), defines
31 // PATHS_IN_INCLUDES. Blue.h includes system.h so you can include that
32 // instead.
33 #ifdef PATHS_IN_INCLUDEScxx . . $ `RSPiX/Src/BLUE/unix/UnixSystem.h:65:9`!
34 #include "ORANGE/CDT/List.h"cxx . . $ `<file>/RSPiX/Src/ORANGE/CDT/List.h`/
35 #else
36 #include "list.h"
37 #endif // PATHS_IN_INCLUDES
38
39 //////////////////////////////////////////////////////////////////////////////
40 // Macros.
41 //////////////////////////////////////////////////////////////////////////////
42
43 //////////////////////////////////////////////////////////////////////////////
44 // Typedefs.
45 //////////////////////////////////////////////////////////////////////////////
46
47 // This structure is used to encapsulate a rectangle used by RDirtyRects.
48 typedef structcxx . . $ $anonymous_type_1e569bd588d17431_0#
49 {
50 int16_t sXcxx . . $ $anonymous_type_1e569bd588d17431_0#sX.;
51 int16_t sYcxx . . $ $anonymous_type_1e569bd588d17431_0#sY.;
52 int16_t sWcxx . . $ $anonymous_type_1e569bd588d17431_0#sW.;
53 int16_t sHcxx . . $ $anonymous_type_1e569bd588d17431_0#sH.;
54 } RDRectcxx . . $ RDRect#;
55
56
57 //*******************************************************************
58 // NOTE: Do NOT call Insert, InsertHead, or AddTail unless you want
59 // a rectangle to be added w/o combination. A rectangle added later
60 // may be combined with that one, however.
61 //*******************************************************************
62 class RDirtyRectscxx . . $ RDirtyRects# : public RListcxx . . $ RList#<RDRectcxx . . $ RDRect#>
63 {
64 public: // Typedefs.
65
66 public: // Con/Destruction.
67 RDirtyRectscxx . . $ RDirtyRects#RDirtyRects(49f6e7a06ebc5aa8).();
68 RDirtyRectscxx . . $ RDirtyRects#RDirtyRects(6f3a90be462c391b).( int16_t sMinDistX, // Copied into m_sMinDistanceX.
69 int16_t sMinDistY, // Copied into m_sMinDistanceY.
70 int16_t sClipX = -1, // Copied into m_sClipX.
71 int16_t sClipY = -1);// Copied into m_sClipY.
72 ~cxx . . $ RDirtyRects#`~RDirtyRects`(49f6e7a06ebc5aa8).RDirtyRectscxx . . $ RDirtyRects#();
73
74 public: // Implementation.
75 // Use GetHead, GetTail, GetNext, and GetPrev to get the RRects
76 // in no particular order.
77
78 // Add a rectangle to the list of dirty rectangles.
79 // The rectangle may get combined with another.
80 // Returns 0 on success.
81 int16_t Addcxx . . $ RDirtyRects#Add(749dcff02513a31e).(RDRectcxx . . $ RDRect#* pdr);
82 int16_t Addcxx . . $ RDirtyRects#Add(3fa0ba31eb00de54).(int16_t sX, int16_t sY, int16_t sW, int16_t sH);
83
84 // Empty the list of dirty rectangles.
85 void Emptycxx . . $ RDirtyRects#Empty(49f6e7a06ebc5aa8).(void);
86
87 protected: // Internal use only.
88 // Combine a rectangle with rectangles already in
89 // the list if possible.
90 // Returns 0 if combined.
91 int16_t Combinecxx . . $ RDirtyRects#Combine(749dcff02513a31e).(RDRectcxx . . $ RDRect#* pdr);
92
93 // Expand pdrExpand by pdrNew.
94 void Expandcxx . . $ RDirtyRects#Expand(bb3288c586b0bc88).(RDRectcxx . . $ RDRect#* pdrExpand, RDRectcxx . . $ RDRect#* pdrNew);
95
96 // Clip sPos + sDistance to 0 to sClipDistance.
97 // Returns non-zero if clipped out.
98 int16_t Clipcxx . . $ RDirtyRects#Clip(971363a75e80ad32).(int16_t* psPos, int16_t* psDistance, int16_t sClipDistance);
99
100 public: // User may/should modify these.
101 int16_t m_sMinDistanceXcxx . . $ RDirtyRects#m_sMinDistanceX.; // Minimum x-distance between rectangles.
102 // All rectangles closer will be combined.
103 int16_t m_sMinDistanceYcxx . . $ RDirtyRects#m_sMinDistanceY.; // Minimum y-distance between rectangles.
104 // All rectangles closer will be combined.
105 int16_t m_sClipXcxx . . $ RDirtyRects#m_sClipX.; // Clip input rectangles in the x direction.
106 int16_t m_sClipYcxx . . $ RDirtyRects#m_sClipY.; // Clip input rectangles in the y direction.
107 };
108
109 #endif // DIRTRECT
110 //////////////////////////////////////////////////////////////////////////////
111 // EOF
112 //////////////////////////////////////////////////////////////////////////////