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,288 @@
1
+ // Copyright 2013 Trimble Inc. All Rights Reserved
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUImageRef.
6
+ */
7
+ #ifndef SKETCHUP_MODEL_IMAGE_H_
8
+ #define SKETCHUP_MODEL_IMAGE_H_
9
+
10
+ #include <SketchUpAPI/color.h>
11
+ #include <SketchUpAPI/unicodestring.h>
12
+ #include <SketchUpAPI/transformation.h>
13
+ #include <SketchUpAPI/model/defs.h>
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif
18
+
19
+ /**
20
+ @struct SUImageRef
21
+ @extends SUDrawingElementRef
22
+ @brief References an image object.
23
+ */
24
+
25
+ /**
26
+ @brief Converts from an \ref SUImageRef to an \ref SUEntityRef.
27
+ This is essentially an upcast operation.
28
+ @param[in] image The given image reference.
29
+ @related SUImageRef
30
+ @return
31
+ - The converted \ref SUEntityRef if image is a valid image.
32
+ - If not, the returned reference will be invalid.
33
+ */
34
+ SU_EXPORT SUEntityRef SUImageToEntity(SUImageRef image);
35
+
36
+ /**
37
+ @brief Converts from an \ref SUEntityRef to an \ref SUImageRef.
38
+ This is essentially a downcast operation so the given entity must be
39
+ convertible to an \ref SUImageRef.
40
+ @param[in] entity The given entity reference.
41
+ @related SUImageRef
42
+ @return
43
+ - The converted \ref SUImageRef if the downcast operation succeeds. If not, the
44
+ returned reference will be invalid
45
+ */
46
+ SU_EXPORT SUImageRef SUImageFromEntity(SUEntityRef entity);
47
+
48
+ /**
49
+ @brief Converts from an \ref SUImageRef to an \ref SUDrawingElementRef.
50
+ This is essentially an upcast operation.
51
+ @param[in] image The given image reference.
52
+ @related SUImageRef
53
+ @return
54
+ - The converted \ref SUEntityRef if image is a valid image
55
+ - If not, the returned reference will be invalid
56
+ */
57
+ SU_EXPORT SUDrawingElementRef SUImageToDrawingElement(SUImageRef image);
58
+
59
+ /**
60
+ @brief Converts from an \ref SUDrawingElementRef to an \ref SUImageRef.
61
+ This is essentially a downcast operation so the given element must be
62
+ convertible to an \ref SUImageRef.
63
+ @param[in] drawing_elem The given element reference.
64
+ @related SUImageRef
65
+ @return
66
+ - The converted \ref SUImageRef if the downcast operation succeeds
67
+ - If not, the returned reference will be invalid
68
+ */
69
+ SU_EXPORT SUImageRef SUImageFromDrawingElement(SUDrawingElementRef drawing_elem);
70
+
71
+ /**
72
+ @brief Creates a new image object from an image file specified by a path.
73
+ The created image must be subsequently added to the Entities of a model,
74
+ component definition or a group. Use SUModelRemoveComponentDefinitions()
75
+ to remove the image from a model.
76
+ @param[out] image The image object created.
77
+ @param[in] file_path The file path of the source image file.
78
+ Assumed to be UTF-8 encoded.
79
+ @related SUImageRef
80
+ @return
81
+ - \ref SU_ERROR_NONE on success
82
+ - \ref SU_ERROR_NULL_POINTER_INPUT if file_path is NULL
83
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if image is NULL
84
+ - \ref SU_ERROR_OVERWRITE_VALID if image already references a valid object
85
+ */
86
+ SU_RESULT SUImageCreateFromFile(SUImageRef* image, const char* file_path);
87
+
88
+ /**
89
+ @brief Creates a new SketchUp model image object from an image representation
90
+ object. The created image must be subsequently added to the Entities of
91
+ a model, component definition or a group. Use
92
+ SUModelRemoveComponentDefinitions() to remove the image from a model.
93
+ @since SketchUp 2017, API 5.0
94
+ @param[out] image The image object created.
95
+ @param[in] image_rep The basic image object retrieved.
96
+ @related SUImageRef
97
+ @return
98
+ - \ref SU_ERROR_NONE on success
99
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if image is NULL
100
+ - \ref SU_ERROR_OVERWRITE_VALID if image already references a valid object
101
+ - \ref SU_ERROR_INVALID_INPUT if image_rep is not a valid object
102
+ - \ref SU_ERROR_NO_DATA if the image_rep contains no data
103
+ */
104
+ SU_RESULT SUImageCreateFromImageRep(SUImageRef* image, SUImageRepRef image_rep);
105
+
106
+ /**
107
+ @brief Retrieves a basic image from a SketchUp model image. The given image
108
+ representation object must have been constructed using one of the
109
+ SUImageRepCreate* functions. It must be released using
110
+ SUImageRepRelease().
111
+ afterwards.
112
+ @since SketchUp 2017, API 5.0
113
+ @param[in] image The texture object.
114
+ @param[out] image_rep The basic image object retrieved.
115
+ @related SUImageRef
116
+ @return
117
+ - \ref SU_ERROR_NONE on success
118
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
119
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if image_rep is NULL
120
+ - \ref SU_ERROR_INVALID_OUTPUT if image_rep does not point to a valid \ref
121
+ SUImageRepRef object
122
+ - \ref SU_ERROR_NO_DATA if there was no image data
123
+ */
124
+ SU_RESULT SUImageGetImageRep(SUImageRef image, SUImageRepRef* image_rep);
125
+
126
+ /**
127
+ @brief Retrieves the name of an image object.
128
+ @param[in] image The image object.
129
+ @param[out] name The name retrieved.
130
+ @related SUImageRef
131
+ @deprecated This function returns a property that should not exist.
132
+ Use SUImageGetDefinition() and SUComponentDefinitionGetName()
133
+ instead.
134
+ @return
135
+ - \ref SU_ERROR_NONE on success
136
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
137
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
138
+ - \ref SU_ERROR_INVALID_OUTPUT if name does not point to a valid \ref
139
+ SUStringRef object
140
+ */
141
+ SU_DEPRECATED_FUNCTION("SketchUp API 9.1")
142
+ SU_RESULT SUImageGetName(SUImageRef image, SUStringRef* name);
143
+
144
+ /**
145
+ @brief Sets the name of an image object.
146
+ @param[in] image The image object.
147
+ @param[in] name The name to set. Assumed to be UTF-8 encoded.
148
+ @related SUImageRef
149
+ @deprecated This function sets a property that should not exist.
150
+ Use SUImageGetDefinition() and SUComponentDefinitionSetName()
151
+ instead.
152
+ @return
153
+ - \ref SU_ERROR_NONE on success
154
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
155
+ - \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
156
+ */
157
+ SU_DEPRECATED_FUNCTION("SketchUp API 9.1")
158
+ SU_RESULT SUImageSetName(SUImageRef image, const char* name);
159
+
160
+ /**
161
+ @brief Retrieves the 3-dimensional homogeneous transform of an image object.
162
+ @param[in] image The image object.
163
+ @param[out] transform The transform retrieved.
164
+ @related SUImageRef
165
+ @return
166
+ - \ref SU_ERROR_NONE on success
167
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
168
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
169
+ */
170
+ SU_RESULT SUImageGetTransform(SUImageRef image, struct SUTransformation* transform);
171
+
172
+ /**
173
+ @brief Sets the 3-dimensional homogeneous transform of an image object.
174
+ @param[in] image The image object.
175
+ @param[in] transform The affine transform to set.
176
+ @related SUImageRef
177
+ @return
178
+ - \ref SU_ERROR_NONE on success
179
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
180
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
181
+ */
182
+ SU_RESULT SUImageSetTransform(SUImageRef image, const struct SUTransformation* transform);
183
+
184
+ /**
185
+ @brief Retrieves the image file name of an image object.
186
+ @param[in] image The image object.
187
+ @param[out] file_name The image file name retrieved.
188
+ @related SUImageRef
189
+ @return
190
+ - \ref SU_ERROR_NONE on success
191
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
192
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if file_name is NULL
193
+ - \ref SU_ERROR_INVALID_OUTPUT if file_name does not point to a valid \ref
194
+ SUStringRef object
195
+ */
196
+ SU_RESULT SUImageGetFileName(SUImageRef image, SUStringRef* file_name);
197
+
198
+ /**
199
+ @brief Retrieves the world dimensions of an image object.
200
+ @param[in] image The image object.
201
+ @param[out] width The width dimension retrieved.
202
+ @param[out] height The height dimension retrieved.
203
+ @related SUImageRef
204
+ @return
205
+ - \ref SU_ERROR_NONE on success
206
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
207
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if width or height is NULL
208
+ */
209
+ SU_RESULT SUImageGetDimensions(SUImageRef image, double* width, double* height);
210
+
211
+ /**
212
+ @brief Retrieves the component definition of an image object.
213
+ @since SketchUp 2021.1, API 9.1
214
+ @param[in] image The image object.
215
+ @param[out] component The component definition retrieved.
216
+ @related SUImageRef
217
+ @return
218
+ - \ref SU_ERROR_NONE on success
219
+ - \ref SU_ERROR_INVALID_INPUT if \p image is not a valid object
220
+ - \ref SU_ERROR_OVERWRITE_VALID if \p component already refers to a valid object.
221
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p component is NULL
222
+ */
223
+ SU_RESULT SUImageGetDefinition(SUImageRef image, SUComponentDefinitionRef* component);
224
+
225
+ /**
226
+ @brief Retrieves the width and height dimensions of an image object in pixels.
227
+ @deprecated Will be removed in the next version of the SketchUp API. The
228
+ functionality is replaced by SUImageGetImageRep followed by
229
+ SUImageRepGetPixelDimensions.
230
+ @param[in] image The image object.
231
+ @param[out] width The width dimension retrieved.
232
+ @param[out] height The height dimension retrieved.
233
+ @related SUImageRef
234
+ @return
235
+ - \ref SU_ERROR_NONE on success
236
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
237
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if width or height is NULL
238
+ */
239
+ SU_DEPRECATED_FUNCTION("SketchUp API 5.0")
240
+ SU_RESULT SUImageGetPixelDimensions(SUImageRef image, size_t* width, size_t* height);
241
+
242
+ /**
243
+ @brief Returns the total size and bits-per-pixel value of an image. This
244
+ function is useful to determine the size of the buffer necessary to be
245
+ passed into \ref SUImageGetData(). The returned data can be used along
246
+ with the returned bits-per-pixel value and the image dimensions to
247
+ compute RGBA values at individual pixels of the image.
248
+ @deprecated Will be removed in the next version of the SketchUp API. The
249
+ functionality is replaced by SUImageGetImageRep followed by
250
+ SUImageRepGetDataSize.
251
+ @param[in] image The image object.
252
+ @param[out] data_size The total size of the image data in bytes.
253
+ @param[out] bits_per_pixel The number of bits per pixel of the image data.
254
+ @related SUImageRef
255
+ @return
256
+ - \ref SU_ERROR_NONE on success
257
+ - \ref SU_ERROR_INVALID_INPUT if image is an invalid object
258
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if data_size or bits_per_pixel is NULL
259
+ */
260
+ SU_DEPRECATED_FUNCTION("SketchUp API 5.0")
261
+ SU_RESULT SUImageGetDataSize(SUImageRef image, size_t* data_size, size_t* bits_per_pixel);
262
+
263
+ /**
264
+ @brief Returns the pixel data for an image. The given array must be large enough
265
+ to hold the image's data. This size can be obtained by calling
266
+ \ref SUImageGetDataSize().
267
+ @deprecated Will be removed in the next version of the SketchUp API. The
268
+ functionality is replaced by SUImageGetImageRep followed by
269
+ SUImageRepGetData.
270
+ @param[in] image The image object.
271
+ @param[in] data_size The size of the byte array.
272
+ @param[out] pixel_data The image data retrieved.
273
+ @related SUImageRef
274
+ @return
275
+ - \ref SU_ERROR_NONE on success
276
+ - \ref SU_ERROR_INVALID_INPUT if image is an invalid object
277
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if pixel_data is NULL
278
+ - \ref SU_ERROR_INSUFFICIENT_SIZE if data_size is insufficient for the image
279
+ data
280
+ */
281
+ SU_DEPRECATED_FUNCTION("SketchUp API 5.0")
282
+ SU_RESULT SUImageGetData(SUImageRef image, size_t data_size, SUByte pixel_data[]);
283
+
284
+ #ifdef __cplusplus
285
+ } // extern "C"
286
+ #endif
287
+
288
+ #endif // SKETCHUP_MODEL_IMAGE_H_
@@ -0,0 +1,275 @@
1
+ // Copyright 2016 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUImageRepRef.
6
+ */
7
+ #ifndef SKETCHUP_MODEL_IMAGE_REP_H_
8
+ #define SKETCHUP_MODEL_IMAGE_REP_H_
9
+
10
+ #include <SketchUpAPI/color.h>
11
+ #include <SketchUpAPI/model/defs.h>
12
+
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif
16
+
17
+ /**
18
+ @struct SUColorOrder
19
+ @brief A simple struct with four indices indicating the ordering of color data
20
+ within 32-bit bitmap images. 32-bit bitmap images have 4 channels per
21
+ pixel: red, green, blue, and alpha where the alpha channel indicates the
22
+ transparency of the pixel. SketchUpAPI expects the channels to be in
23
+ different orders on Windows vs. Mac OS. Bitmap data is exposed in BGRA
24
+ and RGBA byte orders on Windows and Mac OS, respectively. The color
25
+ order indices facilitate platform independent code when it is necessary
26
+ to manipulate image pixel data. The struct's data also applies to 24-bit
27
+ bitmap images except that such images don't have an alpha channel so the
28
+ \ref SUColorOrder.alpha_index varaible can be ignored.
29
+ @since SketchUp 2017, API 5.2
30
+ */
31
+ struct SUColorOrder {
32
+ short red_index; ///< Indicates the position of the red byte within a single
33
+ ///< pixel's data.
34
+ short green_index; ///< Indicates the position of the green byte within a
35
+ ///< single pixel's data.
36
+ short blue_index; ///< Indicates the position of the blue byte within a
37
+ ///< single pixel's data.
38
+ short alpha_index; ///< Indicates the position of the alpha byte within a
39
+ ///< single pixel's data.
40
+ };
41
+
42
+ /**
43
+ @brief Retrieves a \ref SUColorOrder indicating the order of color bytes within
44
+ 32-bit images' pixel data.
45
+ @since SketchUp 2017, API 5.2
46
+ @related SUColorOrder
47
+ @return a \ref SUColorOrder indicating the pixel color ordering of 32bit images.
48
+ */
49
+ SU_EXPORT struct SUColorOrder SUGetColorOrder();
50
+
51
+ /**
52
+ @struct SUImageRepRef
53
+ @brief References an image representation object.
54
+ @since SketchUp 2017, API 5.0
55
+ */
56
+
57
+ /**
58
+ @brief Creates a new image object with no image data. Image data can be set
59
+ using any of SUImageRepCopy, SUImageRepSetData, SUImageRepLoadFile.
60
+ @since SketchUp 2017, API 5.0
61
+ @param[out] image The image object created.
62
+ @related SUImageRepRef
63
+ @return
64
+ - \ref SU_ERROR_NONE on success
65
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if image is NULL
66
+ - \ref SU_ERROR_OVERWRITE_VALID if image already references a valid object
67
+ */
68
+ SU_RESULT SUImageRepCreate(SUImageRepRef* image);
69
+
70
+ /**
71
+ @brief Releases an image object.
72
+ @since SketchUp 2017, API 5.0
73
+ @param[in] image The image object.
74
+ @related SUImageRepRef
75
+ @return
76
+ - \ref SU_ERROR_NONE on success
77
+ - \ref SU_ERROR_INVALID_INPUT if image is an invalid object
78
+ - \ref SU_ERROR_NULL_POINTER_INPUT if image is NULL
79
+ */
80
+ SU_RESULT SUImageRepRelease(SUImageRepRef* image);
81
+
82
+ /**
83
+ @brief Copies data from the copy_image to image.
84
+ @since SketchUp 2017, API 5.0
85
+ @param[in,out] image The image object to be altered.
86
+ @param[in] copy_image The original image to copy from.
87
+ @related SUImageRepRef
88
+ @return
89
+ - \ref SU_ERROR_NONE on success
90
+ - \ref SU_ERROR_INVALID_INPUT if image or copy_image are not a valid objects
91
+ */
92
+ SU_RESULT SUImageRepCopy(SUImageRepRef image, SUImageRepRef copy_image);
93
+
94
+ /**
95
+ @brief Sets the image data for the given image. Makes a copy of the data rather
96
+ than taking ownership.
97
+ @since SketchUp 2017, API 5.0
98
+ @param[in,out] image The image object used to load the data.
99
+ @param[in] width The width of the image in pixels.
100
+ @param[in] height The height of the image in pixels.
101
+ @param[in] bits_per_pixel The number of bits per pixel.
102
+ @param[in] row_padding The size in Bytes of row padding in each row of
103
+ pixel_data.
104
+ @param[in] pixel_data The raw image data.
105
+ @related SUImageRepRef
106
+ @return
107
+ - \ref SU_ERROR_NONE on success
108
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
109
+ - \ref SU_ERROR_NULL_POINTER_INPUT if pixel_data is NULL
110
+ - \ref SU_ERROR_OUT_OF_RANGE if width or height are 0
111
+ - \ref SU_ERROR_OUT_OF_RANGE if bits per pixel is not 8, 24, or 32
112
+ */
113
+ SU_RESULT SUImageRepSetData(
114
+ SUImageRepRef image, size_t width, size_t height, size_t bits_per_pixel, size_t row_padding,
115
+ const SUByte pixel_data[]);
116
+
117
+ /**
118
+ @brief Loads image data from the specified file into the provided image.
119
+ @since SketchUp 2017, API 5.0
120
+ @param[in,out] image The image object used to load the file.
121
+ @param[in] file_path The file path of the source image file. Assumed to be
122
+ UTF-8 encoded.
123
+ @related SUImageRepRef
124
+ @return
125
+ - \ref SU_ERROR_NONE on success
126
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
127
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if file_path is NULL
128
+ - \ref SU_ERROR_SERIALIZATION if the load operation fails
129
+ */
130
+ SU_RESULT SUImageRepLoadFile(SUImageRepRef image, const char* file_path);
131
+
132
+ /**
133
+ @brief Saves an image object to an image file specified by a path.
134
+ @since SketchUp 2017, API 5.0
135
+ @param[in] image The image object.
136
+ @param[in] file_path The file path of the destination image file. Assumed to be
137
+ UTF-8 encoded.
138
+ @related SUImageRepRef
139
+ @return
140
+ - \ref SU_ERROR_NONE on success
141
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
142
+ - \ref SU_ERROR_NULL_POINTER_INPUT if file_path is NULL
143
+ - \ref SU_ERROR_NO_DATA if image contains no data
144
+ - \ref SU_ERROR_SERIALIZATION if the save operation fails
145
+ */
146
+ SU_RESULT SUImageRepSaveToFile(SUImageRepRef image, const char* file_path);
147
+
148
+ /**
149
+ @brief Retrieves the width and height dimensions of an image object in pixels.
150
+ @since SketchUp 2017, API 5.0
151
+ @param[in] image The image object.
152
+ @param[out] width The width dimension retrieved.
153
+ @param[out] height The height dimension retrieved.
154
+ @related SUImageRepRef
155
+ @return
156
+ - \ref SU_ERROR_NONE on success
157
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
158
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if width or height is NULL
159
+ */
160
+ SU_RESULT SUImageRepGetPixelDimensions(SUImageRepRef image, size_t* width, size_t* height);
161
+
162
+ /**
163
+ @brief Retrieves the size of the row padding of an image, in bytes.
164
+ @since SketchUp 2017, API 5.0
165
+ @param[in] image The image object.
166
+ @param[out] row_padding The row padding retrieved.
167
+ @related SUImageRepRef
168
+ @return
169
+ - \ref SU_ERROR_NONE on success
170
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
171
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if row_padding is NULL
172
+ */
173
+ SU_RESULT SUImageRepGetRowPadding(SUImageRepRef image, size_t* row_padding);
174
+
175
+ /**
176
+ @brief Resizes the dimensions of an image object to the given width and height
177
+ in pixels.
178
+ @since SketchUp 2017, API 5.0
179
+ @param[in] image The image object.
180
+ @param[in] width The new width.
181
+ @param[in] height The new height.
182
+ @related SUImageRepRef
183
+ @return
184
+ - \ref SU_ERROR_NONE on success
185
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
186
+ - \ref SU_ERROR_OUT_OF_RANGE if width or height are 0
187
+ */
188
+ SU_RESULT SUImageRepResize(SUImageRepRef image, size_t width, size_t height);
189
+
190
+ /**
191
+ @brief Converts an image object to be 32 bits per pixel.
192
+ @since SketchUp 2017, API 5.0
193
+ @param[in] image The image object.
194
+ @related SUImageRepRef
195
+ @return
196
+ - \ref SU_ERROR_NONE on success
197
+ - \ref SU_ERROR_INVALID_INPUT if image is not a valid object
198
+ - \ref SU_ERROR_NO_DATA if image contains no data
199
+ */
200
+ SU_RESULT SUImageRepConvertTo32BitsPerPixel(SUImageRepRef image);
201
+
202
+ /**
203
+ @brief Returns the total size and bits-per-pixel value of an image. This
204
+ function is useful to determine the size of the buffer necessary to be
205
+ passed into \ref SUImageRepGetData(). The returned data can be used
206
+ along with the returned bits-per-pixel value and the image dimensions to
207
+ compute RGBA values at individual pixels of the image.
208
+ @since SketchUp 2017, API 5.0
209
+ @param[in] image The image object.
210
+ @param[out] data_size The total size of the image data in bytes.
211
+ @param[out] bits_per_pixel The number of bits per pixel of the image data.
212
+ @related SUImageRepRef
213
+ @return
214
+ - \ref SU_ERROR_NONE on success
215
+ - \ref SU_ERROR_INVALID_INPUT if image is an invalid object
216
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if data_size or bits_per_pixel is NULL
217
+ */
218
+ SU_RESULT SUImageRepGetDataSize(SUImageRepRef image, size_t* data_size, size_t* bits_per_pixel);
219
+
220
+ /**
221
+ @brief Returns the pixel data for an image. The given array must be large
222
+ enough to hold the image's data. This size can be obtained by calling
223
+ \ref SUImageRepGetDataSize().
224
+ @since SketchUp 2017, API 5.0
225
+ @param[in] image The image object.
226
+ @param[in] data_size The size of the byte array.
227
+ @param[out] pixel_data The image data retrieved.
228
+ @related SUImageRepRef
229
+ @return
230
+ - \ref SU_ERROR_NONE on success
231
+ - \ref SU_ERROR_INVALID_INPUT if image is an invalid object
232
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if pixel_data is NULL
233
+ - \ref SU_ERROR_INSUFFICIENT_SIZE if data_size is insufficient for the image
234
+ data
235
+ */
236
+ SU_RESULT SUImageRepGetData(SUImageRepRef image, size_t data_size, SUByte pixel_data[]);
237
+
238
+ /**
239
+ @brief Returns the color data of an image in a \ref SUColor array.
240
+ @since SketchUp 2018, API 6.0
241
+ @param[in] image The image object.
242
+ @param[out] color_data The SUColor data retrieved.
243
+ @related SUImageRepRef
244
+ @return
245
+ - \ref SU_ERROR_NONE on success
246
+ - \ref SU_ERROR_INVALID_INPUT if image is an invalid object
247
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if color_data is NULL
248
+ - \ref SU_ERROR_UNSUPPORTED if the bytes per pixel of the image is invalid
249
+ */
250
+ SU_RESULT SUImageRepGetDataAsColors(SUImageRepRef image, SUColor color_data[]);
251
+
252
+ /**
253
+ @brief Returns the color data given by the UV texture coordinates.
254
+ @since SketchUp 2018, API 6.0
255
+ @param[in] image The image object.
256
+ @param[in] u The U texture coordinate.
257
+ @param[in] v The V texture coordinate.
258
+ @param[in] bilinear The flag to set bilinear texture filtering. This
259
+ interpolates the colors instead of picking the nearest
260
+ neighbor.
261
+ @param[out] color The returned color.
262
+ @related SUImageRepRef
263
+ @return
264
+ - \ref SU_ERROR_NONE on success
265
+ - \ref SU_ERROR_INVALID_INPUT if image is an invalid object
266
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if color is NULL
267
+ */
268
+ SU_RESULT SUImageRepGetColorAtUV(
269
+ SUImageRepRef image, double u, double v, bool bilinear, SUColor* color);
270
+
271
+ #ifdef __cplusplus
272
+ } // extern "C"
273
+ #endif
274
+
275
+ #endif // SKETCHUP_MODEL_IMAGE_REP_H_