scriptup 2024.0.5 → 2024.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/ext/attribute_dictionaries.c +1 -1
  3. data/ext/color.c +3 -3
  4. data/ext/component_definition.c +2 -2
  5. data/ext/definition_list.c +1 -1
  6. data/ext/entity.c +8 -3
  7. data/ext/extconf.rb +1 -1
  8. data/ext/material.c +4 -7
  9. data/ext/utils.h +4 -4
  10. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
  11. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
  12. data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
  13. data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
  14. data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
  15. data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
  16. data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
  17. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
  18. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
  19. data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
  20. data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +117 -0
  21. data/sketchup-sdk-win/headers/LayOutAPI/common.h +22 -0
  22. data/sketchup-sdk-win/headers/LayOutAPI/geometry/geometry.h +78 -0
  23. data/sketchup-sdk-win/headers/LayOutAPI/initialize.h +36 -0
  24. data/sketchup-sdk-win/headers/LayOutAPI/layout.h +49 -0
  25. data/sketchup-sdk-win/headers/LayOutAPI/model/angulardimension.h +468 -0
  26. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinition.h +569 -0
  27. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinitionlist.h +79 -0
  28. data/sketchup-sdk-win/headers/LayOutAPI/model/connectionpoint.h +107 -0
  29. data/sketchup-sdk-win/headers/LayOutAPI/model/defs.h +42 -0
  30. data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +120 -0
  31. data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +864 -0
  32. data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +59 -0
  33. data/sketchup-sdk-win/headers/LayOutAPI/model/ellipse.h +78 -0
  34. data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +330 -0
  35. data/sketchup-sdk-win/headers/LayOutAPI/model/entityiterator.h +49 -0
  36. data/sketchup-sdk-win/headers/LayOutAPI/model/entitylist.h +114 -0
  37. data/sketchup-sdk-win/headers/LayOutAPI/model/formattedtext.h +397 -0
  38. data/sketchup-sdk-win/headers/LayOutAPI/model/grid.h +251 -0
  39. data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +243 -0
  40. data/sketchup-sdk-win/headers/LayOutAPI/model/image.h +146 -0
  41. data/sketchup-sdk-win/headers/LayOutAPI/model/imagerep.h +109 -0
  42. data/sketchup-sdk-win/headers/LayOutAPI/model/label.h +332 -0
  43. data/sketchup-sdk-win/headers/LayOutAPI/model/layer.h +207 -0
  44. data/sketchup-sdk-win/headers/LayOutAPI/model/layerinstance.h +117 -0
  45. data/sketchup-sdk-win/headers/LayOutAPI/model/layerlist.h +69 -0
  46. data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +456 -0
  47. data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +261 -0
  48. data/sketchup-sdk-win/headers/LayOutAPI/model/pageinfo.h +372 -0
  49. data/sketchup-sdk-win/headers/LayOutAPI/model/pagelist.h +81 -0
  50. data/sketchup-sdk-win/headers/LayOutAPI/model/path.h +464 -0
  51. data/sketchup-sdk-win/headers/LayOutAPI/model/rectangle.h +240 -0
  52. data/sketchup-sdk-win/headers/LayOutAPI/model/referenceentity.h +120 -0
  53. data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +624 -0
  54. data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +94 -0
  55. data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +1080 -0
  56. data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +470 -0
  57. data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +156 -0
  58. metadata +51 -3
