scriptup 0.0.0

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 (241) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +11 -0
  3. data/README.md +5 -0
  4. data/ext/attribute_dictionaries.c +45 -0
  5. data/ext/attribute_dictionaries.h +3 -0
  6. data/ext/attribute_dictionary.c +156 -0
  7. data/ext/attribute_dictionary.h +3 -0
  8. data/ext/behavior.c +10 -0
  9. data/ext/behavior.h +3 -0
  10. data/ext/color.c +211 -0
  11. data/ext/color.h +3 -0
  12. data/ext/component_definition.c +188 -0
  13. data/ext/component_definition.h +3 -0
  14. data/ext/component_instance.c +10 -0
  15. data/ext/component_instance.h +3 -0
  16. data/ext/definition_list.c +145 -0
  17. data/ext/definition_list.h +3 -0
  18. data/ext/drawing_element.c +10 -0
  19. data/ext/drawing_element.h +3 -0
  20. data/ext/entities.c +11 -0
  21. data/ext/entities.h +3 -0
  22. data/ext/entity.c +253 -0
  23. data/ext/entity.h +3 -0
  24. data/ext/extconf.rb +38 -0
  25. data/ext/material.c +242 -0
  26. data/ext/material.h +3 -0
  27. data/ext/materials.c +80 -0
  28. data/ext/materials.h +3 -0
  29. data/ext/model.c +42 -0
  30. data/ext/model.h +3 -0
  31. data/ext/sketchup.c +89 -0
  32. data/ext/sketchup.h +4 -0
  33. data/ext/texture.c +9 -0
  34. data/ext/texture.h +3 -0
  35. data/ext/typed_value.c +84 -0
  36. data/ext/typed_value.h +5 -0
  37. data/ext/utils.h +80 -0
  38. data/lib/sketchup.rb +12 -0
  39. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +36 -0
  40. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +59 -0
  41. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +248 -0
  42. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +118 -0
  43. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +107 -0
  44. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +178 -0
  45. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +19 -0
  46. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +62 -0
  47. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +34 -0
  48. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +153 -0
  49. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +96 -0
  50. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +98 -0
  51. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +64 -0
  52. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +321 -0
  53. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +163 -0
  54. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +235 -0
  55. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +285 -0
  56. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +152 -0
  57. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +165 -0
  58. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +183 -0
  59. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +84 -0
  60. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +43 -0
  61. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +424 -0
  62. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +244 -0
  63. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +17 -0
  64. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +161 -0
  65. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +242 -0
  66. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +398 -0
  67. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +89 -0
  68. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +125 -0
  69. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +86 -0
  70. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +588 -0
  71. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +344 -0
  72. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +143 -0
  73. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +142 -0
  74. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +222 -0
  75. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +421 -0
  76. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +194 -0
  77. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +253 -0
  78. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +198 -0
  79. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +92 -0
  80. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +70 -0
  81. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +271 -0
  82. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +214 -0
  83. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +834 -0
  84. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +186 -0
  85. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +80 -0
  86. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +90 -0
  87. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +686 -0
  88. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +138 -0
  89. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +20 -0
  90. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +685 -0
  91. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +244 -0
  92. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +155 -0
  93. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +153 -0
  94. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +288 -0
  95. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +275 -0
  96. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +266 -0
  97. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +265 -0
  98. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +301 -0
  99. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +211 -0
  100. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +81 -0
  101. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +65 -0
  102. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +182 -0
  103. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +390 -0
  104. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +187 -0
  105. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +1663 -0
  106. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +49 -0
  107. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +72 -0
  108. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +79 -0
  109. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +166 -0
  110. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +140 -0
  111. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +179 -0
  112. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +836 -0
  113. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +56 -0
  114. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +26 -0
  115. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +212 -0
  116. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +156 -0
  117. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +147 -0
  118. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +45 -0
  119. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +303 -0
  120. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +190 -0
  121. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +384 -0
  122. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +358 -0
  123. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +280 -0
  124. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +390 -0
  125. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +79 -0
  126. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +154 -0
  127. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +122 -0
  128. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +65 -0
  129. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +16 -0
  130. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +16 -0
  131. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +239 -0
  132. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +124 -0
  133. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
  134. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeoutils.dylib +0 -0
  135. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonImage.dylib +0 -0
  136. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
  137. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
  138. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
  139. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
  140. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +50 -0
  141. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
  142. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +835 -0
  143. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
  144. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
  145. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
  146. data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
  147. data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +36 -0
  148. data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +59 -0
  149. data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +248 -0
  150. data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +118 -0
  151. data/sketchup-sdk-win/headers/SketchUpAPI/color.h +107 -0
  152. data/sketchup-sdk-win/headers/SketchUpAPI/common.h +178 -0
  153. data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +19 -0
  154. data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +62 -0
  155. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +34 -0
  156. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +153 -0
  157. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +96 -0
  158. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +98 -0
  159. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +64 -0
  160. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +321 -0
  161. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +163 -0
  162. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +235 -0
  163. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +285 -0
  164. data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +152 -0
  165. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +165 -0
  166. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +183 -0
  167. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +84 -0
  168. data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +43 -0
  169. data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +424 -0
  170. data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +244 -0
  171. data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +17 -0
  172. data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +161 -0
  173. data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +242 -0
  174. data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +398 -0
  175. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +89 -0
  176. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +125 -0
  177. data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +86 -0
  178. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +588 -0
  179. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +344 -0
  180. data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +143 -0
  181. data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +142 -0
  182. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +222 -0
  183. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +421 -0
  184. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +194 -0
  185. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +253 -0
  186. data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +198 -0
  187. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +92 -0
  188. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +70 -0
  189. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +271 -0
  190. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +214 -0
  191. data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +834 -0
  192. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +186 -0
  193. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +80 -0
  194. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +90 -0
  195. data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +686 -0
  196. data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +138 -0
  197. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +20 -0
  198. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +685 -0
  199. data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +244 -0
  200. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +155 -0
  201. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +153 -0
  202. data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +288 -0
  203. data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +275 -0
  204. data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +266 -0
  205. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +265 -0
  206. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +301 -0
  207. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +211 -0
  208. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +81 -0
  209. data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +65 -0
  210. data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +182 -0
  211. data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +390 -0
  212. data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +187 -0
  213. data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +1663 -0
  214. data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +49 -0
  215. data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +72 -0
  216. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +79 -0
  217. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +166 -0
  218. data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +140 -0
  219. data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +179 -0
  220. data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +836 -0
  221. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +56 -0
  222. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +26 -0
  223. data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +212 -0
  224. data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +156 -0
  225. data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +147 -0
  226. data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +45 -0
  227. data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +303 -0
  228. data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +190 -0
  229. data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +384 -0
  230. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +358 -0
  231. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +280 -0
  232. data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +390 -0
  233. data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +79 -0
  234. data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +154 -0
  235. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +122 -0
  236. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +65 -0
  237. data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +16 -0
  238. data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +16 -0
  239. data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +239 -0
  240. data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +124 -0
  241. metadata +313 -0
