acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
item copy.h
1
// From aura/graphics/draw2d/region by camilo on 2023-06-01 06:28 <3ThomasBorregaardSorensen!!
2
#pragma once
3
4
5
//#include "_geometry2d.h"
6
//#include "_collection.h"
7
8
9
//template < prototype_rectangle RECTANGLE >
10
//inline void expand_bounding_box(RECTANGLE & rectangle, const ::f64_point & p)
11
//{
12
//
13
// rectangle.left = (decltype(rectangle.left))minimum(rectangle.left, p.x);
14
// rectangle.right = (decltype(rectangle.right))maximum(rectangle.right, p.x);
15
// rectangle.top = (decltype(rectangle.top))minimum(rectangle.top, p.y);
16
// rectangle.bottom = (decltype(rectangle.bottom))maximum(rectangle.bottom, p.y);
17
//
18
//}
19
20
//template < prototype_rectangle RECTANGLE >
21
//inline void expand_bounding_box(RECTANGLE & rectangle, ::f64_point * p, ::collection::count c)
22
//{
23
//
24
// for (::collection::index i = 0; i < c; i++)
25
// {
26
//
27
// expand_bounding_box(rectangle, *p);
28
//
29
// p++;
30
//
31
// }
32
//
33
//}
34
35
36
namespace
geometry2d
37
{
38
39
40
//class CLASS_DECL_ACME region :
41
// virtual public ::particle
42
//{
43
//public:
44
45
46
class
CLASS_DECL_ACME item :
47
virtual
public
::particle
48
{
49
public
:
50
51
52
virtual ::draw2d::enum_item type()
const
;
53
54
55
virtual
void
translate(const ::f64_point & point);
56
//virtual void expand_bounding_box(::f64_rectangle & rectangle);
57
virtual
bool
contains(const ::f64_point & point);
58
virtual
void
expand_bounding_box(::f64_rectangle & rectangle);
59
60
};
61
62
63
class
CLASS_DECL_ACME begin_figure_item :
64
virtual
public
item
65
{
66
public
:
67
68
69
::draw2d::enum_item type()
const override
;
70
71
72
};
73
74
75
class
CLASS_DECL_ACME close_figure_item :
76
virtual
public
item
77
{
78
public
:
79
80
81
::draw2d::enum_item type()
const override
;
82
83
84
};
85
86
87
88
class
CLASS_DECL_ACME end_figure_item :
89
virtual
public
item
90
{
91
public
:
92
93
94
::draw2d::enum_item type()
const override
;
95
96
97
};
98
99
100
class
CLASS_DECL_ACME intersect_clip_item :
101
virtual
public
item
102
{
103
public
:
104
105
106
::draw2d::enum_item type()
const override
;
107
108
109
};
110
111
112
class
CLASS_DECL_ACME polygon_item :
113
virtual
public
item
114
{
115
public
:
116
117
118
::f64_polygon m_polygon;
119
::draw2d::enum_fill_mode m_efillmode;
120
121
122
::draw2d::enum_item type()
const override
;
123
124
125
//void translate(const ::i32_point & point) override;
126
//void expand_bounding_box(::f64_rectangle & rectangle) override;
127
void
translate(const ::f64_point & point)
override
;
128
bool
contains(const ::f64_point & p)
override
;
129
//virtual bool contains(const ::f64_point & point) { m_item.contains(point); }
130
void
expand_bounding_box(::f64_rectangle & rectangle)
override
;
131
//void expand_bounding_box(::f64_rectangle & rectangle) override;
132
133
134
};
135
136
137
// using poly_polygon_item_base = item_type < ::f64_poly_polygon, ::draw2d::e_item_poly_polygon >;
138
139
140
class
CLASS_DECL_ACME poly_polygon_item :
141
virtual
public
item
142
{
143
public
:
144
145
146
::f64_poly_polygon m_polypolygon;
147
::draw2d::enum_fill_mode m_efillmode;
148
149
150
//::draw2d::enum_item type() const override;
151
152
153
void
translate(const ::f64_point & point)
override
;
154
//void expand_bounding_box(::f64_rectangle & rectangle) override;
155
bool
contains(const ::f64_point & pooint)
override
;
156
void
expand_bounding_box(::f64_rectangle & rectangle)
override
;
157
158
159
};
160
161
162
class
CLASS_DECL_ACME combine_item :
163
virtual
public
item
164
{
165
public
:
166
167
169
170
::pointer < ::geometry2d::region >
m_pregion1
;
171
::pointer < ::geometry2d::region > m_pregion2;
172
::draw2d::enum_combine m_ecombine;
173
174
175
::draw2d::enum_item type()
const override
;
176
177
178
void
translate(const ::f64_point & point)
override
;
179
bool
contains(const ::f64_point & point)
override
;
180
void
expand_bounding_box(::f64_rectangle & rectangle)
override
;
181
182
183
};
184
185
186
class
CLASS_DECL_ACME
round_rectangle_item
:
187
virtual
public
item
188
{
189
public
:
190
191
192
::f64_rectangle m_rectangle;
193
::f64_size m_sizeRadius;
194
195
196
void
translate(const ::f64_point & point)
override
;
197
bool
contains(const ::f64_point & point)
override
;
198
void
expand_bounding_box(::f64_rectangle & rectangle)
override
;
199
200
201
};
202
203
204
// ::draw2d::enum_region m_eregion;
205
// ::pointer<item> m_pitem;
206
207
// ::i32_point m_pointOffset;
208
209
210
// region();
211
// region(const region & region);
212
// ~region() override;
213
214
215
// virtual void destroy() override;
216
217
218
// region & operator = (const region & regionSrc);
219
220
221
// virtual bool create_rectangle(const ::i32_rectangle & rectangle);
222
223
// virtual bool create_ellipse(const ::i32_rectangle & rectangle);
224
225
// virtual bool create_polygon(const ::i32_point * pPoints, ::i32 nCount, ::draw2d::enum_fill_mode efillmode = ::draw2d::e_fill_mode_winding);
226
227
// virtual bool create_polygon(const ::f64_point * pPoints, ::i32 nCount, ::draw2d::enum_fill_mode efillmode = ::draw2d::e_fill_mode_winding);
228
229
// virtual bool create_polygon(const f64_polygon & polygon, ::draw2d::enum_fill_mode efillmode = ::draw2d::e_fill_mode_winding);
230
231
// virtual bool create_poly_polygon(const ::f64_point * pPoints, const ::i32 * lpPolyCounts, ::i32 nCount, ::draw2d::enum_fill_mode efillmode);
232
233
// virtual bool create_poly_polygon(const ::i32_point * pPoints, const ::i32 * lpPolyCounts, ::i32 nCount, ::draw2d::enum_fill_mode efillmode);
234
235
236
// virtual bool combine(const ::geometry2d::region * prgn1, const ::geometry2d::region * prgn2, ::draw2d::enum_combine ecombine);
237
// virtual bool translate(const ::i32_point & point);
238
// virtual bool get_bounding_box(::i32_rectangle & rectangle);
239
240
241
242
// virtual bool contains(const ::i32_point & point);
243
// virtual bool contains(const ::f64_point & point);
244
245
246
// bool contains(const ::i32_point & point);
247
248
// bool internal_rectangle_contains(const ::i32_point & point);
249
250
// bool internal_oval_contains(const ::i32_point & point);
251
252
// bool internal_polygon_contains(const ::i32_point & point);
253
254
// bool internal_poly_polygon_contains(const ::i32_point & point);
255
256
// bool internal_combine_contains(const ::i32_point & point);
257
258
259
260
// bool contains(const ::f64_point & point);
261
262
263
264
// virtual void expand_bounding_box(::i32_rectangle & rectangle);
265
266
267
268
// virtual void expand_bounding_box(::f64_rectangle & rectangle);
269
270
271
272
//};
273
274
275
}
// namespace geometry2d
276
277
278
geometry2d::combine_item::m_pregion1
::pointer< ::geometry2d::region > m_pregion1
pointer_array < f64_polygon > m_polygon;
Definition
item copy.h:170
geometry2d::round_rectangle_item
Definition
item copy.h:188
prototype
geometry2d
item copy.h
Generated by
1.17.0