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.
- checksums.yaml +7 -0
- data/LICENSE.txt +11 -0
- data/README.md +5 -0
- data/ext/attribute_dictionaries.c +45 -0
- data/ext/attribute_dictionaries.h +3 -0
- data/ext/attribute_dictionary.c +156 -0
- data/ext/attribute_dictionary.h +3 -0
- data/ext/behavior.c +10 -0
- data/ext/behavior.h +3 -0
- data/ext/color.c +211 -0
- data/ext/color.h +3 -0
- data/ext/component_definition.c +188 -0
- data/ext/component_definition.h +3 -0
- data/ext/component_instance.c +10 -0
- data/ext/component_instance.h +3 -0
- data/ext/definition_list.c +145 -0
- data/ext/definition_list.h +3 -0
- data/ext/drawing_element.c +10 -0
- data/ext/drawing_element.h +3 -0
- data/ext/entities.c +11 -0
- data/ext/entities.h +3 -0
- data/ext/entity.c +253 -0
- data/ext/entity.h +3 -0
- data/ext/extconf.rb +38 -0
- data/ext/material.c +242 -0
- data/ext/material.h +3 -0
- data/ext/materials.c +80 -0
- data/ext/materials.h +3 -0
- data/ext/model.c +42 -0
- data/ext/model.h +3 -0
- data/ext/sketchup.c +89 -0
- data/ext/sketchup.h +4 -0
- data/ext/texture.c +9 -0
- data/ext/texture.h +3 -0
- data/ext/typed_value.c +84 -0
- data/ext/typed_value.h +5 -0
- data/ext/utils.h +80 -0
- data/lib/sketchup.rb +12 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +36 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +59 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +248 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +118 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +107 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +178 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +19 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +62 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +34 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +153 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +96 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +98 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +64 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +321 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +163 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +235 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +285 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +152 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +165 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +183 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +84 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +43 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +424 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +244 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +17 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +161 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +242 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +398 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +89 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +125 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +86 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +588 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +344 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +143 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +142 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +222 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +421 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +194 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +253 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +198 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +92 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +70 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +271 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +214 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +834 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +186 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +80 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +90 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +686 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +138 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +20 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +685 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +244 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +155 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +153 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +288 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +275 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +266 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +265 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +301 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +211 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +81 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +65 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +182 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +390 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +187 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +1663 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +49 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +72 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +79 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +166 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +140 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +179 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +836 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +56 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +26 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +212 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +156 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +147 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +45 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +303 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +190 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +384 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +358 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +280 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +390 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +79 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +154 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +122 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +65 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +16 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +16 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +239 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +124 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeoutils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonImage.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +50 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +835 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +36 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +59 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +248 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +118 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/color.h +107 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/common.h +178 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +19 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +62 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +34 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +153 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +96 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +98 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +64 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +321 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +163 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +235 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +285 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +152 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +165 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +183 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +84 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +43 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +424 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +244 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +17 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +161 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +242 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +398 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +89 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +125 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +86 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +588 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +344 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +143 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +142 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +222 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +421 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +194 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +253 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +198 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +92 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +70 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +271 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +214 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +834 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +186 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +80 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +90 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +686 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +138 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +20 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +685 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +244 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +155 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +153 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +288 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +275 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +266 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +265 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +301 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +211 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +81 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +65 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +182 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +390 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +187 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +1663 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +49 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +72 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +79 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +166 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +140 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +179 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +836 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +56 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +26 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +212 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +156 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +147 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +45 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +303 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +190 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +384 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +358 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +280 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +390 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +79 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +154 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +122 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +65 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +16 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +16 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +239 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +124 -0
- metadata +313 -0
@@ -0,0 +1,384 @@
|
|
1
|
+
// Copyright 2016 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUTextRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_TEXT_H_
|
8
|
+
#define SKETCHUP_MODEL_TEXT_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/color.h>
|
11
|
+
#include <SketchUpAPI/unicodestring.h>
|
12
|
+
#include <SketchUpAPI/geometry.h>
|
13
|
+
#include <SketchUpAPI/model/defs.h>
|
14
|
+
#include <SketchUpAPI/model/arrow_type.h>
|
15
|
+
|
16
|
+
#ifdef __cplusplus
|
17
|
+
extern "C" {
|
18
|
+
#endif
|
19
|
+
|
20
|
+
/**
|
21
|
+
@struct SUTextRef
|
22
|
+
@extends SUDrawingElementRef
|
23
|
+
@brief A text entity reference.
|
24
|
+
@since SketchUp 2018, API 6.0
|
25
|
+
*/
|
26
|
+
|
27
|
+
/**
|
28
|
+
@enum SUTextLeaderType
|
29
|
+
@brief Indicates the supported leader line types
|
30
|
+
*/
|
31
|
+
enum SUTextLeaderType {
|
32
|
+
SUTextLeaderType_None = 0,
|
33
|
+
SUTextLeaderType_ViewBased,
|
34
|
+
SUTextLeaderType_PushPin
|
35
|
+
};
|
36
|
+
|
37
|
+
/**
|
38
|
+
@brief Converts from an \ref SUTextRef to an \ref SUEntityRef. This is
|
39
|
+
essentially an upcast operation.
|
40
|
+
@since SketchUp 2018, API 6.0
|
41
|
+
@param[in] text The given text reference.
|
42
|
+
@related SUTextRef
|
43
|
+
@return
|
44
|
+
- The converted \ref SUEntityRef if text is a valid object
|
45
|
+
- If not, the returned reference will be invalid
|
46
|
+
*/
|
47
|
+
SU_EXPORT SUEntityRef SUTextToEntity(SUTextRef text);
|
48
|
+
|
49
|
+
/**
|
50
|
+
@brief Converts from an SUEntityRef to an \ref SUTextRef. This is
|
51
|
+
essentially a downcast operation so the given SUEntityRef must be
|
52
|
+
convertible to an \ref SUTextRef.
|
53
|
+
@since SketchUp 2018, API 6.0
|
54
|
+
@param[in] entity The given entity reference.
|
55
|
+
@related SUTextRef
|
56
|
+
@return
|
57
|
+
- The converted \ref SUTextRef if the downcast operation succeeds
|
58
|
+
- If not, the returned reference will be invalid
|
59
|
+
*/
|
60
|
+
SU_EXPORT SUTextRef SUTextFromEntity(SUEntityRef entity);
|
61
|
+
|
62
|
+
/**
|
63
|
+
@brief Converts from an \ref SUTextRef to an \ref SUDrawingElementRef.
|
64
|
+
This is essentially an upcast operation.
|
65
|
+
@since SketchUp 2018, API 6.0
|
66
|
+
@param[in] text The given dimension reference.
|
67
|
+
@related SUTextRef
|
68
|
+
@return
|
69
|
+
- The converted \ref SUDrawingElementRef if text is a valid object
|
70
|
+
- If not, the returned reference will be invalid
|
71
|
+
*/
|
72
|
+
SU_EXPORT SUDrawingElementRef SUTextToDrawingElement(SUTextRef text);
|
73
|
+
|
74
|
+
/**
|
75
|
+
@brief Converts from an SUDrawingElementRef to an \ref SUTextRef. This is
|
76
|
+
essentially a downcast operation so the given SUDrawingElementRef must
|
77
|
+
be convertible to an \ref SUTextRef.
|
78
|
+
@since SketchUp 2018, API 6.0
|
79
|
+
@param[in] element The given drawing element reference.
|
80
|
+
@related SUTextRef
|
81
|
+
@return
|
82
|
+
- The converted \ref SUTextRef if the downcast operation succeeds
|
83
|
+
- If not, the returned reference will be invalid
|
84
|
+
*/
|
85
|
+
SU_EXPORT SUTextRef SUTextFromDrawingElement(SUDrawingElementRef element);
|
86
|
+
|
87
|
+
/**
|
88
|
+
@brief Creates a text edge object.
|
89
|
+
The text object must be subsequently deallocated with \ref SUTextRelease()
|
90
|
+
unless the text object is associated with a parent object.
|
91
|
+
@since SketchUp 2018, API 6.0
|
92
|
+
@param[out] text The text object.
|
93
|
+
@related SUTextRef
|
94
|
+
@return
|
95
|
+
- \ref SU_ERROR_NONE on success
|
96
|
+
- \ref SU_ERROR_OVERWRITE_VALID if text input object reference already
|
97
|
+
references an object.
|
98
|
+
*/
|
99
|
+
SU_RESULT SUTextCreate(SUTextRef* text);
|
100
|
+
|
101
|
+
/**
|
102
|
+
@brief Releases a text object.
|
103
|
+
The text object must have been created with SUTextCreate() and not
|
104
|
+
subsequently associated with a parent object (e.g. SUEntitiesAddTexts()).
|
105
|
+
@since SketchUp 2018, API 6.0
|
106
|
+
@param[in] text The text object.
|
107
|
+
@related SUTextRef
|
108
|
+
@return
|
109
|
+
- \ref SU_ERROR_NONE on success
|
110
|
+
- \ref SU_ERROR_INVALID_INPUT if text does not reference a valid object
|
111
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if text is NULL
|
112
|
+
*/
|
113
|
+
SU_RESULT SUTextRelease(SUTextRef* text);
|
114
|
+
|
115
|
+
/**
|
116
|
+
@brief Sets the string to the text object
|
117
|
+
@since SketchUp 2018, API 6.0
|
118
|
+
@param[in] text The text object.
|
119
|
+
@param[in] string The string to set.
|
120
|
+
@related SUTextRef
|
121
|
+
@return
|
122
|
+
- \ref SU_ERROR_NONE on success
|
123
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
124
|
+
- \ref SU_ERROR_INVALID_INPUT if string is not a valid object
|
125
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if string is NULL
|
126
|
+
*/
|
127
|
+
SU_RESULT SUTextSetString(SUTextRef text, const char* string);
|
128
|
+
|
129
|
+
/**
|
130
|
+
@brief Retrieves the string from the text object
|
131
|
+
@since SketchUp 2018, API 6.0
|
132
|
+
@param[in] text The text object.
|
133
|
+
@param[out] string The string retrieved.
|
134
|
+
@related SUTextRef
|
135
|
+
@return
|
136
|
+
- \ref SU_ERROR_NONE on success
|
137
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
138
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if string is NULL
|
139
|
+
- \ref SU_ERROR_INVALID_OUTPUT if string does not point to a valid \ref
|
140
|
+
SUStringRef object
|
141
|
+
*/
|
142
|
+
SU_RESULT SUTextGetString(SUTextRef text, SUStringRef* string);
|
143
|
+
|
144
|
+
/**
|
145
|
+
@brief Sets the font to the text object
|
146
|
+
@since SketchUp 2018, API 6.0
|
147
|
+
@param[in] text The text object.
|
148
|
+
@param[in] font The font to set.
|
149
|
+
@related SUTextRef
|
150
|
+
@return
|
151
|
+
- \ref SU_ERROR_NONE on success
|
152
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
153
|
+
- \ref SU_ERROR_INVALID_INPUT if font is not a valid object
|
154
|
+
*/
|
155
|
+
SU_RESULT SUTextSetFont(SUTextRef text, SUFontRef font);
|
156
|
+
|
157
|
+
/**
|
158
|
+
@brief Retrieves the font from the text object
|
159
|
+
@since SketchUp 2018, API 6.0
|
160
|
+
@param[in] text The text object.
|
161
|
+
@param[out] font The font retrieved.
|
162
|
+
@related SUTextRef
|
163
|
+
@return
|
164
|
+
- \ref SU_ERROR_NONE on success
|
165
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
166
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if font is NULL
|
167
|
+
*/
|
168
|
+
SU_RESULT SUTextGetFont(SUTextRef text, SUFontRef* font);
|
169
|
+
|
170
|
+
/**
|
171
|
+
@brief Sets the leader type to the text object
|
172
|
+
@since SketchUp 2018, API 6.0
|
173
|
+
@param[in] text The text object.
|
174
|
+
@param[in] leader The leader type to set.
|
175
|
+
@related SUTextRef
|
176
|
+
@return
|
177
|
+
- \ref SU_ERROR_NONE on success
|
178
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
179
|
+
- \ref SU_ERROR_OUT_OF_RANGE if leader is not a valid value
|
180
|
+
*/
|
181
|
+
SU_RESULT SUTextSetLeaderType(SUTextRef text, enum SUTextLeaderType leader);
|
182
|
+
|
183
|
+
/**
|
184
|
+
@brief Retrieves the leader type from the text object
|
185
|
+
@since SketchUp 2018, API 6.0
|
186
|
+
@param[in] text The text object.
|
187
|
+
@param[out] leader The leader type retrieved.
|
188
|
+
@related SUTextRef
|
189
|
+
@return
|
190
|
+
- \ref SU_ERROR_NONE on success
|
191
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
192
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if leader is NULL
|
193
|
+
*/
|
194
|
+
SU_RESULT SUTextGetLeaderType(SUTextRef text, enum SUTextLeaderType* leader);
|
195
|
+
|
196
|
+
/**
|
197
|
+
@brief Sets the arrow type to the text object
|
198
|
+
@since SketchUp 2018, API 6.0
|
199
|
+
@param[in] text The text object.
|
200
|
+
@param[in] arrow_type The arrow type to set.
|
201
|
+
@related SUTextRef
|
202
|
+
@return
|
203
|
+
- \ref SU_ERROR_NONE on success
|
204
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
205
|
+
- \ref SU_ERROR_OUT_OF_RANGE if arrow_type is not a valid value
|
206
|
+
*/
|
207
|
+
SU_RESULT SUTextSetArrowType(SUTextRef text, enum SUArrowType arrow_type);
|
208
|
+
|
209
|
+
/**
|
210
|
+
@brief Retrieves the arrow type from the text object
|
211
|
+
@since SketchUp 2018, API 6.0
|
212
|
+
@param[in] text The text object.
|
213
|
+
@param[out] arrow_type The arrow type retrieved.
|
214
|
+
@related SUTextRef
|
215
|
+
@return
|
216
|
+
- \ref SU_ERROR_NONE on success
|
217
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
218
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if arrow_type is NULL
|
219
|
+
*/
|
220
|
+
SU_RESULT SUTextGetArrowType(SUTextRef text, enum SUArrowType* arrow_type);
|
221
|
+
|
222
|
+
/**
|
223
|
+
@brief Sets the connection point of a text object. A text's connection point can
|
224
|
+
be set in a few different ways. In the simplest form a connection point
|
225
|
+
can be set to an arbitrary point in space by providing a non-null \ref
|
226
|
+
SUPoint3D and an invalid \ref SUInstancePathRef. The more complex forms
|
227
|
+
to connect the point to a position on an entity in the model by providing
|
228
|
+
a valid \ref SUInstancePathRef which refers to an existing model entity.
|
229
|
+
In the more complex forms the input SUPoint3D must be non-null for all
|
230
|
+
connectable entity types except for vertices and guide points, in which
|
231
|
+
case the \ref SUPoint3D argument may be null as it will be ignored. It
|
232
|
+
should be noted that when changing a text's connection point the other
|
233
|
+
point may need to be adjusted as well. Users may want to verify the other
|
234
|
+
connection point after setting this one.
|
235
|
+
@since SketchUp 2018, API 6.0
|
236
|
+
|
237
|
+
@code{.c}
|
238
|
+
// Simple Example: Connect to an arbitrary position in space
|
239
|
+
SUPoint3D point{ xposition, yposition, zposition};
|
240
|
+
SUTextSetPoint(text, &point, SU_INVALID);
|
241
|
+
@endcode
|
242
|
+
|
243
|
+
@code{.c}
|
244
|
+
// Vertex Example: Connect to vertex entity
|
245
|
+
SUInstancePathRef path = SU_INVALID;
|
246
|
+
SUInstancePathCreate(&path);
|
247
|
+
SUInstancePathSetLeaf(path, SUVertexToEntity(vertex));
|
248
|
+
SUTextSetPoint(text, NULL, path);
|
249
|
+
@endcode
|
250
|
+
|
251
|
+
@code{.c}
|
252
|
+
// Edge Example: Connect to nearest point on an instance of an edge entity
|
253
|
+
SUPoint3D point{ xposition, yposition, zposition};
|
254
|
+
SUInstancePathRef path = SU_INVALID;
|
255
|
+
SUInstancePathCreate(&path);
|
256
|
+
SUInstancePathPushInstance(path, instance);
|
257
|
+
SUInstancePathSetLeaf(path, SUEdgeToEntity(edge));
|
258
|
+
SUTextSetPoint(text, &point, path);
|
259
|
+
@endcode
|
260
|
+
|
261
|
+
@param[in] text The text object.
|
262
|
+
@param[in] point The point to set.
|
263
|
+
@param[in] path The instance path to be set.
|
264
|
+
@related SUTextRef
|
265
|
+
@return
|
266
|
+
- \ref SU_ERROR_NONE on success
|
267
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
268
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if path is invalid and point is NULL
|
269
|
+
- \ref SU_ERROR_INVALID_ARGUMENT path is valid but refers to an invalid
|
270
|
+
instance path
|
271
|
+
- \ref SU_ERROR_GENERIC if point is NULL and path doesn't have a vertex or
|
272
|
+
guide point for its leaf
|
273
|
+
*/
|
274
|
+
SU_RESULT SUTextSetPoint(SUTextRef text, const struct SUPoint3D* point, SUInstancePathRef path);
|
275
|
+
|
276
|
+
/**
|
277
|
+
@brief Retrieves the point associated with the text object. The given instance
|
278
|
+
path object either must have been constructed using one of the
|
279
|
+
SUInstancePathCreate* functions or it will be generated on the fly if it
|
280
|
+
is invalid. It must be released using SUInstancePathRelease() when it
|
281
|
+
is no longer needed.
|
282
|
+
@since SketchUp 2018, API 6.0
|
283
|
+
@param[in] text The text object.
|
284
|
+
@param[out] point The point retrieved.
|
285
|
+
@param[out] path The path retrieved.
|
286
|
+
@related SUTextRef
|
287
|
+
@return
|
288
|
+
- \ref SU_ERROR_NONE on success
|
289
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
290
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if point or path are NULL
|
291
|
+
- \ref SU_ERROR_INVALID_OUTPUT if path is not a valid object
|
292
|
+
*/
|
293
|
+
SU_RESULT SUTextGetPoint(SUTextRef text, struct SUPoint3D* point, SUInstancePathRef* path);
|
294
|
+
|
295
|
+
/**
|
296
|
+
@brief Sets the leader vector associated with the text object
|
297
|
+
@since SketchUp 2018, API 6.0
|
298
|
+
@param[in] text The text object.
|
299
|
+
@param[in] vector The vector to set.
|
300
|
+
@related SUTextRef
|
301
|
+
@return
|
302
|
+
- \ref SU_ERROR_NONE on success
|
303
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
304
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
|
305
|
+
*/
|
306
|
+
SU_RESULT SUTextSetLeaderVector(SUTextRef text, const struct SUVector3D* vector);
|
307
|
+
|
308
|
+
/**
|
309
|
+
@brief Retrieves the leader vector associated with the text object
|
310
|
+
@since SketchUp 2018, API 6.0
|
311
|
+
@param[in] text The text object.
|
312
|
+
@param[out] vector The vector retrieved.
|
313
|
+
@related SUTextRef
|
314
|
+
@return
|
315
|
+
- \ref SU_ERROR_NONE on success
|
316
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
317
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
|
318
|
+
*/
|
319
|
+
SU_RESULT SUTextGetLeaderVector(SUTextRef text, struct SUVector3D* vector);
|
320
|
+
|
321
|
+
/**
|
322
|
+
@brief Sets the color to the text object
|
323
|
+
@since SketchUp 2018, API 6.0
|
324
|
+
@param[in] text The text object.
|
325
|
+
@param[in] color The color to set.
|
326
|
+
@related SUTextRef
|
327
|
+
@return
|
328
|
+
- \ref SU_ERROR_NONE on success
|
329
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
330
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if color is NULL
|
331
|
+
*/
|
332
|
+
SU_RESULT SUTextSetColor(SUTextRef text, const SUColor* color);
|
333
|
+
|
334
|
+
/**
|
335
|
+
@brief Retrieves the color from the text object
|
336
|
+
@since SketchUp 2018, API 6.0
|
337
|
+
@param[in] text The text object.
|
338
|
+
@param[out] color The color retrieved.
|
339
|
+
@related SUTextRef
|
340
|
+
@return
|
341
|
+
- \ref SU_ERROR_NONE on success
|
342
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
343
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if color is NULL
|
344
|
+
*/
|
345
|
+
SU_RESULT SUTextGetColor(SUTextRef text, SUColor* color);
|
346
|
+
|
347
|
+
/**
|
348
|
+
@brief Sets the screen position for text with no leader.
|
349
|
+
@since SketchUp 2019, API 7.0
|
350
|
+
@param[in] text The text object.
|
351
|
+
@param[in] percent_x The x position on screen in a range of 0.0 - 1.0 relative
|
352
|
+
to the screen width.
|
353
|
+
@param[in] percent_y The y position on screen in a range of 0.0 - 1.0 relative
|
354
|
+
to the screen height.
|
355
|
+
@related SUTextRef
|
356
|
+
@return
|
357
|
+
- \ref SU_ERROR_NONE on success
|
358
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
359
|
+
- \ref SU_ERROR_NO_DATA if the text has a leader to position with.
|
360
|
+
- \ref SU_ERROR_OUT_OF_RANGE if a leader exists, or if the percentages are not
|
361
|
+
between 0 and 1 inclusive.
|
362
|
+
*/
|
363
|
+
SU_RESULT SUTextSetScreenPosition(SUTextRef text, const double percent_x, const double percent_y);
|
364
|
+
|
365
|
+
/**
|
366
|
+
@brief Retrieves the screen location for text with no leader.
|
367
|
+
@since SketchUp 2019, API 7.0
|
368
|
+
@param[in] text The text object.
|
369
|
+
@param[out] percent_x The percent of screen width to the text position.
|
370
|
+
@param[out] percent_y The percent of screen height to the text position.
|
371
|
+
@related SUTextRef
|
372
|
+
@return
|
373
|
+
- \ref SU_ERROR_NONE on success
|
374
|
+
- \ref SU_ERROR_INVALID_INPUT if text is not a valid object
|
375
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if either percent is NULL
|
376
|
+
- \ref SU_ERROR_NO_DATA if text has a leader
|
377
|
+
*/
|
378
|
+
SU_RESULT SUTextGetScreenPosition(SUTextRef text, double* percent_x, double* percent_y);
|
379
|
+
|
380
|
+
#ifdef __cplusplus
|
381
|
+
} // extern "C"
|
382
|
+
#endif
|
383
|
+
|
384
|
+
#endif // SKETCHUP_MODEL_TEXT_H_
|