@@ -0,0 +1,36 @@
1
+ // Copyright 2017-2020 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for usage within the SketchUp application.
6
+ */
7
+ #ifndef SKETCHUP_APPLICATION_APPLICATION_H_
8
+ #define SKETCHUP_APPLICATION_APPLICATION_H_
9
+
10
+ #include <SketchUpAPI/common.h>
11
+ #include <SketchUpAPI/model/defs.h>
12
+ #pragma pack(push, 8)
13
+
14
+ #ifdef __cplusplus
15
+ extern "C" {
16
+ #endif
17
+
18
+ /**
19
+ @brief Gets a reference to the active model. The reference is owned by the
20
+ SketchUp application and should not be released.
21
+ @since SketchUp 2019.2, API 7.1
22
+ @param[out] model The model object.
23
+ @see SUModelRef
24
+ @return
25
+ - \ref SU_ERROR_NONE on success
26
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p model is `NULL`
27
+ - \ref SU_ERROR_NO_DATA if there is no active model
28
+ */
29
+ SU_RESULT SUApplicationGetActiveModel(SUModelRef* model);
30
+
31
+ #ifdef __cplusplus
32
+ }
33
+ #endif
34
+ #pragma pack(pop)
35
+
36
+ #endif // SKETCHUP_APPLICATION_APPLICATION_H_
@@ -0,0 +1,59 @@
1
+ // Copyright 2023 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUModelRef for live access
6
+ */
7
+ #ifndef SKETCHUP_APPLICATION_MODEL_H_
8
+ #define SKETCHUP_APPLICATION_MODEL_H_
9
+
10
+ #include <SketchUpAPI/common.h>
11
+ #include <SketchUpAPI/application/overlay.h>
12
+
13
+ #pragma pack(push, 8)
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif
18
+
19
+ /**
20
+ @brief Creates an overlay and adds it to the model.
21
+ @since SketchUp 2024, API 12.0
22
+ @param[in] model The model object
23
+ @param[in] info The information needed to create the overlay object
24
+ @param[out] overlay The created overlay object
25
+ @return
26
+ - \ref SU_ERROR_NONE on success
27
+ - \ref SU_ERROR_INVALID_INPUT if \p model is an invalid object
28
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p info is NULL
29
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p overlay is NULL
30
+ - \ref SU_ERROR_OVERWRITE_VALID if \p overlay is already a valid object
31
+ - \ref SU_ERROR_DUPLICATE if the given SUOverlayCreateInfo::id already exists in the model
32
+ @relatedalso SUModelRef
33
+ @relatedalso SUOverlayRef
34
+ */
35
+ SU_RESULT SUModelCreateOverlay(
36
+ SUModelRef model, const struct SUOverlayCreateInfo* info, SUOverlayRef* overlay);
37
+
38
+ /**
39
+ @brief Releases the overlay after removing it from the model.
40
+ @param[in] model The model object
41
+ @param[in,out] overlay The overlay object to be released, will be set to NULL on return.
42
+ @since SketchUp 2024, API 12.0
43
+ @return
44
+ - \ref SU_ERROR_NONE on success
45
+ - \ref SU_ERROR_INVALID_INPUT if \p model or \p overlay is an invalid object
46
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p overlay is NULL
47
+ - \ref SU_ERROR_NO_DATA if \p overlay could be found in the model
48
+ @relatedalso SUModelRef
49
+ @relatedalso SUOverlayRef
50
+ */
51
+ SU_RESULT SUModelReleaseOverlay(SUModelRef model, SUOverlayRef* overlay);
52
+
53
+ #ifdef __cplusplus
54
+ }
55
+ #endif
56
+
57
+ #pragma pack(pop)
58
+
59
+ #endif // SKETCHUP_APPLICATION_MODEL_H_
@@ -0,0 +1,248 @@
1
+ // Copyright 2023 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief An Overlay provides a way to render an image over the SU rendering.
6
+ */
7
+ #ifndef SKETCHUP_APPLICATION_OVERLAY_H_
8
+ #define SKETCHUP_APPLICATION_OVERLAY_H_
9
+
10
+ #include <SketchUpAPI/model/defs.h>
11
+ #include <SketchUpAPI/geometry.h>
12
+
13
+ #pragma pack(push, 8)
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif
18
+
19
+ /**
20
+ @struct SUOverlayRef
21
+ @brief Manages a Overlay object, which is used to blend external images on top of SketchUp
22
+ rendering.
23
+ */
24
+
25
+ /**
26
+ @brief Signature for SUOverlayCreateInfo::get_extents callback
27
+ @related SUOverlayRef
28
+ */
29
+ typedef struct SUBoundingBox3D (*SUOverlayGetExtentsFuncT)(SUOverlayRef, void*);
30
+
31
+ /**
32
+ @brief Available versions for the SUOverlayCreateInfo::version field.
33
+ @related SUOverlayRef
34
+ */
35
+ enum SUOverlayBeginFrameInfoVersion : uint32_t {
36
+ SUOVERLAY_BEGIN_FRAME_INFO_VERSION_1 = 1,
37
+ };
38
+
39
+ /**
40
+ @brief Current version of the SUBeginFrameInfo struct
41
+ @related SUOverlayRef
42
+ */
43
+ #define SUOVERLAY_BEGIN_FRAME_INFO_VERSION (SUOVERLAY_BEGIN_FRAME_INFO_VERSION_1)
44
+
45
+ /**
46
+ @struct SUBeginFrameInfo
47
+ @brief Information about the frame camera and viewport that is passed to
48
+ SUOverlayCreateInfo::begin_frame
49
+ @related SUOverlayRef
50
+ */
51
+ struct SUBeginFrameInfo {
52
+ /// Version of SUBeginFrameInfo struct. This will be set by SketchUp.
53
+ enum SUOverlayBeginFrameInfoVersion version;
54
+
55
+ struct SUPoint3D position; ///< Camera position
56
+ struct SUPoint3D target; ///< Camera target position
57
+ struct SUVector3D up; ///< Camera up direction
58
+ double aspect_ratio; ///< Aspect ratio of the view port
59
+ double near_clipping_distance; ///< Distance to near clipping plane from the camera
60
+ double far_clipping_distance; ///< Distance to far clipping plane from the camera
61
+ double projection_matrix[16]; ///< Projection Matrix.
62
+ double view_matrix[16]; ///< View Matrix
63
+ double viewport_width; ///< Viewport width
64
+ double viewport_height; ///< Viewport height
65
+
66
+ double fov; ///< Field of view of the perspective camera (in degrees). Valid only when
67
+ ///< is_perspective is true.
68
+ double height; ///< Parallel projection frustum height. Valid only when is_perspective is false.
69
+ bool is_perspective; ///< Whether the camera is perspective or orthographic.
70
+
71
+ void* reserved; ///< Reserved for internal use. This will be set to NULL by SketchUp and should
72
+ ///< not be modified.
73
+ };
74
+
75
+ /**
76
+ @brief Signature for SUOverlayCreateInfo::begin_frame callback
77
+ @related SUOverlayRef
78
+ */
79
+ typedef void (*SUOverlayBeginFrameFuncT)(SUOverlayRef, const struct SUBeginFrameInfo*, void*);
80
+
81
+ /**
82
+ @brief Available versions for SUOverlayDrawFrameInfo::version
83
+ @related SUOverlayRef
84
+ */
85
+ enum SUOverlayDrawFrameInfoVersion : uint32_t { SUOVERLAY_DRAW_FRAME_INFO_VERSION_1 = 1 };
86
+
87
+ /**
88
+ @brief Current version of SUOverlayDrawFrameInfo struct
89
+ @related SUOverlayRef
90
+ */
91
+ #define SUOVERLAY_DRAW_FRAME_INFO_VERSION (SUOVERLAY_DRAW_FRAME_INFO_VERSION_1)
92
+
93
+ /**
94
+ @struct SUDrawFrameMemoryBuffer
95
+ @brief Memory buffer (for color and depth) info used in SUOverlayDrawFrameInfo
96
+ @related SUOverlayRef
97
+ */
98
+ struct SUDrawFrameMemoryBuffer {
99
+ /// Pointer to the buffer
100
+ void* ptr;
101
+ /// Size (in bytes) from the beginning of one line of the buffer to the next line
102
+ uint32_t row_pitch;
103
+ /// Total size (in bytes) of the buffer
104
+ uint32_t size;
105
+ };
106
+
107
+ /**
108
+ @brief Supported image formats
109
+ @related SUOverlayRef
110
+ */
111
+ enum SUOverlayImageFormat : uint8_t {
112
+ SUOVERLAY_IMAGE_FORMAT_RGBA = 0,
113
+ SUOVERLAY_IMAGE_FORMAT_BGRA = 1,
114
+ };
115
+
116
+ /**
117
+ @brief Supported image orientations
118
+ @related SUOverlayRef
119
+ */
120
+ enum SUOverlayImageOrientation : uint8_t {
121
+ SUOVERLAY_IMAGE_ORIENTATION_TOP_DOWN = 0,
122
+ SUOVERLAY_IMAGE_ORIENTATION_BOTTOM_UP = 1,
123
+ };
124
+
125
+ /**
126
+ @struct SUOverlayDrawFrameInfo
127
+ @brief Data that SketchUp will use the to blend the given color/depth buffer onto SketchUp
128
+ rendering.
129
+ @related SUOverlayRef
130
+ */
131
+ struct SUOverlayDrawFrameInfo {
132
+ /// Version of the struct. This will be set by SketchUp.
133
+ enum SUOverlayDrawFrameInfoVersion version;
134
+
135
+ /// Alpha channel of the given color buffer will be multiplied with this value.
136
+ /// Must be set to 1.0 if an override is not needed.
137
+ double blending_factor;
138
+
139
+ /// Color buffer info. ptr points to a uint8_t buffer with 4 channels.
140
+ struct SUDrawFrameMemoryBuffer color;
141
+
142
+ /// Depth buffer info. ptr points to a float buffer.
143
+ struct SUDrawFrameMemoryBuffer depth;
144
+
145
+ /// Reserved for internal use. This will be set to NULL by SketchUp and should not be modified.
146
+ void* reserved;
147
+ };
148
+
149
+ /**
150
+ @brief Signature for SUOverlayCreateInfo::draw_frame callback
151
+ @related SUOverlayRef
152
+ */
153
+ typedef void (*SUOverlayDrawFrameFuncT)(SUOverlayRef, struct SUOverlayDrawFrameInfo*, void*);
154
+
155
+ /**
156
+ @brief Signature for SUOverlayCreateInfo::end_frame callback
157
+ @related SUOverlayRef
158
+ */
159
+ typedef void (*SUOverlayEndFrameFuncT)(SUOverlayRef, void*);
160
+
161
+ /**
162
+ @brief Signature for SUOverlayCreateInfo::start callback
163
+ @related SUOverlayRef
164
+ */
165
+ typedef void (*SUOverlayStartFuncT)(SUOverlayRef, void*);
166
+
167
+ /**
168
+ @brief Signature for SUOverlayCreateInfo::stop callback
169
+ @related SUOverlayRef
170
+ */
171
+ typedef void (*SUOverlayStopFuncT)(SUOverlayRef, void*);
172
+
173
+ /**
174
+ @brief Available versions for the SUOverlayCreateInfo::version field.
175
+ @related SUOverlayRef
176
+ */
177
+ enum SUOverlayCreateInfoVersion : uint32_t {
178
+ SUOVERLAY_CREATE_INFO_VERSION_1 = 1,
179
+ };
180
+
181
+ /**
182
+ @brief Current version of the SUOverlayCreateInfo struct.
183
+ @related SUOverlayRef
184
+ */
185
+ #define SUOVERLAY_CREATE_INFO_VERSION (SUOVERLAY_CREATE_INFO_VERSION_1)
186
+
187
+ /**
188
+ @struct SUOverlayCreateInfo
189
+ @brief Arguments for creating an overlay object.
190
+ @related SUOverlayRef
191
+ */
192
+ struct SUOverlayCreateInfo {
193
+ /// Version of the struct. This must always be set to SUOVERLAY_CREATE_INFO_VERSION
194
+ enum SUOverlayCreateInfoVersion version;
195
+
196
+ /// A pointer that will passed directly back into provided callbacks. SketchUp will not access
197
+ /// this pointer.
198
+ void* user_data;
199
+
200
+ /// Unique id for the overlay
201
+ const char* id;
202
+ /// Name of the overlay. This will be displayed to user.
203
+ const char* name;
204
+ /// Description of the overlay. This will be displayed to user.
205
+ const char* desc;
206
+ /// Source of the overlay. This will be displayed to user.
207
+ const char* source;
208
+
209
+ /// Image format of the overlay color buffer
210
+ enum SUOverlayImageFormat image_format;
211
+ /// Image orientation of the overlay color and depth buffer
212
+ enum SUOverlayImageOrientation image_orientation;
213
+
214
+ /// A function that will be called when user enables the overlay.
215
+ SUOverlayStartFuncT start;
216
+ /// A function that will be called when user disables the overlay.
217
+ SUOverlayStopFuncT stop;
218
+ /// A function that should return bounds of the overlay.
219
+ SUOverlayGetExtentsFuncT get_extents;
220
+
221
+ /// Function that SketchUp will call at the beginning of a frame.
222
+ SUOverlayBeginFrameFuncT begin_frame;
223
+ /// Function that SketchUp will call to get overlay buffers and blending information.
224
+ SUOverlayDrawFrameFuncT draw_frame;
225
+ /// Function that SketchUp will call to signal the resources passed in draw_frame are no longer
226
+ /// needed.
227
+ SUOverlayEndFrameFuncT end_frame;
228
+ };
229
+
230
+ /**
231
+ @brief Enables or disables an overlay.
232
+ @related SUOverlayRef
233
+ @param[in] overlay The overlay object
234
+ @param[in] enabled Whether to enable or disable
235
+ @since SketchUp 2024, API 12.0
236
+ @return
237
+ - \ref SU_ERROR_NONE on success
238
+ - \ref SU_ERROR_INVALID_INPUT if overlay is an invalid object
239
+ */
240
+ SU_RESULT SUOverlayEnable(SUOverlayRef overlay, bool enabled);
241
+
242
+ #ifdef __cplusplus
243
+ }
244
+ #endif
245
+
246
+ #pragma pack(pop)
247
+
248
+ #endif // SKETCHUP_APPLICATION_OVERLAY_H_
@@ -0,0 +1,118 @@
1
+ // Copyright 2020 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for exchanging data between SketchUp's Ruby API and C API.
6
+ *
7
+ * @note This is for use only within the SketchUp application.
8
+ */
9
+ #ifndef SKETCHUP_APPLICATION_RUBY_API_H_
10
+ #define SKETCHUP_APPLICATION_RUBY_API_H_
11
+
12
+ #include <SketchUpAPI/common.h>
13
+ #include <SketchUpAPI/model/defs.h>
14
+ #pragma pack(push, 8)
15
+
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+ /**
21
+ @brief This macro is defining a type matching Ruby's own `VALUE` type and
22
+ can be used interchangeably.
23
+ */
24
+ #ifdef __APPLE__
25
+ #define RUBY_VALUE unsigned long
26
+ #elif _WIN32
27
+ #define RUBY_VALUE unsigned long long
28
+ #else
29
+ #warning "Unsupported platform"
30
+ #define RUBY_VALUE unsigned long
31
+ #endif
32
+
33
+ /**
34
+ @brief Converts a C API entity to a Ruby API entity.
35
+
36
+ @since SketchUp 2020.2, API 8.2
37
+
38
+ @param[in] entity The C API entity reference.
39
+ @param[out] ruby_entity The retrieved Ruby API entity reference.
40
+ @see SUModelRef
41
+ @return
42
+ - \ref SU_ERROR_NONE on success
43
+ - \ref SU_ERROR_INVALID_INPUT if \p entity is an invalid object
44
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p entity is not owned by a model
45
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p ruby_entity is `NULL`
46
+ - \ref SU_ERROR_NO_DATA if this isn't called from within SketchUp
47
+ */
48
+ SU_RESULT SUEntityToRuby(SUEntityRef entity, RUBY_VALUE* ruby_entity);
49
+
50
+ /**
51
+ @brief Converts a Ruby API entity to a C API entity.
52
+
53
+ @since SketchUp 2020.2, API 8.2
54
+
55
+ @param[in] ruby_entity The Ruby API entity reference.
56
+ @param[out] entity The retrieved C API entity reference.
57
+ @see SUModelRef
58
+ @return
59
+ - \ref SU_ERROR_NONE on success
60
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p ruby_entity refers to a deleted entity
61
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p ruby_entity is not an entity type
62
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p entity is `NULL`
63
+ - \ref SU_ERROR_OVERWRITE_VALID if \p entity is already a valid reference
64
+ - \ref SU_ERROR_NO_DATA if this isn't called from within SketchUp
65
+ */
66
+ SU_RESULT SUEntityFromRuby(RUBY_VALUE ruby_entity, SUEntityRef* entity);
67
+
68
+ /**
69
+ @brief Converts a C API entity to a Ruby API imagerep.
70
+
71
+ @note Ruby takes ownership of the object it should not be released by
72
+ SUImageRepRelease. It will be released when Ruby garbage collects the
73
+ Ruby references to it.
74
+
75
+ @since SketchUp 2020.2, API 8.2
76
+
77
+ @param[in] imagerep The C API imagerep reference.
78
+ @param[out] ruby_imagerep The retrieved Ruby API imagerep reference.
79
+ @see SUModelRef
80
+ @return
81
+ - \ref SU_ERROR_NONE on success
82
+ - \ref SU_ERROR_INVALID_INPUT if \p imagerep is an invalid object
83
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p ruby_imagerep is `NULL`
84
+ - \ref SU_ERROR_NO_DATA if this isn't called from within SketchUp
85
+ */
86
+ SU_RESULT SUImageRepToRuby(SUImageRepRef imagerep, RUBY_VALUE* ruby_imagerep);
87
+
88
+ /**
89
+ @brief Converts a Ruby API imagerep to a C API imagerep.
90
+
91
+ @note Ruby retains the ownership of the object it should not be released by
92
+ SUImageRepRelease.
93
+
94
+ @warning The returned C API reference points to an object that is owned by the
95
+ Ruby runtime and it may be garbage collected. To avoid this, ensure
96
+ that the Ruby API reference has a longer lifetime than the C API
97
+ reference.
98
+
99
+ @since SketchUp 2020.2, API 8.2
100
+
101
+ @param[in] ruby_imagerep The Ruby API imagerep reference.
102
+ @param[out] imagerep The retrieved C API imagerep reference.
103
+ @see SUModelRef
104
+ @return
105
+ - \ref SU_ERROR_NONE on success
106
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p ruby_imagerep is not an imagerep type
107
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p imagerep is `NULL`
108
+ - \ref SU_ERROR_OVERWRITE_VALID if \p imagerep is already a valid reference
109
+ - \ref SU_ERROR_NO_DATA if this isn't called from within SketchUp
110
+ */
111
+ SU_RESULT SUImageRepFromRuby(RUBY_VALUE ruby_imagerep, SUImageRepRef* imagerep);
112
+
113
+ #ifdef __cplusplus
114
+ }
115
+ #endif
116
+ #pragma pack(pop)
117
+
118
+ #endif // SKETCHUP_APPLICATION_RUBY_API_H_
@@ -0,0 +1,107 @@
1
+ // Copyright 2013 Trimble Inc., All rights reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUColor.
6
+ */
7
+ #ifndef SKETCHUP_COLOR_H_
8
+ #define SKETCHUP_COLOR_H_
9
+
10
+ #include <SketchUpAPI/unicodestring.h>
11
+
12
+ #pragma pack(push, 8)
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif // __cplusplus
16
+
17
+ /**
18
+ @typedef SUByte
19
+ @brief A type that stores a byte.
20
+ */
21
+ typedef unsigned char SUByte;
22
+
23
+ /**
24
+ @struct SUColor
25
+ @brief Stores a RGBA color with 8 bit channels.
26
+ */
27
+ typedef struct {
28
+ SUByte red; ///< Red color channel
29
+ SUByte green; ///< Green color channel
30
+ SUByte blue; ///< Blue color channel
31
+ SUByte alpha; ///< Alpha color channel
32
+ } SUColor;
33
+
34
+ /**
35
+ @brief The blend method is used to blend two colors.
36
+ The blended color will be the result of taking
37
+ (1 - weight) * sucolor1 + weight * sucolor2.
38
+ @since SketchUp 2018, API 6.0
39
+ @param[in] color1 A \ref SUColor to blend color2 with.
40
+ @param[in] color2 A \ref SUColor to blend color1 with.
41
+ @param[in] weight A value that determines the weight
42
+ @param[out] blended_color The blended \ref SUColor.
43
+ @related SUColor
44
+ @return
45
+ - \ref SU_ERROR_NONE on success
46
+ - \ref SU_ERROR_OUT_OF_RANGE if weight is out of range
47
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if blended_color is NULL
48
+ */
49
+ SU_RESULT SUColorBlend(
50
+ const SUColor color1, const SUColor color2, const double weight, SUColor* blended_color);
51
+
52
+ /**
53
+ @brief Retrieves the number of color names recognized by SketchUp.
54
+ @since SketchUp 2018, API 6.0
55
+ @param[out] size The number of color names.
56
+ @related SUColor
57
+ @return
58
+ - \ref SU_ERROR_NONE on success
59
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if size is NULL
60
+ */
61
+ SU_RESULT SUColorGetNumNames(size_t* size);
62
+
63
+ /**
64
+ @brief Retrives all the color names recognized by SketchUp.
65
+ @since SketchUp 2018, API 6.0
66
+ @param[out] names An array of all the SketchUp Color names.
67
+ @param[in] size The size of the array.
68
+ @related SUColor
69
+ @return
70
+ - \ref SU_ERROR_NONE on success
71
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if names is NULL
72
+ */
73
+ SU_RESULT SUColorGetNames(SUStringRef names[], const size_t size);
74
+
75
+ /**
76
+ @brief Sets the color represented by the name.
77
+ @since SketchUp 2018, API 6.0
78
+ @param[out] color The struct representing the color.
79
+ @param[in] name The string representing the color.
80
+ @related SUColor
81
+ @return
82
+ - \ref SU_ERROR_NONE on success
83
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if color is NULL
84
+ - \ref SU_ERROR_INVALID_ARGUMENT if name is empty
85
+ */
86
+ SU_RESULT SUColorSetByName(SUColor* color, const char* name);
87
+
88
+ /**
89
+ @brief Sets the color with the provided value. The passed in value can either be
90
+ integer or hexadecimal. Alpha will always be 255 but RGB. For example:
91
+ if the value is 0x66ccff, rgb will be (102, 204, 255) respectively.
92
+ @since SketchUp 2018, API 6.0
93
+ @param[out] color The struct representing the color.
94
+ @param[in] value A value that represents the color.
95
+ @related SUColor
96
+ @return
97
+ - \ref SU_ERROR_NONE on success
98
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if color is NULL
99
+ */
100
+ SU_RESULT SUColorSetByValue(SUColor* color, const size_t value);
101
+
102
+ #ifdef __cplusplus
103
+ } // end extern "C"
104
+ #endif // __cplusplus
105
+ #pragma pack(pop)
106
+
107
+ #endif // SKETCHUP_COLOR_H_