scriptup 2024.0.5 → 2024.0.6

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 (57) 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 +4 -3
  7. data/ext/material.c +4 -7
  8. data/ext/utils.h +4 -4
  9. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
  10. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
  11. data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
  12. data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
  13. data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
  14. data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
  15. data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
  16. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
  17. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
  18. data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
  19. data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +117 -0
  20. data/sketchup-sdk-win/headers/LayOutAPI/common.h +22 -0
  21. data/sketchup-sdk-win/headers/LayOutAPI/geometry/geometry.h +78 -0
  22. data/sketchup-sdk-win/headers/LayOutAPI/initialize.h +36 -0
  23. data/sketchup-sdk-win/headers/LayOutAPI/layout.h +49 -0
  24. data/sketchup-sdk-win/headers/LayOutAPI/model/angulardimension.h +468 -0
  25. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinition.h +569 -0
  26. data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinitionlist.h +79 -0
  27. data/sketchup-sdk-win/headers/LayOutAPI/model/connectionpoint.h +107 -0
  28. data/sketchup-sdk-win/headers/LayOutAPI/model/defs.h +42 -0
  29. data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +120 -0
  30. data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +864 -0
  31. data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +59 -0
  32. data/sketchup-sdk-win/headers/LayOutAPI/model/ellipse.h +78 -0
  33. data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +330 -0
  34. data/sketchup-sdk-win/headers/LayOutAPI/model/entityiterator.h +49 -0
  35. data/sketchup-sdk-win/headers/LayOutAPI/model/entitylist.h +114 -0
  36. data/sketchup-sdk-win/headers/LayOutAPI/model/formattedtext.h +397 -0
  37. data/sketchup-sdk-win/headers/LayOutAPI/model/grid.h +251 -0
  38. data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +243 -0
  39. data/sketchup-sdk-win/headers/LayOutAPI/model/image.h +146 -0
  40. data/sketchup-sdk-win/headers/LayOutAPI/model/imagerep.h +109 -0
  41. data/sketchup-sdk-win/headers/LayOutAPI/model/label.h +332 -0
  42. data/sketchup-sdk-win/headers/LayOutAPI/model/layer.h +207 -0
  43. data/sketchup-sdk-win/headers/LayOutAPI/model/layerinstance.h +117 -0
  44. data/sketchup-sdk-win/headers/LayOutAPI/model/layerlist.h +69 -0
  45. data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +456 -0
  46. data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +261 -0
  47. data/sketchup-sdk-win/headers/LayOutAPI/model/pageinfo.h +372 -0
  48. data/sketchup-sdk-win/headers/LayOutAPI/model/pagelist.h +81 -0
  49. data/sketchup-sdk-win/headers/LayOutAPI/model/path.h +464 -0
  50. data/sketchup-sdk-win/headers/LayOutAPI/model/rectangle.h +240 -0
  51. data/sketchup-sdk-win/headers/LayOutAPI/model/referenceentity.h +120 -0
  52. data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +624 -0
  53. data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +94 -0
  54. data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +1080 -0
  55. data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +470 -0
  56. data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +156 -0
  57. metadata +50 -2
