Gocator Development Kit
 All Classes Files Functions Variables Typedefs Friends Modules Pages
GdkGraphic.h
Go to the documentation of this file.
1 /**
2  * @file GdkGraphic.h
3  * @brief Declares the GdkGraphic class.
4  *
5  * @internal
6  * Copyright (C) 2008-2022 by LMI Technologies Inc. All rights reserved.
7  */
8 #ifndef GDK_GRAPHIC_H
9 #define GDK_GRAPHIC_H
10 
11 #include <Gdk/GdkDef.h>
18 #include <Gdk/Data/GdkGraphicRay.h>
20 
21 /**
22  * @class GdkGraphicLineSet
23  * @extends kObject
24  * @ingroup Gdk-Data
25  * @brief Represents a set of 2d polylines.
26  */
28 
29 /**
30  * Creates a set of polylines.
31  *
32  * @public @memberof GdkGraphicLineSet
33  * @param set Handle to hold the newly constructed line set.
34  * @param width Line width.
35  * @param colour Line colour.
36  * @param points Array of line points (if null, will allocate a buffer without copying points).
37  * @param count Count of points.
38  * @param allocator Memory allocator to use in constructing the object.
39  * @return Operation status.
40  */
41 GdkFx(kStatus) GdkGraphicLineSet_Construct(GdkGraphicLineSet* set, k32f width, kColor colour, const kPoint3d32f* points, kSize count, kAlloc allocator);
42 
43 /**
44  * Returns the configured width of the line set.
45  *
46  * @public @memberof GdkGraphicLineSet
47  * @param set The graphic line set object.
48  * @return The line set width.
49  */
51 
52 /**
53  * Sets the width of the line set.
54  *
55  * @public @memberof GdkGraphicLineSet
56  * @param set The graphic line set object.
57  * @param width The desired width of the line set.
58  * @return Operation status.
59  */
61 
62 /**
63  * Returns the configured colour of the line set.
64  *
65  * @public @memberof GdkGraphicLineSet
66  * @param set The graphic line set object.
67  * @return The line set colour.
68  */
70 
71 /**
72  * Sets the colour of the line set.
73  *
74  * @public @memberof GdkGraphicLineSet
75  * @param set The graphic line set object.
76  * @param colour The desired colour of the line set.
77  * @return Operation status.
78  */
80 
81 /**
82  * @class GdkGraphicPointSet
83  * @extends kObject
84  * @ingroup GoSensor-Data
85  * @brief Represents a set of points.
86  */
88 
89 /**
90  * Creates a set of points.
91  *
92  * @public @memberof GdkGraphicPointSet
93  * @param set Pointer to assign the constructed point set to.
94  * @param size Size of the points to be drawn.
95  * @param shape Shape of the points to be drawn.
96  * @param colour Colour of the points to be drawn.
97  * @param points Array of points (if null, will allocate a buffer without copying points).
98  * @param count Count of points.
99  * @param allocator Memory allocator to use in constructing the object.
100  * @return Operation status.
101  */
102 GdkFx(kStatus) GdkGraphicPointSet_Construct(GdkGraphicPointSet* set, k32f size, kMarkerShape shape, kColor colour, const kPoint3d32f* points, kSize count, kAlloc allocator);
103 
104 /**
105  * Returns the configured size of the point set.
106  *
107  * @public @memberof GdkGraphicPointSet
108  * @param set The graphic point set object.
109  * @return The point set size.
110  */
111 GdkFx(k32f) GdkGraphicPointSet_Size(GdkGraphicPointSet set);
112 
113 /**
114  * Sets the size of the point set.
115  *
116  * @public @memberof GdkGraphicPointSet
117  * @param set The graphic point set object.
118  * @param size The desired size of the point set.
119  * @return Operation status.
120  */
121 GdkFx(kStatus) GdkGraphicPointSet_SetSize(GdkGraphicPointSet set, k32f size);
122 
123 /**
124  * Returns the configured shape of the point set.
125  *
126  * @public @memberof GdkGraphicPointSet
127  * @param set The graphic point set object.
128  * @return The point set shape.
129  */
130 GdkFx(kMarkerShape) GdkGraphicPointSet_Shape(GdkGraphicPointSet set);
131 
132 /**
133  * Sets the shape of the point set.
134  *
135  * @public @memberof GdkGraphicPointSet
136  * @param set The graphic point set object.
137  * @param shape The desired shape of the point set.
138  * @return Operation status.
139  */
140 GdkFx(kStatus) GdkGraphicPointSet_SetShape(GdkGraphicPointSet set, kMarkerShape shape);
141 
142 /**
143  * Returns the configured colour of the point set.
144  *
145  * @public @memberof GdkGraphicPointSet
146  * @param set The graphic point set object.
147  * @return The point set colour.
148  */
149 GdkFx(kColor) GdkGraphicPointSet_Colour(GdkGraphicPointSet set);
150 
151 /**
152  * Sets the colour of the point set.
153  *
154  * @public @memberof GdkGraphicPointSet
155  * @param set The graphic point set object.
156  * @param colour The desired colour of the point set.
157  * @return Operation status.
158  */
159 GdkFx(kStatus) GdkGraphicPointSet_SetColour(GdkGraphicPointSet set, kColor colour);
160 
161 /**
162  * @class GdkGraphic
163  * @extends kObject
164  * @ingroup Gdk-Data
165  * @brief Represents a collection of vector graphics.
166  */
167 typedef kObject GdkGraphic;
168 
169 /**
170  * Constructs a graphic object.
171  *
172  * @public @memberof GdkGraphic
173  * @param graphic Destination for the constructed object handle.
174  * @param allocator Memory allocator (or kNULL for default).
175  * @return Operation status.
176  */
177 GdkFx(kStatus) GdkGraphic_Construct(GdkGraphic* graphic, kObject allocator);
178 
179 /**
180  * Adds a line set to the GdkGraphic instance.
181  *
182  * @public @memberof GdkGraphic
183  * @param graphic Graphic object.
184  * @param set The line set to be added.
185  * @return Operation status.
186  */
187 GdkFx(kStatus) GdkGraphic_AddLineSet(GdkGraphic graphic, GdkGraphicLineSet set);
188 
189 /**
190  * Removes a line set from the GdkGraphic instance.
191  *
192  * @public @memberof GdkGraphic
193  * @param graphic Graphic object.
194  * @param index The index of the line set to remove.
195  * @return Operation status.
196  */
197 GdkFx(kStatus) GdkGraphic_RemoveLineSet(GdkGraphic graphic, kSize index);
198 
199 /**
200  * Returns the number of line sets currently in the graphic object.
201  *
202  * @public @memberof GdkGraphic
203  * @param graphic Graphic object.
204  * @return The current number of line sets in the graphic object.
205  */
206 GdkFx(kSize) GdkGraphic_LineSetCount(GdkGraphic graphic);
207 
208 /**
209  * Retrieves a line set at the specified index.
210  *
211  * @public @memberof GdkGraphic
212  * @param graphic Graphic object.
213  * @param index The index of the line set to remove.
214  * @return A graphic line set or kNULL if the index is invalid.
215  */
216 GdkFx(GdkGraphicLineSet) GdkGraphic_LineSetAt(GdkGraphic graphic, kSize index);
217 
218 /**
219  * Returns the number of point sets currently in the graphic object.
220  *
221  * @public @memberof GdkGraphic
222  * @param graphic Graphic object.
223  * @return The current number of point sets in the graphic object.
224  */
225 GdkFx(kSize) GdkGraphic_PointSetCount(GdkGraphic graphic);
226 
227 /**
228  * Retrieves a point set at the specified index.
229  *
230  * @public @memberof GdkGraphic
231  * @param graphic Graphic object.
232  * @param index The index of the point set to remove.
233  * @return A graphic point set or kNULL if the index is invalid.
234  */
235 GdkFx(GdkGraphicPointSet) GdkGraphic_PointSetAt(GdkGraphic graphic, kSize index);
236 
237 /**
238  * Adds a point set to the point set list.
239  *
240  * @public @memberof GdkGraphic
241  * @param graphic Graphic object.
242  * @param set A GdkGraphicPointSet to add;
243  * @return Operation status.
244  */
245 GdkFx(kStatus) GdkGraphic_AddPointSet(GdkGraphic graphic, GdkGraphicPointSet set);
246 
247 /**
248  * Removes a point set from the GdkGraphic instance.
249  *
250  * @public @memberof GdkGraphic
251  * @param graphic Graphic object.
252  * @param index The index of the point set to remove.
253  * @return Operation status.
254  */
255 GdkFx(kStatus) GdkGraphic_RemovePointSet(GdkGraphic graphic, kSize index);
256 /**
257 * Adds an anchor region to the GdkGraphic instance.
258 *
259 * @public @memberof GdkGraphic
260 * @param graphic Graphic object.
261 * @param region The anchor region to be added.
262 * @return Operation status.
263 */
264 GdkFx(kStatus) GdkGraphic_AddAnchorRegion(GdkGraphic graphic, GdkGraphicAnchorRegion region);
265 
266 /**
267 * Returns the number of anchor regions currently in the graphic object.
268 *
269 * @public @memberof GdkGraphic
270 * @param graphic Graphic object.
271 * @return The current number of anchor regions in the graphic object.
272 */
273 GdkFx(kSize) GdkGraphic_AnchorRegionCount(GdkGraphic graphic);
274 
275 /**
276 * Retrieves an anchor region at the specified index.
277 *
278 * @public @memberof GdkGraphic
279 * @param graphic Graphic object.
280 * @param index The index of the anchor region to remove.
281 * @return A graphic anchor region or kNULL if the index is invalid.
282 */
283 GdkFx(GdkGraphicAnchorRegion) GdkGraphic_AnchorRegionAt(GdkGraphic graphic, kSize index);
284 
285 /**
286 * Removes an anchor region from the GdkGraphic instance.
287 *
288 * @public @memberof GdkGraphic
289 * @param graphic Graphic object.
290 * @param index The index of the anchor region to remove.
291 * @return Operation status.
292 */
293 GdkFx(kStatus) GdkGraphic_RemoveAnchorRegion(GdkGraphic graphic, kSize index);
294 
295 /**
296 * Adds an anchor region to the point set list.
297 *
298 * @public @memberof GdkGraphic
299 * @param graphic Graphic object.
300 * @param region A GdkGraphicPlane to add;
301 * @return Operation status.
302 */
303 GdkFx(kStatus) GdkGraphic_AddAnchorRegion(GdkGraphic graphic, GdkGraphicPlane region);
304 
305 /**
306 * Adds a plane to the GdkGraphic instance.
307 *
308 * @public @memberof GdkGraphic
309 * @param graphic Graphic object.
310 * @param plane The plane to be added.
311 * @return Operation status.
312 */
313 GdkFx(kStatus) GdkGraphic_AddPlane(GdkGraphic graphic, GdkGraphicPlane plane);
314 
315 /**
316 * Removes a plane from the GdkGraphic instance.
317 *
318 * @public @memberof GdkGraphic
319 * @param graphic Graphic object.
320 * @param index The index of the plane to remove.
321 * @return Operation status.
322 */
323 GdkFx(kStatus) GdkGraphic_RemovePlane(GdkGraphic graphic, kSize index);
324 
325 /**
326 * Returns the number of planes currently in the graphic object.
327 *
328 * @public @memberof GdkGraphic
329 * @param graphic Graphic object.
330 * @return The current number of planes in the graphic object.
331 */
332 GdkFx(kSize) GdkGraphic_PlaneCount(GdkGraphic graphic);
333 
334 /**
335 * Retrieves a plane at the specified index.
336 *
337 * @public @memberof GdkGraphic
338 * @param graphic Graphic object.
339 * @param index The index of the plane to remove.
340 * @return A graphic plane or kNULL if the index is invalid.
341 */
342 GdkFx(GdkGraphicPlane) GdkGraphic_PlaneAt(GdkGraphic graphic, kSize index);
343 
344 /**
345 * Adds a ray to the GdkGraphic instance.
346 *
347 * @public @memberof GdkGraphic
348 * @param graphic Graphic object.
349 * @param ray The ray to be added.
350 * @return Operation status.
351 */
352 GdkFx(kStatus) GdkGraphic_AddRay(GdkGraphic graphic, GdkGraphicRay ray);
353 
354 /**
355 * Removes a ray from the GdkGraphic instance.
356 *
357 * @public @memberof GdkGraphic
358 * @param graphic Graphic object.
359 * @param index The index of the ray to remove.
360 * @return Operation status.
361 */
362 GdkFx(kStatus) GdkGraphic_RemoveRay(GdkGraphic graphic, kSize index);
363 
364 /**
365 * Returns the number of rays currently in the graphic object.
366 *
367 * @public @memberof GdkGraphic
368 * @param graphic Graphic object.
369 * @return The current number rays in the graphic object.
370 */
371 GdkFx(kSize) GdkGraphic_RayCount(GdkGraphic graphic);
372 
373 /**
374 * Retrieves a ray at the specified index.
375 *
376 * @public @memberof GdkGraphic
377 * @param graphic Graphic object.
378 * @param index The index of the ray to remove.
379 * @return A graphic ray or kNULL if the index is invalid.
380 */
381 GdkFx(GdkGraphicPlane) GdkGraphic_RayAt(GdkGraphic graphic, kSize index);
382 
383 /**
384 * Adds a label to the GdkGraphic instance.
385 *
386 * @public @memberof GdkGraphic
387 * @param graphic Graphic object.
388 * @param label The label object to be added.
389 * @return Operation status.
390 */
391 GdkFx(kStatus) GdkGraphic_AddLabel(GdkGraphic graphic, GdkGraphicLabel label);
392 
393 /**
394 * Removes a label from the GdkGraphic instance.
395 *
396 * @public @memberof GdkGraphic
397 * @param graphic Graphic object.
398 * @param index The index of the label to remove.
399 * @return Operation status.
400 */
401 GdkFx(kStatus) GdkGraphic_RemoveLabel(GdkGraphic graphic, kSize index);
402 
403 /**
404 * Returns the number of labels currently in the graphic object.
405 *
406 * @public @memberof GdkGraphic
407 * @param graphic Graphic object.
408 * @return The current number of labels in the graphic object.
409 */
410 GdkFx(kSize) GdkGraphic_LabelCount(GdkGraphic graphic);
411 
412 /**
413 * Retrieves a label at the specified index.
414 *
415 * @public @memberof GdkGraphic
416 * @param graphic Graphic object.
417 * @param index The index of the label to retrieve.
418 * @return A graphic label or kNULL if the index is invalid.
419 */
420 GdkFx(GdkGraphicLabel) GdkGraphic_LabelAt(GdkGraphic graphic, kSize index);
421 
422 /**
423 * Adds a postion to the GdkGraphic instance.
424 *
425 * @public @memberof GdkGraphic
426 * @param graphic Graphic object.
427 * @param position The position object to be added.
428 * @return Operation status.
429 */
430 GdkFx(kStatus) GdkGraphic_AddPosition(GdkGraphic graphic, GdkGraphicPosition position);
431 
432 /**
433 * Removes a position from the GdkGraphic instance.
434 *
435 * @public @memberof GdkGraphic
436 * @param graphic Graphic object.
437 * @param index The index of the label to remove.
438 * @return Operation status.
439 */
440 GdkFx(kStatus) GdkGraphic_RemovePosition(GdkGraphic graphic, kSize index);
441 
442 /**
443 * Returns the number of positions currently in the graphic object.
444 *
445 * @public @memberof GdkGraphic
446 * @param graphic Graphic object.
447 * @return The current number of positions in the graphic object.
448 */
449 GdkFx(kSize) GdkGraphic_PositionCount(GdkGraphic graphic);
450 
451 /**
452 * Retrieves a position at the specified index.
453 *
454 * @public @memberof GdkGraphic
455 * @param graphic Graphic object.
456 * @param index The index of the position to retrieve.
457 * @return A graphic label or kNULL if the index is invalid.
458 */
459 GdkFx(GdkGraphicLabel) GdkGraphic_PositionAt(GdkGraphic graphic, kSize index);
460 
461 /**
462 * Adds a graphic item to the graphic object. The item must be one of the supported types.
463 *
464 * @public @memberof GdkGraphic
465 * @param graphic Graphic object.
466 * @param item A supported graphic item type (e.g. GdkGraphicPointSet).
467 * @return Operation status.
468 */
469 GdkFx(kStatus) GdkGraphic_AddItem(GdkGraphic graphic, kObject item);
470 
471 /**
472  * Given a serializer, the contents of the line and point lists are written
473  * in a predefined format.
474  *
475  * @public @memberof GdkGraphic
476  * @param graphic GdkGraphic object.
477  * @param serializer A kSerializer object with which to populate.
478  * @return Operation status.
479  */
480 GdkFx(kStatus) GdkGraphic_Serialize(GdkGraphic graphic, kSerializer serializer);
481 
482 /**
483 * Given a serializer, a null (empty) graphics object is written in a predefined
484 * format
485 *
486 * @public @memberof GdkGraphic
487 * @param serializer A kSerializer object with which to populate.
488 * @return Operation status.
489 */
490 GdkFx(kStatus) GdkGraphic_SerializeNull(kSerializer serializer);
491 
492 #include <Gdk/Data/GdkGraphic.x.h>
493 
494 #endif
Represents a label.
Essential Gdk declarations.
Represents a plane.
Declares the GdkGraphicPlane class.
kStatus GdkGraphic_RemoveLineSet(GdkGraphic graphic, kSize index)
Removes a line set from the GdkGraphic instance.
GdkGraphicPointSet GdkGraphic_PointSetAt(GdkGraphic graphic, kSize index)
Retrieves a point set at the specified index.
kStatus GdkGraphicPointSet_SetColour(GdkGraphicPointSet set, kColor colour)
Sets the colour of the point set.
Declares the GdkGraphicPosition class.
Declares the GdkGraphicAnchorRegion2d class.
kSize GdkGraphic_PlaneCount(GdkGraphic graphic)
Returns the number of planes currently in the graphic object.
kStatus GdkGraphic_Serialize(GdkGraphic graphic, kSerializer serializer)
Given a serializer, the contents of the line and point lists are written in a predefined format...
Represents a collection of vector anchorRegions.
Represents a plane.
k32f GdkGraphicLineSet_Width(GdkGraphicLineSet set)
Returns the configured width of the line set.
kStatus GdkGraphic_Construct(GdkGraphic *graphic, kObject allocator)
Constructs a graphic object.
kStatus GdkGraphic_RemoveRay(GdkGraphic graphic, kSize index)
Removes a ray from the GdkGraphic instance.
GdkGraphicLabel GdkGraphic_LabelAt(GdkGraphic graphic, kSize index)
Retrieves a label at the specified index.
kStatus GdkGraphicPointSet_SetShape(GdkGraphicPointSet set, kMarkerShape shape)
Sets the shape of the point set.
kMarkerShape GdkGraphicPointSet_Shape(GdkGraphicPointSet set)
Returns the configured shape of the point set.
Represents a collection of vector graphics.
kStatus GdkGraphicPointSet_Construct(GdkGraphicPointSet *set, k32f size, kMarkerShape shape, kColor colour, const kPoint3d32f *points, kSize count, kAlloc allocator)
Creates a set of points.
kSize GdkGraphic_AnchorRegionCount(GdkGraphic graphic)
Returns the number of anchor regions currently in the graphic object.
Represents a set of 2d polylines.
kStatus GdkGraphic_AddLabel(GdkGraphic graphic, GdkGraphicLabel label)
Adds a label to the GdkGraphic instance.
kStatus GdkGraphicLineSet_Construct(GdkGraphicLineSet *set, k32f width, kColor colour, const kPoint3d32f *points, kSize count, kAlloc allocator)
Creates a set of polylines.
kStatus GdkGraphic_RemoveLabel(GdkGraphic graphic, kSize index)
Removes a label from the GdkGraphic instance.
kSize GdkGraphic_LineSetCount(GdkGraphic graphic)
Returns the number of line sets currently in the graphic object.
GdkGraphicLineSet GdkGraphic_LineSetAt(GdkGraphic graphic, kSize index)
Retrieves a line set at the specified index.
Declares the GdkGraphicAnchorRegion class.
kStatus GdkGraphic_RemovePosition(GdkGraphic graphic, kSize index)
Removes a position from the GdkGraphic instance.
Declares the GdkGraphicAnchorRegion3d class.
kStatus GdkGraphic_RemovePointSet(GdkGraphic graphic, kSize index)
Removes a point set from the GdkGraphic instance.
kStatus GdkGraphic_AddPlane(GdkGraphic graphic, GdkGraphicPlane plane)
Adds a plane to the GdkGraphic instance.
kStatus GdkGraphic_AddRay(GdkGraphic graphic, GdkGraphicRay ray)
Adds a ray to the GdkGraphic instance.
kColor GdkGraphicLineSet_Colour(GdkGraphicLineSet set)
Returns the configured colour of the line set.
kSize GdkGraphic_LabelCount(GdkGraphic graphic)
Returns the number of labels currently in the graphic object.
kStatus GdkGraphicLineSet_SetColour(GdkGraphicLineSet set, kColor colour)
Sets the colour of the line set.
GdkGraphicAnchorRegion GdkGraphic_AnchorRegionAt(GdkGraphic graphic, kSize index)
Retrieves an anchor region at the specified index.
kStatus GdkGraphic_AddLineSet(GdkGraphic graphic, GdkGraphicLineSet set)
Adds a line set to the GdkGraphic instance.
kStatus GdkGraphicPointSet_SetSize(GdkGraphicPointSet set, k32f size)
Sets the size of the point set.
kStatus GdkGraphic_AddPointSet(GdkGraphic graphic, GdkGraphicPointSet set)
Adds a point set to the point set list.
GdkGraphicLabel GdkGraphic_PositionAt(GdkGraphic graphic, kSize index)
Retrieves a position at the specified index.
kColor GdkGraphicPointSet_Colour(GdkGraphicPointSet set)
Returns the configured colour of the point set.
kStatus GdkGraphic_SerializeNull(kSerializer serializer)
Given a serializer, a null (empty) graphics object is written in a predefined format.
Represents a set of points.
kStatus GdkGraphic_RemoveAnchorRegion(GdkGraphic graphic, kSize index)
Removes an anchor region from the GdkGraphic instance.
kStatus GdkGraphic_AddItem(GdkGraphic graphic, kObject item)
Adds a graphic item to the graphic object.
kSize GdkGraphic_RayCount(GdkGraphic graphic)
Returns the number of rays currently in the graphic object.
kStatus GdkGraphic_RemovePlane(GdkGraphic graphic, kSize index)
Removes a plane from the GdkGraphic instance.
kStatus GdkGraphicLineSet_SetWidth(GdkGraphicLineSet set, k32f width)
Sets the width of the line set.
kSize GdkGraphic_PointSetCount(GdkGraphic graphic)
Returns the number of point sets currently in the graphic object.
kSize GdkGraphic_PositionCount(GdkGraphic graphic)
Returns the number of positions currently in the graphic object.
k32f GdkGraphicPointSet_Size(GdkGraphicPointSet set)
Returns the configured size of the point set.
kStatus GdkGraphic_AddAnchorRegion(GdkGraphic graphic, GdkGraphicAnchorRegion region)
Adds an anchor region to the GdkGraphic instance.
Represents a label.
GdkGraphicPlane GdkGraphic_PlaneAt(GdkGraphic graphic, kSize index)
Retrieves a plane at the specified index.
Declares the GdkGraphicLabel class.
GdkGraphicPlane GdkGraphic_RayAt(GdkGraphic graphic, kSize index)
Retrieves a ray at the specified index.
kStatus GdkGraphic_AddPosition(GdkGraphic graphic, GdkGraphicPosition position)
Adds a postion to the GdkGraphic instance.