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-2015 by LMI Technologies Inc. All rights reserved.
7  */
8 #ifndef GDK_GRAPHIC_H
9 #define GDK_GRAPHIC_H
10 
11 #include <Gdk/GdkDef.h>
13 
14 kBeginHeader()
15 
16 /**
17  * @class GdkGraphicLineSet
18  * @extends kObject
19  * @ingroup Gdk-Data
20  * @brief Represents a set of 2d polylines.
21  */
23 
24 /**
25  * Creates a set of polylines.
26  *
27  * @public @memberof GdkGraphicLineSet
28  * @param set Handle to hold the newly constructed line set.
29  * @param width Line width.
30  * @param colour Line colour.
31  * @param points Array of line points (if null, will allocate a buffer without copying points).
32  * @param count Count of points.
33  * @param allocator Memory allocator to use in constructing the object.
34  * @return Operation status.
35  */
36 GdkFx(kStatus) GdkGraphicLineSet_Construct(GdkGraphicLineSet* set, k32f width, kColor colour, const kPoint3d32f* points, kSize count, kAlloc allocator);
37 
38 /**
39  * Returns an array list of points.
40  *
41  * @public @memberof GdkGraphicLineSet
42  * @param set The graphic line set object.
43  * @return The array list of points.
44  */
45 GdkFx(kArrayList) GdkGraphicLineSet_PointList(GdkGraphicLineSet set);
46 
47 /**
48  * Returns the configured width of the line set.
49  *
50  * @public @memberof GdkGraphicLineSet
51  * @param set The graphic line set object.
52  * @return The line set width.
53  */
54 GdkFx(k32f) GdkGraphicLineSet_Width(GdkGraphicLineSet set);
55 
56 /**
57  * Sets the width of the line set.
58  *
59  * @public @memberof GdkGraphicLineSet
60  * @param set The graphic line set object.
61  * @param width The desired width of the line set.
62  * @return Operation status.
63  */
64 GdkFx(kStatus) GdkGraphicLineSet_SetWidth(GdkGraphicLineSet set, k32f width);
65 
66 /**
67  * Returns the configured colour of the line set.
68  *
69  * @public @memberof GdkGraphicLineSet
70  * @param set The graphic line set object.
71  * @return The line set colour.
72  */
73 GdkFx(kColor) GdkGraphicLineSet_Colour(GdkGraphicLineSet set);
74 
75 /**
76  * Sets the colour of the line set.
77  *
78  * @public @memberof GdkGraphicLineSet
79  * @param set The graphic line set object.
80  * @param colour The desired colour of the line set.
81  * @return Operation status.
82  */
83 GdkFx(kStatus) GdkGraphicLineSet_SetColour(GdkGraphicLineSet set, kColor colour);
84 
85 /**
86  * @class GdkGraphicPointSet
87  * @extends kObject
88  * @ingroup GoSensor-Data
89  * @brief Represents a set of points.
90  */
92 
93 /**
94  * Creates a set of points.
95  *
96  * @public @memberof GdkGraphicPointSet
97  * @param set Pointer to assign the constructed point set to.
98  * @param size Size of the points to be drawn.
99  * @param shape Shape of the points to be drawn.
100  * @param colour Colour of the points to be drawn.
101  * @param points Array of points (if null, will allocate a buffer without copying points).
102  * @param count Count of points.
103  * @param allocator Memory allocator to use in constructing the object.
104  * @return Operation status.
105  */
106 GdkFx(kStatus) GdkGraphicPointSet_Construct(GdkGraphicPointSet* set, k32f size, kMarkerShape shape, kColor colour, const kPoint3d32f* points, kSize count, kAlloc allocator);
107 
108 /**
109  * Returns an array list of points.
110  *
111  * @public @memberof GdkGraphicLineSet
112  * @param set The graphic line set object.
113  * @return The array list of points.
114  */
115 GdkFx(kArrayList) GdkGraphicPointSet_PointList(GdkGraphicPointSet set);
116 
117 /**
118  * Returns the configured size of the point set.
119  *
120  * @public @memberof GdkGraphicPointSet
121  * @param set The graphic point set object.
122  * @return The point set size.
123  */
124 GdkFx(k32f) GdkGraphicPointSet_Size(GdkGraphicPointSet set);
125 
126 /**
127  * Sets the size of the point set.
128  *
129  * @public @memberof GdkGraphicPointSet
130  * @param set The graphic point set object.
131  * @param size The desired size of the point set.
132  * @return Operation status.
133  */
134 GdkFx(kStatus) GdkGraphicPointSet_SetSize(GdkGraphicPointSet set, k32f size);
135 
136 /**
137  * Returns the configured shape of the point set.
138  *
139  * @public @memberof GdkGraphicPointSet
140  * @param set The graphic point set object.
141  * @return The point set shape.
142  */
143 GdkFx(kMarkerShape) GdkGraphicPointSet_Shape(GdkGraphicPointSet set);
144 
145 /**
146  * Sets the shape of the point set.
147  *
148  * @public @memberof GdkGraphicPointSet
149  * @param set The graphic point set object.
150  * @param shape The desired shape of the point set.
151  * @return Operation status.
152  */
153 GdkFx(kStatus) GdkGraphicPointSet_SetShape(GdkGraphicPointSet set, kMarkerShape shape);
154 
155 /**
156  * Returns the configured colour of the point set.
157  *
158  * @public @memberof GdkGraphicPointSet
159  * @param set The graphic point set object.
160  * @return The point set colour.
161  */
162 GdkFx(kColor) GdkGraphicPointSet_Colour(GdkGraphicPointSet set);
163 
164 /**
165  * Sets the colour of the point set.
166  *
167  * @public @memberof GdkGraphicPointSet
168  * @param set The graphic point set object.
169  * @param colour The desired colour of the point set.
170  * @return Operation status.
171  */
172 GdkFx(kStatus) GdkGraphicPointSet_SetColour(GdkGraphicPointSet set, kColor colour);
173 
174 /**
175  * @class GdkGraphic
176  * @extends kObject
177  * @ingroup Gdk-Data
178  * @brief Represents a collection of vector graphics.
179  */
180 typedef kObject GdkGraphic;
181 
182 /**
183  * Constructs a graphic object.
184  *
185  * @public @memberof GdkGraphic
186  * @param graphic Destination for the constructed object handle.
187  * @param allocator Memory allocator (or kNULL for default).
188  * @return Operation status.
189  */
190 GdkFx(kStatus) GdkGraphic_Construct(GdkGraphic* graphic, kObject allocator);
191 
192 /**
193  * Returns an arraylist of lines for Flash renderer data serialization
194  *
195  * @public @memberof GdkGraphic
196  * @param graphic Graphic object.
197  * @return An arraylist of GdkGraphicLineSet
198  */
199 GdkFx(kArrayList) GdkGraphic_LineSetList(GdkGraphic graphic);
200 
201 /**
202  * Adds a line set to the GdkGraphic instance.
203  *
204  * @public @memberof GdkGraphic
205  * @param graphic Graphic object.
206  * @param set The line set to be added.
207  * @return Operation status.
208  */
209 GdkFx(kStatus) GdkGraphic_AddLineSet(GdkGraphic graphic, GdkGraphicLineSet set);
210 
211 /**
212  * Removes a line set from the GdkGraphic instance.
213  *
214  * @public @memberof GdkGraphic
215  * @param graphic Graphic object.
216  * @param index The index of the line set to remove.
217  * @return Operation status.
218  */
219 GdkFx(kStatus) GdkGraphic_RemoveLineSet(GdkGraphic graphic, kSize index);
220 
221 /**
222  * Returns the number of line sets currently in the graphic object.
223  *
224  * @public @memberof GdkGraphic
225  * @param graphic Graphic object.
226  * @return The current number of line sets in the graphic object.
227  */
228 GdkFx(kSize) GdkGraphic_LineSetCount(GdkGraphic graphic);
229 
230 /**
231  * Retrieves a line set at the specified index.
232  *
233  * @public @memberof GdkGraphic
234  * @param graphic Graphic object.
235  * @param index The index of the line set to remove.
236  * @return A graphic line set or kNULL if the index is invalid.
237  */
238 GdkFx(GdkGraphicLineSet) GdkGraphic_LineSetAt(GdkGraphic graphic, kSize index);
239 
240 /**
241  * Returns an arraylist of points for Flash renderer data serialization
242  *
243  * @public @memberof GdkGraphic
244  * @param graphic Graphic object.
245  * @return An arraylist of GdkGraphicPointSet
246  */
247 GdkFx(kArrayList) GdkGraphic_PointSetList(GdkGraphic graphic);
248 
249 /**
250  * Adds a point set to the GdkGraphic instance.
251  *
252  * @public @memberof GdkGraphic
253  * @param graphic Graphic object.
254  * @param set The point set to be added.
255  * @return Operation status.
256  */
257 GdkFx(kStatus) GdkGraphic_AddPointSet(GdkGraphic graphic, GdkGraphicPointSet set);
258 
259 /**
260  * Returns the number of point sets currently in the graphic object.
261  *
262  * @public @memberof GdkGraphic
263  * @param graphic Graphic object.
264  * @return The current number of point sets in the graphic object.
265  */
266 GdkFx(kSize) GdkGraphic_PointSetCount(GdkGraphic graphic);
267 
268 /**
269  * Retrieves a point set at the specified index.
270  *
271  * @public @memberof GdkGraphic
272  * @param graphic Graphic object.
273  * @param index The index of the point set to remove.
274  * @return A graphic point set or kNULL if the index is invalid.
275  */
276 GdkFx(GdkGraphicPointSet) GdkGraphic_PointSetAt(GdkGraphic graphic, kSize index);
277 
278 /**
279  * Removes a point set from the GdkGraphic instance.
280  *
281  * @public @memberof GdkGraphic
282  * @param graphic Graphic object.
283  * @param index The index of the point set to remove.
284  * @return Operation status.
285  */
286 GdkFx(kStatus) GdkGraphic_RemovePointSet(GdkGraphic graphic, kSize index);
287 
288 /**
289  * Adds a point set to the point set list.
290  *
291  * @public @memberof GdkGraphic
292  * @param graphic Graphic object.
293  * @param set A GdkGraphicPointSet to add;
294  * @return Operation status.
295  */
296 GdkFx(kStatus) GdkGraphic_AddPointSet(GdkGraphic graphic, GdkGraphicPointSet set);
297 
298 /**
299  * Generates a kGraphic object for use with functions which may require a kGraphic.
300  *
301  * @public @memberof GdkGraphic
302  * @param object GdkGraphic object to derive a kGraphic from.
303  * @param graphic kGraphic object.
304  * @return Operation status.
305  */
306 GdkFx(kStatus) GdkGraphic_GeneratekGraphic(GdkGraphic object, kGraphic* graphic);
307 
308 /**
309  * Given a serializer, the contents of the line and point lists are written
310  * in a predefined format.
311  *
312  * @public @memberof GdkGraphic
313  * @param graphic GdkGraphic object.
314  * @param serializer A kSerializer object with which to populate.
315  * @return Operation status.
316  */
317 GdkFx(kStatus) GdkGraphic_Serialize(GdkGraphic graphic, kSerializer serializer);
318 
319 kEndHeader()
320 #include <Gdk/Data/GdkGraphic.x.h>
321 
322 #endif
Essential Gdk declarations.
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.
kStatus GdkGraphic_GeneratekGraphic(GdkGraphic object, kGraphic *graphic)
Generates a kGraphic object for use with functions which may require a kGraphic.
kStatus GdkGraphic_Serialize(GdkGraphic graphic, kSerializer serializer)
Given a serializer, the contents of the line and point lists are written in a predefined format...
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 GdkGraphicPointSet_SetShape(GdkGraphicPointSet set, kMarkerShape shape)
Sets the shape of the point set.
kArrayList GdkGraphicPointSet_PointList(GdkGraphicPointSet set)
Returns an array list of points.
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.
Represents a set of 2d polylines.
kStatus GdkGraphicLineSet_Construct(GdkGraphicLineSet *set, k32f width, kColor colour, const kPoint3d32f *points, kSize count, kAlloc allocator)
Creates a set of polylines.
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.
kStatus GdkGraphic_RemovePointSet(GdkGraphic graphic, kSize index)
Removes a point set from the GdkGraphic instance.
kColor GdkGraphicLineSet_Colour(GdkGraphicLineSet set)
Returns the configured colour of the line set.
kStatus GdkGraphicLineSet_SetColour(GdkGraphicLineSet set, kColor colour)
Sets the colour of the line set.
kStatus GdkGraphic_AddLineSet(GdkGraphic graphic, GdkGraphicLineSet set)
Adds a line set to the GdkGraphic instance.
kArrayList GdkGraphic_LineSetList(GdkGraphic graphic)
Returns an arraylist of lines for Flash renderer data serialization.
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 GdkGraphic instance.
kColor GdkGraphicPointSet_Colour(GdkGraphicPointSet set)
Returns the configured colour of the point set.
Represents a set of points.
kArrayList GdkGraphic_PointSetList(GdkGraphic graphic)
Returns an arraylist of points for Flash renderer data serialization.
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.
k32f GdkGraphicPointSet_Size(GdkGraphicPointSet set)
Returns the configured size of the point set.
kArrayList GdkGraphicLineSet_PointList(GdkGraphicLineSet set)
Returns an array list of points.