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,240 @@
1
+ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_RECTANGLE_H_
5
+ #define LAYOUT_MODEL_RECTANGLE_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/geometry/geometry.h>
9
+ #include <LayOutAPI/model/defs.h>
10
+
11
+ /**
12
+ @struct LORectangleRef
13
+ @brief References a simple rectangular shape entity.
14
+ */
15
+
16
+ /**
17
+ @enum LORectangleType
18
+ @brief Defines the shape of the rectangle within its boundaries.
19
+ */
20
+ typedef enum {
21
+ LORectangleType_Normal = 0, ///< Normal rectangle with 90 degree corners.
22
+ LORectangleType_Rounded, ///< Rectangle with rounded corners and a specified radius.
23
+ LORectangleType_Lozenge, ///< Rectangle with rounded corners and a radius equal to half the
24
+ ///< smaller of width or height.
25
+ LORectangleType_Bulged, ///< Rectangle whose left and right sides are arcs with a specified
26
+ ///< radius.
27
+ LONumRectangleTypes
28
+ } LORectangleType;
29
+
30
+ #ifdef __cplusplus
31
+ extern "C" {
32
+ #endif // __cplusplus
33
+
34
+ /**
35
+ @brief Creates a 'normal' rectangle with 90 degree corners.
36
+ @param[out] rectangle The rectangle object.
37
+ @param[in] bounds The starting dimensions of the rectangle.
38
+ @return
39
+ - \ref SU_ERROR_NONE on success
40
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if rectangle is NULL
41
+ - \ref SU_ERROR_OVERWRITE_VALID if *rectangle already refers to a valid object
42
+ - \ref SU_ERROR_NULL_POINTER_INPUT if bounds is NULL
43
+ - \ref SU_ERROR_OUT_OF_RANGE if bounds has a width or height of zero
44
+ */
45
+ LO_RESULT LORectangleCreate(LORectangleRef* rectangle, const LOAxisAlignedRect2D* bounds);
46
+
47
+ /**
48
+ @brief Creates a 'rounded' rectangle with arcs in each corner.
49
+ @param[out] rectangle The rectangle object.
50
+ @param[in] bounds The starting dimensions of the rectangle.
51
+ @param[in] corner_radius The radius of the circles in the corners in inches.
52
+ @return
53
+ - \ref SU_ERROR_NONE on success
54
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if rectangle is NULL
55
+ - \ref SU_ERROR_OVERWRITE_VALID if *rectangle already refers to a valid object
56
+ - \ref SU_ERROR_NULL_POINTER_INPUT if bounds is NULL
57
+ - \ref SU_ERROR_OUT_OF_RANGE if bounds has a width or height of zero
58
+ - \ref SU_ERROR_OUT_OF_RANGE if corner_radius is negative
59
+ */
60
+ LO_RESULT LORectangleCreateRounded(
61
+ LORectangleRef* rectangle, const LOAxisAlignedRect2D* bounds, double corner_radius);
62
+ /**
63
+ @brief Creates a 'Lozenge' rectangle with the shorter side curved.
64
+ @param[out] rectangle The rectangle object.
65
+ @param[in] bounds The starting dimensions of the rectangle.
66
+ @return
67
+ - \ref SU_ERROR_NONE on success
68
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if rectangle is NULL
69
+ - \ref SU_ERROR_OVERWRITE_VALID if *rectangle already refers to a valid object
70
+ - \ref SU_ERROR_NULL_POINTER_INPUT if bounds is NULL
71
+ - \ref SU_ERROR_OUT_OF_RANGE if bounds has a width or height of zero
72
+ */
73
+ LO_RESULT LORectangleCreateLozenge(LORectangleRef* rectangle, const LOAxisAlignedRect2D* bounds);
74
+ /**
75
+ @brief Creates a 'bulged' rectangle with the vertical sides curved.
76
+ @param[out] rectangle The rectangle object.
77
+ @param[in] bounds The starting dimensions of the rectangle.
78
+ @param[in] bulge_distance The size of the bulge, from the outer edge of the
79
+ rectangle in.
80
+ @return
81
+ - \ref SU_ERROR_NONE on success
82
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if rectangle is NULL
83
+ - \ref SU_ERROR_OVERWRITE_VALID if *rectangle already refers to a valid object
84
+ - \ref SU_ERROR_NULL_POINTER_INPUT if bounds is NULL
85
+ - \ref SU_ERROR_OUT_OF_RANGE if bounds has a width or height of zero
86
+ - \ref SU_ERROR_OUT_OF_RANGE if bulge_distance is negative
87
+ */
88
+ LO_RESULT LORectangleCreateBulged(
89
+ LORectangleRef* rectangle, const LOAxisAlignedRect2D* bounds, double bulge_distance);
90
+
91
+ /**
92
+ @brief Adds a reference to a rectangle object.
93
+ @param[in] rectangle The rectangle object.
94
+ @return
95
+ SU_ERROR_NONE on success
96
+ SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
97
+ */
98
+ LO_RESULT LORectangleAddReference(LORectangleRef rectangle);
99
+
100
+ /**
101
+ @brief Releases a rectangle object. The object will be invalidated if releasing
102
+ the last reference.
103
+ @param[in] rectangle The rectangle object.
104
+ @return
105
+ - \ref SU_ERROR_NONE on success
106
+ - \ref SU_ERROR_NULL_POINTER_INPUT if rectangle is NULL
107
+ - \ref SU_ERROR_INVALID_INPUT if *rectangle does not refer to a valid object
108
+ */
109
+ LO_RESULT LORectangleRelease(LORectangleRef* rectangle);
110
+
111
+ /**
112
+ @brief Converts from a \ref LOEntityRef to a \ref LORectangleRef.
113
+ This is essentially a downcast operation so the given \ref LOEntityRef
114
+ must be convertible to a \ref LORectangleRef.
115
+ @param[in] entity The entity object.
116
+ @return
117
+ - The converted \ref LORectangleRef if the downcast operation succeeds
118
+ - If not, the returned reference will be invalid
119
+ */
120
+ LO_EXPORT LORectangleRef LORectangleFromEntity(LOEntityRef entity);
121
+
122
+ /**
123
+ @brief Converts from a \ref LORectangleRef to a \ref LOEntityRef.
124
+ This is essentially an upcast operation.
125
+ @param[in] rectangle The rectangle object.
126
+ @return
127
+ - The converted \ref LOEntityRef if rectangle is a valid object
128
+ - If not, the returned reference will be invalid
129
+ */
130
+ LO_EXPORT LOEntityRef LORectangleToEntity(LORectangleRef rectangle);
131
+
132
+ /**
133
+ @brief Gets the point that was originally defined as the upper left point.
134
+ Transforms to this object may have moved it so that it is no longer the
135
+ top left point geometrically on the page.
136
+ @param[in] rectangle The rectangle object.
137
+ @param[out] point The position of the original top left point.
138
+ @return
139
+ - \ref SU_ERROR_NONE on success
140
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
141
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
142
+ */
143
+ LO_RESULT LORectangleGetTopLeftPoint(LORectangleRef rectangle, LOPoint2D* point);
144
+
145
+ /**
146
+ @brief Gets the point that was originally defined as the upper right point.
147
+ Transforms to this object may have moved it so that it is no longer the
148
+ top right point geometrically on the page.
149
+ @param[in] rectangle The rectangle object.
150
+ @param[out] point The position of the original top right point.
151
+ @return
152
+ - \ref SU_ERROR_NONE on success
153
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
154
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
155
+ */
156
+ LO_RESULT LORectangleGetTopRightPoint(LORectangleRef rectangle, LOPoint2D* point);
157
+
158
+ /**
159
+ @brief Gets the point that was originally defined as the bottom left point.
160
+ Transforms to this object may have moved it so that it is no longer the
161
+ bottom left point geometrically on the page.
162
+ @param[in] rectangle The rectangle object.
163
+ @param[out] point The position of the original bottom left point.
164
+ @return
165
+ - \ref SU_ERROR_NONE on success
166
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
167
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
168
+ */
169
+ LO_RESULT LORectangleGetBottomLeftPoint(LORectangleRef rectangle, LOPoint2D* point);
170
+
171
+ /**
172
+ @brief Gets the point that was originally defined as the bottom right point.
173
+ Transforms to this object may have moved it so that it is no longer the
174
+ bottom right point geometrically on the page.
175
+ @param[in] rectangle The rectangle object.
176
+ @param[out] point The position of the original bottom right point.
177
+ @return
178
+ - \ref SU_ERROR_NONE on success
179
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
180
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
181
+ */
182
+ LO_RESULT LORectangleGetBottomRightPoint(LORectangleRef rectangle, LOPoint2D* point);
183
+
184
+ /**
185
+ @brief Gets the type of a rectangle.
186
+ @param[in] rectangle The rectangle object.
187
+ @param[out] type The type of the rectangle.
188
+ @return
189
+ - \ref SU_ERROR_NONE on success
190
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
191
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
192
+ */
193
+ LO_RESULT LORectangleGetRectangleType(LORectangleRef rectangle, LORectangleType* type);
194
+
195
+ /**
196
+ @brief Gets the type of a rectangle.
197
+ @param[in] rectangle The rectangle object.
198
+ @param[in] type The type of the rectangle.
199
+ @return
200
+ - \ref SU_ERROR_NONE on success
201
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
202
+ - \ref SU_ERROR_LAYER_LOCKED if rectangle is on a locked layer
203
+ - \ref SU_ERROR_ENTITY_LOCKED if rectangle is locked
204
+ - \ref SU_ERROR_GENERIC if type is not a valid rectangle type
205
+ */
206
+ LO_RESULT LORectangleSetRectangleType(LORectangleRef rectangle, LORectangleType type);
207
+
208
+ /**
209
+ @brief Returns the radius that defines the shape of a bulged or rounded
210
+ rectangle.
211
+ @param[in] rectangle The rectangle object.
212
+ @param[out] radius The radius for bulged and rounded rectangles.
213
+ @return
214
+ - \ref SU_ERROR_NONE on success
215
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
216
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if radius is NULL
217
+ - \ref SU_ERROR_NO_DATA if the rectangle is not of type \ref
218
+ LORectangleType_Bulged or \ref LORectangleType_Rounded
219
+ */
220
+ LO_RESULT LORectangleGetRadius(LORectangleRef rectangle, double* radius);
221
+
222
+ /**
223
+ @brief Sets the radius that defines the shape of a bulged or rounded rectangle.
224
+ @param[in] rectangle The rectangle object.
225
+ @param[out] radius The radius for bulged and rounded rectangles.
226
+ @return
227
+ - \ref SU_ERROR_NONE on success
228
+ - \ref SU_ERROR_INVALID_INPUT if rectangle does not refer to a valid object
229
+ - \ref SU_ERROR_NO_DATA if the rectangle is not of type \ref
230
+ LORectangleType_Bulged or \ref LORectangleType_Rounded
231
+ - \ref SU_ERROR_OUT_OF_RANGE if radius is negative
232
+ - \ref SU_ERROR_LAYER_LOCKED if rectangle is on a locked layer
233
+ - \ref SU_ERROR_ENTITY_LOCKED if rectangle is locked
234
+ */
235
+ LO_RESULT LORectangleSetRadius(LORectangleRef rectangle, double radius);
236
+
237
+ #ifdef __cplusplus
238
+ } // end extern "C"
239
+ #endif // __cplusplus
240
+ #endif // LAYOUT_MODEL_RECTANGLE_H_
@@ -0,0 +1,120 @@
1
+ // Copyright 2022 Trimble Inc. All rights reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_REFERENCEENTITY_H_
5
+ #define LAYOUT_MODEL_REFERENCEENTITY_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/model/defs.h>
9
+
10
+ /**
11
+ @struct LOReferenceEntityRef
12
+ @brief References an entity containing the contents of an imported file.
13
+ @since LayOut 2023, API 8.0
14
+ */
15
+
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif // __cplusplus
19
+
20
+
21
+ /**
22
+ @brief Adds a reference to a reference entity object.
23
+ @since LayOut 2023, API 8.0
24
+ @param[in] reference_entity The reference entity object.
25
+ @return
26
+ - \ref SU_ERROR_NONE on success
27
+ - \ref SU_ERROR_INVALID_INPUT if reference_entity does not refer to a valid object
28
+ */
29
+ LO_RESULT LOReferenceEntityAddReference(LOReferenceEntityRef reference_entity);
30
+
31
+ /**
32
+ @brief Releases a reference entity object. The object will be invalidated if releasing the last
33
+ reference.
34
+ @since LayOut 2023, API 8.0
35
+ @param[in] reference_entity The reference entity object.
36
+ @return
37
+ - \ref SU_ERROR_NONE on success
38
+ - \ref SU_ERROR_NULL_POINTER_INPUT if reference_entity is NULL
39
+ - \ref SU_ERROR_INVALID_INPUT if *reference_entity does not refer to a valid object
40
+ */
41
+ LO_RESULT LOReferenceEntityRelease(LOReferenceEntityRef* reference_entity);
42
+
43
+ /**
44
+ @brief Converts from a \ref LOEntityRef to a \ref LOReferenceEntityRef.
45
+ This is essentially a downcast operation so the given \ref LOEntityRef
46
+ must be convertible to a \ref LOReferenceEntityRef.
47
+ @since LayOut 2023, API 8.0
48
+ @param[in] entity The entity object.
49
+ @return
50
+ - The converted \ref LOReferenceEntityRef if the downcast operation succeeds
51
+ - If not, the returned reference will be invalid
52
+ */
53
+ LO_EXPORT LOReferenceEntityRef LOReferenceEntityFromEntity(LOEntityRef entity);
54
+
55
+ /**
56
+ @brief Converts from a \ref LOReferenceEntityRef to a \ref LOEntityRef.
57
+ This is essentially an upcast operation.
58
+ @since LayOut 2023, API 8.0
59
+ @param[in] reference_entity The reference entity object.
60
+ @return
61
+ - The converted \ref LOEntityRef if reference_entity is a valid object
62
+ - If not, the returned reference will be invalid
63
+ */
64
+ LO_EXPORT LOEntityRef LOReferenceEntityToEntity(LOReferenceEntityRef reference_entity);
65
+
66
+ /**
67
+ @brief Returns any clip mask assigned to the reference entity.
68
+ @since LayOut 2023, API 8.0
69
+ @param[in] reference_entity The reference entity object.
70
+ @param[out] clip_mask The clip mask of the reference entity.
71
+ @return
72
+ - \ref SU_ERROR_NONE on success
73
+ - \ref SU_ERROR_INVALID_INPUT if reference_entity does not refer to a valid object
74
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if clip_mask is NULL
75
+ - \ref SU_ERROR_OVERWRITE_VALID if *clip_mask already refers to a valid object
76
+ - \ref SU_ERROR_NO_DATA if the reference entity is not being clipped by a clip mask
77
+ */
78
+ LO_RESULT LOReferenceEntityGetClipMask(
79
+ LOReferenceEntityRef reference_entity, LOEntityRef* clip_mask);
80
+
81
+ /**
82
+ @brief Sets the clip mask of the reference entity. A clip mask defines a region of the entity that
83
+ is visible. This allows you to crop with arbitrary shapes. This operation will replace any clip mask
84
+ that is already assigned to this reference entity. The entity being used must not be already part of
85
+ a document or group. The clip mask entity must be either a rectangle, ellipse or a path, or may be
86
+ SU_INVALID, which will remove the existing clip mask, if any.
87
+ @since LayOut 2023, API 8.0
88
+ @param[in] reference_entity The reference entity object.
89
+ @param[in] clip_mask The new clip mask for the reference entity.
90
+ @return
91
+ - \ref SU_ERROR_NONE on success
92
+ - \ref SU_ERROR_INVALID_INPUT if reference_entity does not refer to a valid object
93
+ - \ref SU_ERROR_INVALID_ARGUMENT if clip_mask is already in a document or group
94
+ - \ref SU_ERROR_UNSUPPORTED if clip_mask is not a rectangle, ellipse, or path
95
+ - \ref SU_ERROR_LAYER_LOCKED if reference_entity is on a locked layer
96
+ - \ref SU_ERROR_ENTITY_LOCKED if reference_entity is locked
97
+ */
98
+ LO_RESULT LOReferenceEntitySetClipMask(
99
+ LOReferenceEntityRef reference_entity, LOEntityRef clip_mask);
100
+
101
+ /**
102
+ @brief Creates the entities that represent the reference entity in its exploded form and adds them
103
+ to a \ref LOEntityListRef. It is NOT necessary to explicitly release these entities, since \ref
104
+ LOEntityListRef itself adds a reference to the entities and will release them when they are
105
+ removed from the list or when the list is released.
106
+ @since LayOut 2023, API 8.0
107
+ @param[in] reference_entity The reference entity object.
108
+ @param[in] entity_list The entity list object to add the new entities to.
109
+ @return
110
+ - \ref SU_ERROR_NONE on success
111
+ - \ref SU_ERROR_INVALID_INPUT if reference_entity does not refer to a valid object
112
+ - \ref SU_ERROR_INVALID_INPUT if entity_list does not refer to a valid object
113
+ */
114
+ LO_RESULT LOReferenceEntityGetExplodedEntities(
115
+ LOReferenceEntityRef reference_entity, LOEntityListRef entity_list);
116
+
117
+ #ifdef __cplusplus
118
+ } // end extern "C"
119
+ #endif // __cplusplus
120
+ #endif // LAYOUT_MODEL_REFERENCEENTITY_H_