@@ -0,0 +1,81 @@
1
+ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_PAGE_LIST_H_
5
+ #define LAYOUT_MODEL_PAGE_LIST_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/model/defs.h>
9
+
10
+ /**
11
+ @struct LOPageListRef
12
+ @brief References an ordered, indexable list of \ref LOPageRef objects.
13
+ */
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif // __cplusplus
18
+
19
+ /**
20
+ @brief Creates a new empty page list object.
21
+ @param[out] page_list An empty page list object.
22
+ @return
23
+ - \ref SU_ERROR_NONE on success
24
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if page_list is NULL
25
+ - \ref SU_ERROR_OVERWRITE_VALID if *page_list already refers to a valid object
26
+ */
27
+ LO_RESULT LOPageListCreate(LOPageListRef* page_list);
28
+
29
+ /**
30
+ @brief Releases a page list object. *page_list will be set to invalid by this
31
+ function.
32
+ @param[in] page_list The page list object.
33
+ @return
34
+ - \ref SU_ERROR_NONE on success
35
+ - \ref SU_ERROR_NULL_POINTER_INPUT if page_list does not refer to a valid
36
+ object
37
+ - \ref SU_ERROR_INVALID_INPUT if *page_list does not refer to a valid object
38
+ */
39
+ LO_RESULT LOPageListRelease(LOPageListRef* page_list);
40
+
41
+ /**
42
+ @brief Gets the number of pages in this list.
43
+ @param[in] page_list The page list object.
44
+ @param[out] num_pages The number of page objects in the list.
45
+ @return
46
+ - \ref SU_ERROR_NONE on success
47
+ - \ref SU_ERROR_INVALID_INPUT if page_list does not refer to a valid object
48
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if num_pages is NULL
49
+ */
50
+ LO_RESULT LOPageListGetNumberOfPages(LOPageListRef page_list, size_t* num_pages);
51
+
52
+ /**
53
+ @brief Gets the page at the specified index.
54
+ @param[in] page_list The page list object.
55
+ @param[in] index The index of the page to get.
56
+ @param[out] page The page object at index in the list.
57
+ @return
58
+ - \ref SU_ERROR_NONE on success
59
+ - \ref SU_ERROR_INVALID_INPUT if page_list does not refer to a valid object
60
+ - \ref SU_ERROR_OUT_OF_RANGE if index is out of range for this list
61
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if page is NULL
62
+ - \ref SU_ERROR_OVERWRITE_VALID if *page already refers to a valid object
63
+ */
64
+ LO_RESULT LOPageListGetPageAtIndex(LOPageListRef page_list, size_t index, LOPageRef* page);
65
+
66
+ /**
67
+ @brief Adds a page at the end of the list.
68
+ @param[in] page_list The page list object.
69
+ @param[in] page The page object to add.
70
+ @return
71
+ - \ref SU_ERROR_NONE on success
72
+ - \ref SU_ERROR_INVALID_INPUT if page_list does not refer to a valid object
73
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
74
+ */
75
+ LO_RESULT LOPageListAddPage(LOPageListRef page_list, LOPageRef page);
76
+
77
+ #ifdef __cplusplus
78
+ } // end extern "C"
79
+ #endif // __cplusplus
80
+
81
+ #endif // LAYOUT_MODEL_PAGE_LIST_H_
@@ -0,0 +1,464 @@
1
+ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_PATH_H_
5
+ #define LAYOUT_MODEL_PATH_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/geometry/geometry.h>
9
+ #include <LayOutAPI/model/defs.h>
10
+
11
+ /**
12
+ @struct LOPathRef
13
+ @brief References a path entity. A path entity represents a continuous,
14
+ multi-segment polyline or Bezier curve.
15
+ */
16
+
17
+ /**
18
+ @enum LOPathPointType
19
+ @brief Defines how a point is to be interpreted in a path entity.
20
+ */
21
+ typedef enum {
22
+ LOPathPointType_MoveTo = 0, ///< Reserved for the first point in a path.
23
+ LOPathPointType_LineTo, ///< Straight line segment to a given point.
24
+ LOPathPointType_BezierTo, ///< Bezier line segment to a given point.
25
+ LOPathPointType_ArcCenter, ///< Control point that defines the center of an arc.
26
+ LOPathPointType_BezierControl, ///< Control point that defines Bezier curvature.
27
+ LOPathPointType_Close, ///< Close the path with a straight line segment back to the first point.
28
+ LONumPathPointTypes
29
+ } LOPathPointType;
30
+
31
+ /**
32
+ @enum LOPathWindingType
33
+ @brief Defines the winding direction of the path.
34
+ @since LayOut 2019, API 4.0
35
+ */
36
+ typedef enum {
37
+ LOPathWindingType_None = 0,
38
+ LOPathWindingType_Clockwise,
39
+ LOPathWindingType_CounterClockwise,
40
+ LONumPathWindingTypes
41
+ } LOPathWindingType;
42
+
43
+ #ifdef __cplusplus
44
+ extern "C" {
45
+ #endif // __cplusplus
46
+
47
+ /**
48
+ @brief Creates a new path object with a straight line between start_point and
49
+ end_point.
50
+ @param[out] path The path object.
51
+ @param[in] start_point The starting point of the path.
52
+ @param[in] end_point The ending point of the path.
53
+ @return
54
+ - \ref SU_ERROR_NONE on success
55
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if path is NULL
56
+ - \ref SU_ERROR_OVERWRITE_VALID if *path already refers to a valid object
57
+ - \ref SU_ERROR_NULL_POINTER_INPUT if start_point is NULL
58
+ - \ref SU_ERROR_NULL_POINTER_INPUT if end_point is NULL
59
+ - \ref SU_ERROR_GENERIC if the path would be zero length
60
+ */
61
+ LO_RESULT LOPathCreate(LOPathRef* path, const LOPoint2D* start_point, const LOPoint2D* end_point);
62
+
63
+ /**
64
+ @brief Creates a new path object with a Bezier curve between start_point and
65
+ end_point.
66
+ @param[out] path The path object.
67
+ @param[in] start_point The starting point of the path.
68
+ @param[in] control_point_1 The first control point.
69
+ @param[in] control_point_2 The second control point.
70
+ @param[in] end_point The ending point of the path.
71
+ @return
72
+ - \ref SU_ERROR_NONE on success
73
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if path is NULL
74
+ - \ref SU_ERROR_OVERWRITE_VALID if *path already refers to a valid object
75
+ - \ref SU_ERROR_NULL_POINTER_INPUT if start_point is NULL
76
+ - \ref SU_ERROR_NULL_POINTER_INPUT if control_point_1 is NULL
77
+ - \ref SU_ERROR_NULL_POINTER_INPUT if control_point_2 is NULL
78
+ - \ref SU_ERROR_NULL_POINTER_INPUT if end_point is NULL
79
+ - \ref SU_ERROR_GENERIC if the path would be zero length
80
+ */
81
+ LO_RESULT LOPathCreateBezier(
82
+ LOPathRef* path, const LOPoint2D* start_point, const LOPoint2D* control_point_1,
83
+ const LOPoint2D* control_point_2, const LOPoint2D* end_point);
84
+
85
+ /**
86
+ @brief Creates a new path object representing the same shape as a rectangle
87
+ object.
88
+ @param[out] path The path object.
89
+ @param[in] rectangle The rectangle object.
90
+ @return
91
+ - \ref SU_ERROR_NONE on success
92
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if path is NULL
93
+ - \ref SU_ERROR_OVERWRITE_VALID if *path already refers to a valid object
94
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
95
+ */
96
+ LO_RESULT LOPathCreateFromRectangle(LOPathRef* path, LORectangleRef rectangle);
97
+
98
+ /**
99
+ @brief Creates a new path object representing the same shape as an ellipse
100
+ object.
101
+ @param[out] path The path object.
102
+ @param[in] ellipse The ellipse object.
103
+ @return
104
+ - \ref SU_ERROR_NONE on success
105
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if path is NULL
106
+ - \ref SU_ERROR_OVERWRITE_VALID if *path already refers to a valid object
107
+ - \ref SU_ERROR_INVALID_INPUT if ellipse does not refer to a valid object
108
+ */
109
+ LO_RESULT LOPathCreateFromEllipse(LOPathRef* path, LOEllipseRef ellipse);
110
+
111
+ /**
112
+ @brief Creates a new path object representing an arc.
113
+ @since LayOut 2017, API 2.0
114
+ @param[out] path The path object.
115
+ @param[in] center_point The center point of the arc.
116
+ @param[in] radius The radius of the arc.
117
+ @param[in] start_angle The start angle of the arc.
118
+ @param[in] end_angle The end angle of the arc.
119
+ @return
120
+ - \ref SU_ERROR_NONE on success
121
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if path is NULL
122
+ - \ref SU_ERROR_OVERWRITE_VALID if *path already refers to a valid object
123
+ - \ref SU_ERROR_OUT_OF_RANGE if radius is less than or equal to zero
124
+ - \ref SU_ERROR_OUT_OF_RANGE if start_angle is equal to end_angle
125
+ */
126
+ LO_RESULT LOPathCreateArc(
127
+ LOPathRef* path, const LOPoint2D* center_point, double radius, double start_angle,
128
+ double end_angle);
129
+
130
+ /**
131
+ @brief Adds a reference to a path object.
132
+ @param[in] path The path object.
133
+ @return
134
+ - \ref SU_ERROR_NONE on success
135
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
136
+ */
137
+ LO_RESULT LOPathAddReference(LOPathRef path);
138
+
139
+ /**
140
+ @brief Releases a path object. The object will be invalidated if releasing the
141
+ last reference.
142
+ @param[in] path The path object.
143
+ @return
144
+ - \ref SU_ERROR_NONE on success
145
+ - \ref SU_ERROR_NULL_POINTER_INPUT if path is NULL
146
+ - \ref SU_ERROR_INVALID_INPUT if *path does not refer to a valid object
147
+ */
148
+ LO_RESULT LOPathRelease(LOPathRef* path);
149
+
150
+ /**
151
+ @brief Converts from a \ref LOEntityRef to a \ref LOPathRef.
152
+ This is essentially a downcast operation so the given \ref LOEntityRef
153
+ must be convertible to a \ref LOPathRef.
154
+ @param[in] entity The entity object.
155
+ @return
156
+ - The converted \ref LOPathRef if the downcast operation succeeds
157
+ - If not, the returned reference will be invalid
158
+ */
159
+ LO_EXPORT LOPathRef LOPathFromEntity(LOEntityRef entity);
160
+
161
+ /**
162
+ @brief Converts from a \ref LOPathRef to a \ref LOEntityRef.
163
+ This is essentially an upcast operation.
164
+ @param[in] path The path object.
165
+ @return
166
+ - The converted \ref LOEntityRef if path is a valid object
167
+ - If not, the returned reference will be invalid
168
+ */
169
+ LO_EXPORT LOEntityRef LOPathToEntity(LOPathRef path);
170
+
171
+ /**
172
+ @brief Gets the number of points in the path.
173
+ @param[in] path The path object.
174
+ @param[out] size The number of points in the path.
175
+ @return
176
+ - \ref SU_ERROR_NONE on success
177
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
178
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if size is NULL
179
+ */
180
+ LO_RESULT LOPathGetNumberOfPoints(LOPathRef path, size_t* size);
181
+
182
+ /**
183
+ @brief Gets the points in the path.
184
+ @param[in] path The path object.
185
+ @param[in] points_size The maximum number of points to copy.
186
+ @param[out] points The array that the points will be copied to.
187
+ @param[out] number_of_points_copied The number of points actually copied.
188
+ @return
189
+ - \ref SU_ERROR_NONE on success
190
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
191
+ - \ref SU_ERROR_OUT_OF_RANGE if points_size is less than 1
192
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if points is NULL
193
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if points_copied is NULL
194
+ */
195
+ LO_RESULT LOPathGetPoints(
196
+ LOPathRef path, size_t points_size, LOPoint2D points[], size_t* number_of_points_copied);
197
+
198
+ /**
199
+ @brief Gets the point in the path at the given index.
200
+ @param[in] path The path object.
201
+ @param[in] point_index The index of the point to get.
202
+ @param[out] point The point at the given index.
203
+ @return
204
+ - \ref SU_ERROR_NONE on success
205
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
206
+ - \ref SU_ERROR_OUT_OF_RANGE if point_index is out of range
207
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
208
+ */
209
+ LO_RESULT LOPathGetPointAtIndex(LOPathRef path, size_t point_index, LOPoint2D* point);
210
+
211
+ /**
212
+ @brief Gets the type of each point in the path.
213
+ @param[in] path The path object.
214
+ @param[in] pointtypes_size The maximum number of point types to
215
+ copy.
216
+ @param[out] pointtypes The array that the point types will be
217
+ copied to.
218
+ @param[out] number_of_pointtypes_copied The number of point types actually
219
+ copied.
220
+ @return
221
+ - \ref SU_ERROR_NONE on success
222
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
223
+ - \ref SU_ERROR_OUT_OF_RANGE if pointtypes_size is less than 1
224
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if pointtypes is NULL
225
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if number_of_pointtypes_copied is NULL
226
+ */
227
+ LO_RESULT LOPathGetPointTypes(
228
+ LOPathRef path, size_t pointtypes_size, LOPathPointType pointtypes[],
229
+ size_t* number_of_pointtypes_copied);
230
+
231
+ /**
232
+ @brief Gets the type of the specified point in the path.
233
+ @param[in] path The path object.
234
+ @param[in] point_index The index of the point to get type information of.
235
+ @param[out] pointtype The point type.
236
+ @return
237
+ - \ref SU_ERROR_NONE on success
238
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
239
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if pointtype is NULL
240
+ */
241
+ LO_RESULT LOPathGetPointTypeAtIndex(LOPathRef path, size_t point_index, LOPathPointType* pointtype);
242
+
243
+ /**
244
+ @brief Gets the start point for the path.
245
+ @param[in] path The path object.
246
+ @param[out] point The start point.
247
+ @return
248
+ - \ref SU_ERROR_NONE on success
249
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
250
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
251
+ */
252
+ LO_RESULT LOPathGetStartPoint(LOPathRef path, LOPoint2D* point);
253
+
254
+ /**
255
+ @brief Gets the end point for the path.
256
+ @param[in] path The path object.
257
+ @param[out] point The end point.
258
+ @return
259
+ - \ref SU_ERROR_NONE on success
260
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
261
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
262
+ */
263
+ LO_RESULT LOPathGetEndPoint(LOPathRef path, LOPoint2D* point);
264
+
265
+ /**
266
+ @brief Creates a new path object in the shape of the start arrow of the given
267
+ path.
268
+ @param[out] arrow_path The start arrow as a path.
269
+ @param[in] path The path object.
270
+ @return
271
+ - \ref SU_ERROR_NONE on success
272
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if arrow_path is NULL
273
+ - \ref SU_ERROR_OVERWRITE_VALID if *arrow_path already refers to a valid object
274
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
275
+ - \ref SU_ERROR_NO_DATA if path does not have a start arrow
276
+ */
277
+ LO_RESULT LOPathCreateFromStartArrow(LOPathRef* arrow_path, LOPathRef path);
278
+
279
+ /**
280
+ @brief Creates a new path object in the shape of the end arrow of the given
281
+ path.
282
+ @param[out] arrow_path The end arrow as a path.
283
+ @param[in] path The path object.
284
+ @return
285
+ - \ref SU_ERROR_NONE on success
286
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if arrow_path is NULL
287
+ - \ref SU_ERROR_OVERWRITE_VALID if *arrow_path already refers to a valid object
288
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
289
+ - \ref SU_ERROR_NO_DATA if path does not have an end arrow
290
+ */
291
+ LO_RESULT LOPathCreateFromEndArrow(LOPathRef* arrow_path, LOPathRef path);
292
+
293
+ /**
294
+ @brief Gets whether or not the path is a closed loop.
295
+ @param[in] path The path object.
296
+ @param[out] is_closed Whether the path is closed or not.
297
+ @return
298
+ - \ref SU_ERROR_NONE on success
299
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
300
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_closed is NULL
301
+ */
302
+ LO_RESULT LOPathGetClosed(LOPathRef path, bool* is_closed);
303
+
304
+ /**
305
+ @brief Gets the length of the path.
306
+ @param[in] path The path object.
307
+ @param[out] parametric_length The length of the path.
308
+ @return
309
+ - \ref SU_ERROR_NONE on success
310
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
311
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if parametric_length is NULL
312
+ */
313
+ LO_RESULT LOPathGetParametricLength(LOPathRef path, double* parametric_length);
314
+
315
+ /**
316
+ @brief Gets the point at the given distance along the path.
317
+ @param[in] path The path object.
318
+ @param[in] parametric_value The distance along the path to get the point.
319
+ @param[out] point The point at the given distance along the path.
320
+ @return
321
+ - \ref SU_ERROR_NONE on success
322
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
323
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
324
+ - \ref SU_ERROR_OUT_OF_RANGE if parametric_value is less than 0 or greater than
325
+ the path's parametric length
326
+ */
327
+ LO_RESULT LOPathGetPointAtParameter(LOPathRef path, double parametric_value, LOPoint2D* point);
328
+
329
+ /**
330
+ @brief Gets the tangent at the given distance along the path.
331
+ @param[in] path The path object.
332
+ @param[in] parametric_value The distance along the path to get the tangent.
333
+ @param[out] tangent The tangent at the given distane along the path.
334
+ @return
335
+ - \ref SU_ERROR_NONE on success
336
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
337
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if tangent is NULL
338
+ - \ref SU_ERROR_OUT_OF_RANGE if parametric_value is less than 0 or greater than
339
+ the path's parametric length
340
+ */
341
+ LO_RESULT LOPathGetTangentAtParameter(LOPathRef path, double parametric_value, LOVector2D* tangent);
342
+
343
+ /**
344
+ @brief Gets whether or not the path represents a circle, and if so, gets the
345
+ geometric representation of the circle.
346
+ @since LayOut 2017, API 2.0
347
+ @param[in] path The path object.
348
+ @param[out] is_circle Whether or not the path is a circle.
349
+ @param[out] center Center point of the circle. Will only be set if is_circle
350
+ returns true.
351
+ @param[out] radius Radius of the circle. Will only be set if is_circle
352
+ returns true.
353
+ @return
354
+ - \ref SU_ERROR_NONE on success
355
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
356
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_circle is NULL
357
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if center is NULL
358
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if radius is NULL
359
+ */
360
+ LO_RESULT LOPathGetCircle(LOPathRef path, bool* is_circle, LOPoint2D* center, double* radius);
361
+
362
+ /**
363
+ @brief Gets whether or not the path represents an arc, and if so, gets the
364
+ geometric representation of the arc.
365
+ @since LayOut 2017, API 2.0
366
+ @param[in] path The path object.
367
+ @param[out] is_arc Whether or not the path is an arc.
368
+ @param[out] center Center point of the arc. Will only be set if is_arc
369
+ returns true.
370
+ @param[out] radius Radius of the arc. Will only be set if is_arc returns
371
+ true.
372
+ @param[out] start_angle Start angle of the arc. Will only be set if is_arc
373
+ returns true.
374
+ @param[out] end_angle End angle of the arc. Will only be set if is_arc
375
+ returns true.
376
+ @return
377
+ - \ref SU_ERROR_NONE on success
378
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
379
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_arc is NULL
380
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if center is NULL
381
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if radius is NULL
382
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if start_angle is NULL
383
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if end_angle is NULL
384
+ */
385
+ LO_RESULT LOPathGetArc(
386
+ LOPathRef path, bool* is_arc, LOPoint2D* center, double* radius, double* start_angle,
387
+ double* end_angle);
388
+
389
+ /**
390
+ @brief Adds a point to the end of the path.
391
+ @param[in] path The path object.
392
+ @param[in] point The point to append.
393
+ @return
394
+ - \ref SU_ERROR_NONE on success
395
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
396
+ - \ref SU_ERROR_NULL_POINTER_INPUT if point is NULL
397
+ - \ref SU_ERROR_LAYER_LOCKED if path is on a locked layer
398
+ - \ref SU_ERROR_ENTITY_LOCKED if path is locked
399
+ */
400
+ LO_RESULT LOPathAppendLineTo(LOPathRef path, const LOPoint2D* point);
401
+
402
+ /**
403
+ @brief Adds a Bezier point to the end of the path.
404
+ @param[in] path The path object.
405
+ @param[in] control_point_1 The first control point.
406
+ @param[in] control_point_2 The second control point.
407
+ @param[in] point The point to append.
408
+ @return
409
+ - \ref SU_ERROR_NONE on success
410
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
411
+ - \ref SU_ERROR_NULL_POINTER_INPUT if control_point_1 is NULL
412
+ - \ref SU_ERROR_NULL_POINTER_INPUT if control_point_2 is NULL
413
+ - \ref SU_ERROR_NULL_POINTER_INPUT if point is NULL
414
+ - \ref SU_ERROR_LAYER_LOCKED if path is on a locked layer
415
+ - \ref SU_ERROR_ENTITY_LOCKED if path is locked
416
+ */
417
+ LO_RESULT LOPathAppendBezierTo(
418
+ LOPathRef path, const LOPoint2D* control_point_1, const LOPoint2D* control_point_2,
419
+ const LOPoint2D* point);
420
+
421
+ /**
422
+ @brief Appends two paths. This will duplicate other_path and append it to the path.
423
+ Note that path may be reversed as a result of this operation.
424
+ @since LayOut 2018, API 3.0
425
+ @param[in] path The path object.
426
+ @param[in] other_path The path to append to path.
427
+ @return
428
+ - \ref SU_ERROR_NONE on success
429
+ - \ref SU_ERROR_INVALID_INPUT if path or other_path do not refer to valid objects
430
+ - \ref SU_ERROR_LAYER_LOCKED if path is on a locked layer
431
+ - \ref SU_ERROR_ENTITY_LOCKED if path is locked
432
+ - \ref SU_ERROR_INVALID_ARGUMENT if path and other_path are the same object
433
+ - \ref SU_ERROR_UNSUPPORTED if path and other_path do not share a common endpoint
434
+ */
435
+ LO_RESULT LOPathAppendPathTo(LOPathRef path, LOPathRef other_path);
436
+
437
+ /**
438
+ @brief Finishes the path loop if the path is not closed.
439
+ @param[in] path The path object.
440
+ @return
441
+ - \ref SU_ERROR_NONE on success
442
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
443
+ - \ref SU_ERROR_GENERIC if path has already been closed.
444
+ - \ref SU_ERROR_LAYER_LOCKED if path is on a locked layer
445
+ - \ref SU_ERROR_ENTITY_LOCKED if path is locked
446
+ */
447
+ LO_RESULT LOPathClose(LOPathRef path);
448
+
449
+ /**
450
+ @brief Returns the winding type of the path.
451
+ @since LayOut 2019, API 4.0
452
+ @param[in] path The path object.
453
+ @param[out] winding The winding type of the path.
454
+ @return
455
+ - \ref SU_ERROR_NONE on success
456
+ - \ref SU_ERROR_INVALID_INPUT if path does not refer to a valid object
457
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if winding is NULL
458
+ */
459
+ LO_RESULT LOPathGetWindingType(LOPathRef path, LOPathWindingType* winding);
460
+
461
+ #ifdef __cplusplus
462
+ } // end extern "C"
463
+ #endif // __cplusplus
464
+ #endif // LAYOUT_MODEL_PATH_H_