@@ -0,0 +1,261 @@
1
+ // Copyright 2015 Trimble Navigation Ltd. All rights reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_PAGE_H_
5
+ #define LAYOUT_MODEL_PAGE_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/model/defs.h>
9
+
10
+ /**
11
+ @enum LOPageEntityIteratorFlags
12
+ @brief Defines the options that are available when creating a \ref
13
+ LOEntityIteratorRef for iterating the entities on a page.
14
+ */
15
+ typedef enum {
16
+ LOPageEntityIteratorFlags_None = 0x0, ///< Default iterator behavior. Does not skip any entities.
17
+ LOPageEntityIteratorFlags_SkipHidden = 0x1, ///< Skip entities on hidden layers
18
+ LOPageEntityIteratorFlags_SkipLocked = 0x2, ///< Skip entities on locked layers
19
+ LOPageEntityIteratorFlags_SkipHiddenOrLocked = 0x3 ///< Skip entities on hidden or locked layers
20
+ } LOPageEntityIteratorFlags;
21
+
22
+ /**
23
+ @struct LOPageRef
24
+ @brief References a single page in a document.
25
+ */
26
+
27
+ #ifdef __cplusplus
28
+ extern "C" {
29
+ #endif // __cplusplus
30
+
31
+ /**
32
+ @brief Gets the name of a page.
33
+ @param[in] page The page object.
34
+ @param[out] name The name of the page.
35
+ @return
36
+ - \ref SU_ERROR_NONE on success
37
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
38
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
39
+ - \ref SU_ERROR_INVALID_OUTPUT if name does not refer to a valid object
40
+ */
41
+ LO_RESULT LOPageGetName(LOPageRef page, SUStringRef* name);
42
+
43
+ /**
44
+ @brief Sets the name of a page.
45
+ @param[in] page The page object.
46
+ @param[in] name The new name of the page.
47
+ @return
48
+ - \ref SU_ERROR_NONE on success
49
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
50
+ - \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
51
+ - \ref SU_ERROR_UNSUPPORTED if name is an empty string
52
+ */
53
+ LO_RESULT LOPageSetName(LOPageRef page, const char* name);
54
+
55
+ /**
56
+ @brief Gets whether or not a page is included in presentations.
57
+ @param[in] page The page object.
58
+ @param[out] in_presentation Whether the page will be in a presentation.
59
+ @return
60
+ - \ref SU_ERROR_NONE on success
61
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
62
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if in_presentation is NULL
63
+ */
64
+ LO_RESULT LOPageGetInPresentation(LOPageRef page, bool* in_presentation);
65
+
66
+ /**
67
+ @brief Sets whether or not a page is included in presentations.
68
+ @param[in] page The page object.
69
+ @param[in] in_presentation Whether the page should be in a presentation.
70
+ @return
71
+ - \ref SU_ERROR_NONE on success
72
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
73
+ */
74
+ LO_RESULT LOPageSetInPresentation(LOPageRef page, bool in_presentation);
75
+
76
+ /**
77
+ @brief Gets whether or not a layer is visible on a page. Layers in LayOut exist
78
+ on every page in a document. Each page specifies the visibility of each
79
+ layer for that page.
80
+ @param[in] page The page object.
81
+ @param[in] layer_definition The layer definition object.
82
+ @param[out] visible Whether or not the layer is visible.
83
+ @return
84
+ - \ref SU_ERROR_NONE on success
85
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
86
+ - \ref SU_ERROR_INVALID_INPUT if layer_definition does not refer to a valid
87
+ object
88
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if visible is NULL
89
+ - \ref SU_ERROR_GENERIC if page and layer_definition don't belong to the same
90
+ document
91
+ */
92
+ LO_RESULT LOPageGetLayerVisible(LOPageRef page, LOLayerRef layer_definition, bool* visible);
93
+
94
+ /**
95
+ @brief Sets whether or not a layer is visible on a page. Layers in LayOut
96
+ exist on every page in a document. Each page specifies the visibility of
97
+ each layer for that page.
98
+ @param[in] page The page object.
99
+ @param[in] layer_definition The layer definition object.
100
+ @param[in] visible Whether or not the layer should be visible.
101
+ @return
102
+ - \ref SU_ERROR_NONE on success
103
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
104
+ - \ref SU_ERROR_INVALID_INPUT if layer_definition does not refer to a valid
105
+ object
106
+ - \ref SU_ERROR_GENERIC if page and layer_definition don't belong to the same
107
+ document
108
+ - \ref SU_ERROR_GENERIC if the layer could not be hidden because it would
109
+ break the rule that there must be at least one unlocked, visible layer on
110
+ each page
111
+ */
112
+ LO_RESULT LOPageSetLayerVisible(LOPageRef page, LOLayerRef layer_definition, bool visible);
113
+
114
+ /**
115
+ @brief Gets references to all the layer instances for a page. The layer
116
+ instances are in the same order that the layer definitions exist in the
117
+ document. Use \ref LODocumentGetNumberOfLayers to determine how many
118
+ layer instances will be returned by this function.
119
+ @param[in] page The page object.
120
+ @param[in] array_size The size of the array to copy into.
121
+ @param[out] layer_instances The layer instances.
122
+ @param[out] number_copied The number of layer instances copied.
123
+ @return
124
+ - \ref SU_ERROR_NONE on success
125
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
126
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if layer_instances is NULL
127
+ - \ref SU_ERROR_OVERWRITE_VALID if one or more of the objects in the
128
+ layer_instances array are not a valid object
129
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if number_copied is NULL
130
+ */
131
+ LO_RESULT LOPageGetLayerInstances(
132
+ LOPageRef page, size_t array_size, LOLayerInstanceRef layer_instances[], size_t* number_copied);
133
+
134
+ /**
135
+ @brief Gets a reference to the layer instance at the given index for this
136
+ page. The layer instances are in the same order that the layer
137
+ definitions exist in the document. Use \ref LODocumentGetNumberOfLayers
138
+ to determine how many layer definitions exist in the document.
139
+ @param[in] page The page object.
140
+ @param[in] index The index of the layer instance to get.
141
+ @param[out] layer_instance The layer instance object.
142
+ @return
143
+ - \ref SU_ERROR_NONE on success
144
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
145
+ - \ref SU_ERROR_OUT_OF_RANGE if index is out of range
146
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if layer_instance is NULL
147
+ - \ref SU_ERROR_OVERWRITE_VALID if *layer_instance already refers to a valid object
148
+ */
149
+ LO_RESULT LOPageGetLayerInstanceAtIndex(
150
+ LOPageRef page, size_t index, LOLayerInstanceRef* layer_instance);
151
+
152
+ /**
153
+ @brief Gets the index of this page in the document.
154
+ @param[in] page The page object.
155
+ @param[out] index The index of the page in the document.
156
+ @return
157
+ - \ref SU_ERROR_NONE on success
158
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
159
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if index is NULL
160
+ - \ref SU_ERROR_GENERIC if page doesn't belong to a document
161
+ */
162
+ LO_RESULT LOPageGetPageIndex(LOPageRef page, size_t* index);
163
+
164
+ /**
165
+ @brief Gets the number of entities at the top of the group hierarchy, on
166
+ non-shared layers for the given page. This count will include
167
+ \ref LOGroupRef entities so the group hierarchy can be traversed.
168
+ @param[in] page The page object.
169
+ @param[out] num_nonshared_entities The number of non-shared entities.
170
+ @return
171
+ - \ref SU_ERROR_NONE on success
172
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
173
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if num_nonshared_entities is NULL
174
+ */
175
+ LO_RESULT LOPageGetNumberOfNonSharedEntities(LOPageRef page, size_t* num_nonshared_entities);
176
+
177
+ /**
178
+ @brief Gets the non-shared entity at the top of the group hierarchy at the
179
+ specified index for the given page.
180
+ @param[in] page The page object.
181
+ @param[in] index The 0-based entity index for the desired non-shared entity.
182
+ @param[out] entity The entity object.
183
+ @return
184
+ - \ref SU_ERROR_NONE on success
185
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
186
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if entity is NULL
187
+ - \ref SU_ERROR_OVERWRITE_VALID if *entity already refers to a valid object
188
+ - \ref SU_ERROR_OUT_OF_RANGE if index is greater than or equal to the number of
189
+ non-shared entities returned by LOPageGetNumberOfNonSharedEntities
190
+ */
191
+ LO_RESULT LOPageGetNonSharedEntityAtIndex(LOPageRef page, size_t index, LOEntityRef* entity);
192
+
193
+ /**
194
+ @brief Populates a \ref LOEntityListRef with the entities at the top of the
195
+ group hierarchy, on non-shared layers for the given page. This will
196
+ include \ref LOGroupRef entities so the group hierarchy can be
197
+ traversed.
198
+ @param[in] page The page object.
199
+ @param[out] entity_list The entity list to populate.
200
+ @return
201
+ - \ref SU_ERROR_NONE on success
202
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
203
+ - \ref SU_ERROR_INVALID_OUTPUT if entity_list does not refer to a valid object
204
+ */
205
+ LO_RESULT LOPageGetNonSharedEntities(LOPageRef page, LOEntityListRef entity_list);
206
+
207
+ /**
208
+ @brief Creates a new entity iterator for the given page. See \ref
209
+ LOPageEntityIteratorFlags for valid options for flags. This iterator
210
+ will visit all entities on the page in exactly the same order they are
211
+ drawn, including entities on shared layers. Entity group hierarchy is
212
+ ignored with this iterator, so groups are skipped. This is the
213
+ recommended method for entity iteration when drawing or exporting.
214
+ @param[in] page The page object.
215
+ @param[in] flags Flags indicating what entities to include.
216
+ @param[out] entity_iterator The entity iterator object.
217
+ @return
218
+ - \ref SU_ERROR_NONE on success
219
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
220
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if entity_iterator is NULL
221
+ - \ref SU_ERROR_OVERWRITE_VALID if *entity_iterator already refers to a valid object
222
+ */
223
+ LO_RESULT LOPageCreateEntityIterator(
224
+ LOPageRef page, LOPageEntityIteratorFlags flags, LOEntityIteratorRef* entity_iterator);
225
+
226
+ /**
227
+ @brief Creates a new reverse entity iterator for the given page. See \ref
228
+ LOPageEntityIteratorFlags for valid options for flags. This iterator
229
+ will visit all entities on the page in the reverse order they are drawn,
230
+ including entities on shared layers. Entity group hierarchy is ignored
231
+ with this iterator, so groups are skipped. This is the recommended
232
+ method for entity iteration when picking.
233
+ @param[in] page The page object.
234
+ @param[in] flags Flags indicating what entities to include.
235
+ @param[out] entity_iterator The entity iterator object.
236
+ @return
237
+ - \ref SU_ERROR_NONE on success
238
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
239
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if entity_iterator is NULL
240
+ - \ref SU_ERROR_OVERWRITE_VALID if *entity_iterator already refers to a valid object
241
+ */
242
+ LO_RESULT LOPageCreateReverseEntityIterator(
243
+ LOPageRef page, LOPageEntityIteratorFlags flags, LOEntityIteratorRef* entity_iterator);
244
+
245
+ /**
246
+ @brief Returns the document that this page belongs to.
247
+ @since LayOut 2018, API 3.0
248
+ @param[in] page The page object.
249
+ @param[out] document The document object.
250
+ @return
251
+ - \ref SU_ERROR_NONE on success
252
+ - \ref SU_ERROR_INVALID_INPUT if page does not refer to a valid object
253
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if document is NULL
254
+ */
255
+ LO_RESULT LOPageGetDocument(LOPageRef page, LODocumentRef* document);
256
+
257
+ #ifdef __cplusplus
258
+ } // end extern "C"
259
+ #endif // __cplusplus
260
+
261
+ #endif // LAYOUT_MODEL_PAGE_H_
@@ -0,0 +1,372 @@
1
+ // Copyright 2015-2023 Trimble Inc. All rights reserved.
2
+ // This file is intended for public distribution.
3
+
4
+ #ifndef LAYOUT_MODEL_PAGEINFO_H_
5
+ #define LAYOUT_MODEL_PAGEINFO_H_
6
+
7
+ #include <LayOutAPI/common.h>
8
+ #include <LayOutAPI/model/defs.h>
9
+ #include <SketchUpAPI/color.h>
10
+
11
+ /**
12
+ @struct LOPageInfoRef
13
+ @brief References the page information for a document. This specifies the
14
+ physical page dimensions and other page-related settings for a document.
15
+ */
16
+
17
+ /**
18
+ @enum LOImageResolution
19
+ @brief Defines the different settings available for image resolution.
20
+ */
21
+ typedef enum {
22
+ LOImageResolution_Low = 0, ///< Low resolution, high efficiency.
23
+ LOImageResolution_Medium, ///< Medium resolution, medium efficiency.
24
+ LOImageResolution_High, ///< High resolution, low efficiency.
25
+ LONumImageResolutions
26
+ } LOImageResolution;
27
+
28
+ #ifdef __cplusplus
29
+ extern "C" {
30
+ #endif // __cplusplus
31
+
32
+ /**
33
+ @brief Gets the page width.
34
+ @param[in] pageinfo The page info object.
35
+ @param[out] width The page width.
36
+ @return
37
+ - \ref SU_ERROR_NONE on success
38
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
39
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p width is NULL
40
+ */
41
+ LO_RESULT LOPageInfoGetWidth(LOPageInfoRef pageinfo, double* width);
42
+
43
+ /**
44
+ @brief Sets the page width.
45
+ @param[in] pageinfo The page info object.
46
+ @param[in] width The new page width to use.
47
+ @return
48
+ - \ref SU_ERROR_NONE on success
49
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
50
+ - \ref SU_ERROR_OUT_OF_RANGE if \p width is less than 1 or greater than 200
51
+ */
52
+ LO_RESULT LOPageInfoSetWidth(LOPageInfoRef pageinfo, double width);
53
+
54
+ /**
55
+ @brief Gets the page height.
56
+ @param[in] pageinfo The page info object.
57
+ @param[out] height The page height.
58
+ @return
59
+ - \ref SU_ERROR_NONE on success
60
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
61
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p height is NULL
62
+ */
63
+ LO_RESULT LOPageInfoGetHeight(LOPageInfoRef pageinfo, double* height);
64
+
65
+ /**
66
+ @brief Sets the page height.
67
+ @param[in] pageinfo The page info object.
68
+ @param[in] height The new page height to use.
69
+ @return
70
+ - \ref SU_ERROR_NONE on success
71
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
72
+ - \ref SU_ERROR_OUT_OF_RANGE if \p height is less than 1 or greater than 200
73
+ */
74
+ LO_RESULT LOPageInfoSetHeight(LOPageInfoRef pageinfo, double height);
75
+
76
+ /**
77
+ @brief Gets the left page margin.
78
+ @param[in] pageinfo The page info object.
79
+ @param[out] margin The left page margin.
80
+ @return
81
+ - \ref SU_ERROR_NONE on success
82
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
83
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p margin is NULL
84
+ */
85
+ LO_RESULT LOPageInfoGetLeftMargin(LOPageInfoRef pageinfo, double* margin);
86
+
87
+ /**
88
+ @brief Gets the right page margin.
89
+ @param[in] pageinfo The page info object.
90
+ @param[out] margin The right page margin.
91
+ @return
92
+ - \ref SU_ERROR_NONE on success
93
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
94
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p margin is NULL
95
+ */
96
+ LO_RESULT LOPageInfoGetRightMargin(LOPageInfoRef pageinfo, double* margin);
97
+
98
+ /**
99
+ @brief Gets the top page margin.
100
+ @param[in] pageinfo The page info object.
101
+ @param[out] margin The top page margin.
102
+ @return
103
+ - \ref SU_ERROR_NONE on success
104
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
105
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p margin is NULL
106
+ */
107
+ LO_RESULT LOPageInfoGetTopMargin(LOPageInfoRef pageinfo, double* margin);
108
+
109
+ /**
110
+ @brief Gets the bottom page margin.
111
+ @param[in] pageinfo The page info object.
112
+ @param[out] margin The bottom page margin.
113
+ @return
114
+ - \ref SU_ERROR_NONE on success
115
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
116
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p margin is NULL
117
+ */
118
+ LO_RESULT LOPageInfoGetBottomMargin(LOPageInfoRef pageinfo, double* margin);
119
+
120
+ /**
121
+ @brief Sets the left page margin.
122
+ @param[in] pageinfo The page info object.
123
+ @param[in] margin The new left margin to use.
124
+ @return
125
+ - \ref SU_ERROR_NONE on success
126
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
127
+ - \ref SU_ERROR_OUT_OF_RANGE if \p margin is less than 0 or greater than the page
128
+ width
129
+ */
130
+ LO_RESULT LOPageInfoSetLeftMargin(LOPageInfoRef pageinfo, double margin);
131
+
132
+ /**
133
+ @brief Sets the right page margin.
134
+ @param[in] pageinfo The page info object.
135
+ @param[in] margin The new right margin to use.
136
+ @return
137
+ - \ref SU_ERROR_NONE on success
138
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
139
+ - \ref SU_ERROR_OUT_OF_RANGE if \p margin is less than 0 or greater than the page
140
+ width
141
+ */
142
+ LO_RESULT LOPageInfoSetRightMargin(LOPageInfoRef pageinfo, double margin);
143
+
144
+ /**
145
+ @brief Sets the top page margin.
146
+ @param[in] pageinfo The page info object.
147
+ @param[in] margin The new top margin to use.
148
+ @return
149
+ - \ref SU_ERROR_NONE on success
150
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
151
+ - \ref SU_ERROR_OUT_OF_RANGE if \p margin is less than 0 or greater than the page
152
+ height
153
+ */
154
+ LO_RESULT LOPageInfoSetTopMargin(LOPageInfoRef pageinfo, double margin);
155
+
156
+ /**
157
+ @brief Sets the bottom page margin.
158
+ @param[in] pageinfo The page info object.
159
+ @param[in] margin The new bottom margin to use.
160
+ @return
161
+ - \ref SU_ERROR_NONE on success
162
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
163
+ - \ref SU_ERROR_OUT_OF_RANGE if \p margin is less than 0 or greater than the page
164
+ height
165
+ */
166
+ LO_RESULT LOPageInfoSetBottomMargin(LOPageInfoRef pageinfo, double margin);
167
+
168
+ /**
169
+ @brief Gets the page color.
170
+ @param[in] pageinfo The page info object.
171
+ @param[out] color The page color.
172
+ @return
173
+ - \ref SU_ERROR_NONE on success
174
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
175
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p color is NULL
176
+ */
177
+ LO_RESULT LOPageInfoGetPaperColor(LOPageInfoRef pageinfo, SUColor* color);
178
+
179
+ /**
180
+ @brief Sets the page color.
181
+ @param[in] pageinfo The page info object.
182
+ @param[in] color The new page color.
183
+ @return
184
+ - \ref SU_ERROR_NONE on success
185
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
186
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p color is NULL
187
+ */
188
+ LO_RESULT LOPageInfoSetPaperColor(LOPageInfoRef pageinfo, const SUColor* color);
189
+
190
+ /**
191
+ @brief Gets whether or not the page color should be printed.
192
+ @param[in] pageinfo The page info object.
193
+ @param[out] print_paper_color Whether or not the page color should be printed.
194
+ @return
195
+ - \ref SU_ERROR_NONE on success
196
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
197
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p print_paper_color is NULL
198
+ */
199
+ LO_RESULT LOPageInfoGetPrintPaperColor(LOPageInfoRef pageinfo, bool* print_paper_color);
200
+
201
+ /**
202
+ @brief Sets whether or not the page color should be printed.
203
+ @param[in] pageinfo The page info object.
204
+ @param[in] print_paper_color Whether or not the page color should be printed.
205
+ @return
206
+ - \ref SU_ERROR_NONE on success
207
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
208
+ */
209
+ LO_RESULT LOPageInfoSetPrintPaperColor(LOPageInfoRef pageinfo, bool print_paper_color);
210
+
211
+ /**
212
+ @brief Gets the color of the margins.
213
+ @param[in] pageinfo The page info object.
214
+ @param[out] color The margin color.
215
+ @return
216
+ - \ref SU_ERROR_NONE on success
217
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
218
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p color is NULL
219
+ */
220
+ LO_RESULT LOPageInfoGetMarginColor(LOPageInfoRef pageinfo, SUColor* color);
221
+
222
+ /**
223
+ @brief Sets the color of the margins.
224
+ @param[in] pageinfo The page info object.
225
+ @param[in] color The new margin color to use.
226
+ @return
227
+ - \ref SU_ERROR_NONE on success
228
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
229
+ */
230
+ LO_RESULT LOPageInfoSetMarginColor(LOPageInfoRef pageinfo, SUColor color);
231
+
232
+ /**
233
+ @brief Gets whether or not the margins are shown.
234
+ @param[in] pageinfo The page info object.
235
+ @param[out] show_margins Whether the margins are shown or not.
236
+ @return
237
+ - \ref SU_ERROR_NONE on success
238
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
239
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p show_margins is NULL
240
+ */
241
+ LO_RESULT LOPageInfoGetShowMargins(LOPageInfoRef pageinfo, bool* show_margins);
242
+
243
+ /**
244
+ @brief Sets whether or not the margins are shown.
245
+ @param[in] pageinfo The page info object.
246
+ @param[in] show_margins Whether the margins should be shown or not.
247
+ @return
248
+ - \ref SU_ERROR_NONE on success
249
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
250
+ */
251
+ LO_RESULT LOPageInfoSetShowMargins(LOPageInfoRef pageinfo, bool show_margins);
252
+
253
+ /**
254
+ @brief Gets whether or not the margins should be printed.
255
+ @param[in] pageinfo The page info object.
256
+ @param[out] print_margins Whether the margins are printed or not.
257
+ @return
258
+ - \ref SU_ERROR_NONE on success
259
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
260
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p print_margins is NULL
261
+ */
262
+ LO_RESULT LOPageInfoGetPrintMargins(LOPageInfoRef pageinfo, bool* print_margins);
263
+
264
+ /**
265
+ @brief Sets whether or not the margins should be printed.
266
+ @param[in] pageinfo The page info object.
267
+ @param[in] print_margins Whether the margins should be printed or not.
268
+ @return
269
+ - \ref SU_ERROR_NONE on success
270
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
271
+ */
272
+ LO_RESULT LOPageInfoSetPrintMargins(LOPageInfoRef pageinfo, bool print_margins);
273
+
274
+ /**
275
+ @brief Gets the value of the document's display resolution for images and raster
276
+ models.
277
+ @param[in] pageinfo The page info object.
278
+ @param[out] resolution The resolution.
279
+ @return
280
+ - \ref SU_ERROR_NONE on success
281
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
282
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p resolution is NULL
283
+ */
284
+ LO_RESULT LOPageInfoGetDisplayResolution(LOPageInfoRef pageinfo, LOImageResolution* resolution);
285
+
286
+ /**
287
+ @brief Sets the value of the document's display resolution for raster rendered SketchUp models.
288
+ @param[in] pageinfo The page info object.
289
+ @param[in] resolution The new resolution to use.
290
+ @return
291
+ - \ref SU_ERROR_NONE on success
292
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
293
+ - \ref SU_ERROR_OUT_OF_RANGE if the value of \p resolution is invalid
294
+ */
295
+ LO_RESULT LOPageInfoSetDisplayResolution(LOPageInfoRef pageinfo, LOImageResolution resolution);
296
+
297
+ /**
298
+ @brief Gets the value of the document's output resolution for raster rendered SketchUp models.
299
+ @param[in] pageinfo The page info object.
300
+ @param[out] resolution The resolution.
301
+ @return
302
+ - \ref SU_ERROR_NONE on success
303
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
304
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p resolution is NULL
305
+ */
306
+ LO_RESULT LOPageInfoGetOutputResolution(LOPageInfoRef pageinfo, LOImageResolution* resolution);
307
+
308
+ /**
309
+ @brief Sets the value of the document's output resolution for raster rendered SketchUp models.
310
+ @param[in] pageinfo The page info object.
311
+ @param[in] resolution The new resolution to use.
312
+ @return
313
+ - \ref SU_ERROR_NONE on success
314
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
315
+ - \ref SU_ERROR_OUT_OF_RANGE if the value of \p resolution is invalid
316
+ */
317
+ LO_RESULT LOPageInfoSetOutputResolution(LOPageInfoRef pageinfo, LOImageResolution resolution);
318
+
319
+ /**
320
+ @brief Gets the value of the document's display resolution for images.
321
+ @since LayOut 2023.1, API 8.1
322
+ @param[in] pageinfo The page info object.
323
+ @param[out] resolution The resolution.
324
+ @return
325
+ - \ref SU_ERROR_NONE on success
326
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
327
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p resolution is NULL
328
+ */
329
+ LO_RESULT LOPageInfoGetImageDisplayResolution(
330
+ LOPageInfoRef pageinfo, LOImageResolution* resolution);
331
+
332
+ /**
333
+ @brief Sets the value of the document's display resolution for images.
334
+ @since LayOut 2023.1, API 8.1
335
+ @param[in] pageinfo The page info object.
336
+ @param[in] resolution The new resolution to use.
337
+ @return
338
+ - \ref SU_ERROR_NONE on success
339
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
340
+ - \ref SU_ERROR_OUT_OF_RANGE if the value of \p resolution is invalid
341
+ */
342
+ LO_RESULT LOPageInfoSetImageDisplayResolution(LOPageInfoRef pageinfo, LOImageResolution resolution);
343
+
344
+ /**
345
+ @brief Gets the value of the document's output resolution for images.
346
+ @since LayOut 2023.1, API 8.1
347
+ @param[in] pageinfo The page info object.
348
+ @param[out] resolution The resolution.
349
+ @return
350
+ - \ref SU_ERROR_NONE on success
351
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
352
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p resolution is NULL
353
+ */
354
+ LO_RESULT LOPageInfoGetImageOutputResolution(LOPageInfoRef pageinfo, LOImageResolution* resolution);
355
+
356
+ /**
357
+ @brief Sets the value of the document's output resolution for images.
358
+ @since LayOut 2023.1, API 8.1
359
+ @param[in] pageinfo The page info object.
360
+ @param[in] resolution The new resolution to use.
361
+ @return
362
+ - \ref SU_ERROR_NONE on success
363
+ - \ref SU_ERROR_INVALID_INPUT if \p pageinfo does not refer to a valid object
364
+ - \ref SU_ERROR_OUT_OF_RANGE if the value of \p resolution is invalid
365
+ */
366
+ LO_RESULT LOPageInfoSetImageOutputResolution(LOPageInfoRef pageinfo, LOImageResolution resolution);
367
+
368
+ #ifdef __cplusplus
369
+ }
370
+ #endif // __cplusplus
371
+
372
+ #endif // LAYOUT_MODEL_PAGEINFO_H_