scriptup 2026.0.0 → 2026.0.2
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 +4 -4
- data/README.md +43 -24
- data/ext/arc_curve.c +50 -0
- data/ext/attribute_dictionaries.c +49 -32
- data/ext/attribute_dictionary.c +54 -127
- data/ext/axes.c +79 -0
- data/ext/behavior.c +100 -9
- data/ext/bounding_box.c +195 -0
- data/ext/camera.c +178 -0
- data/ext/classifications.c +85 -0
- data/ext/color.c +91 -163
- data/ext/component_definition.c +78 -162
- data/ext/component_instance.c +88 -9
- data/ext/construction.c +59 -0
- data/ext/curve.c +87 -0
- data/ext/definition_list.c +89 -109
- data/ext/depend +1 -0
- data/ext/drawing_element.c +96 -117
- data/ext/edge.c +147 -0
- data/ext/edge_use.c +37 -0
- data/ext/entities.c +573 -16
- data/ext/entities_builder.c +145 -0
- data/ext/entity.c +175 -212
- data/ext/environments.c +149 -0
- data/ext/extconf.rb +54 -10
- data/ext/face.c +331 -0
- data/ext/geom.c +172 -0
- data/ext/group.c +86 -0
- data/ext/helpers.c +244 -0
- data/ext/image.c +182 -0
- data/ext/image_rep.c +158 -0
- data/ext/instance_path.c +185 -0
- data/ext/lat_long.c +88 -0
- data/ext/layer.c +98 -0
- data/ext/layer_folder.c +99 -0
- data/ext/layers.c +122 -0
- data/ext/length.c +253 -0
- data/ext/line_styles.c +60 -0
- data/ext/loop.c +24 -0
- data/ext/material.c +144 -197
- data/ext/materials.c +49 -60
- data/ext/model.c +232 -26
- data/ext/options_store.c +188 -0
- data/ext/page.c +168 -0
- data/ext/pages.c +135 -0
- data/ext/point2d.c +195 -0
- data/ext/point3d.c +340 -0
- data/ext/polygon_mesh.c +253 -0
- data/ext/scriptup.h +279 -0
- data/ext/section_plane.c +44 -0
- data/ext/sketchup.c +102 -76
- data/ext/styles.c +91 -0
- data/ext/text.c +135 -0
- data/ext/texture.c +74 -83
- data/ext/texture_writer.c +104 -0
- data/ext/transformation.c +309 -0
- data/ext/transformation2d.c +190 -0
- data/ext/uv_helper.c +41 -0
- data/ext/vector2d.c +238 -0
- data/ext/vector3d.c +294 -0
- data/ext/vertex.c +67 -0
- data/lib/sketchup.rb +2 -2
- data/sig/_top_level.rbs +188 -0
- data/sig/array.rbs +52 -0
- data/sig/geom/bounding_box.rbs +28 -0
- data/sig/geom/bounds2d.rbs +20 -0
- data/sig/geom/lat_long.rbs +13 -0
- data/sig/geom/oriented_bounds2d.rbs +10 -0
- data/sig/geom/point2d.rbs +32 -0
- data/sig/geom/point3d.rbs +46 -0
- data/sig/geom/polygon_mesh.rbs +35 -0
- data/sig/geom/transformation.rbs +44 -0
- data/sig/geom/transformation2d.rbs +26 -0
- data/sig/geom/utm.rbs +14 -0
- data/sig/geom/vector2d.rbs +40 -0
- data/sig/geom/vector3d.rbs +49 -0
- data/sig/geom.rbs +25 -0
- data/sig/language_handler.rbs +8 -0
- data/sig/layout/angular_dimension.rbs +32 -0
- data/sig/layout/auto_text_definition.rbs +73 -0
- data/sig/layout/auto_text_definitions.rbs +15 -0
- data/sig/layout/connection_point.rbs +6 -0
- data/sig/layout/dictionary.rbs +18 -0
- data/sig/layout/document.rbs +61 -0
- data/sig/layout/ellipse.rbs +5 -0
- data/sig/layout/entities.rbs +10 -0
- data/sig/layout/entity.rbs +28 -0
- data/sig/layout/formatted_text.rbs +30 -0
- data/sig/layout/grid.rbs +24 -0
- data/sig/layout/group.rbs +17 -0
- data/sig/layout/image.rbs +7 -0
- data/sig/layout/label.rbs +31 -0
- data/sig/layout/layer.rbs +21 -0
- data/sig/layout/layer_instance.rbs +9 -0
- data/sig/layout/layers.rbs +18 -0
- data/sig/layout/linear_dimension.rbs +39 -0
- data/sig/layout/locked_entity_error.rbs +4 -0
- data/sig/layout/locked_layer_error.rbs +4 -0
- data/sig/layout/page.rbs +20 -0
- data/sig/layout/page_info.rbs +37 -0
- data/sig/layout/pages.rbs +17 -0
- data/sig/layout/path.rbs +34 -0
- data/sig/layout/rectangle.rbs +15 -0
- data/sig/layout/reference_entity.rbs +7 -0
- data/sig/layout/sketch_up_model.rbs +54 -0
- data/sig/layout/style.rbs +150 -0
- data/sig/layout/table.rbs +17 -0
- data/sig/layout/table_cell.rbs +13 -0
- data/sig/layout/table_column.rbs +10 -0
- data/sig/layout/table_row.rbs +10 -0
- data/sig/layout.rbs +4 -0
- data/sig/length.rbs +37 -0
- data/sig/numeric.rbs +23 -0
- data/sig/sketchup/animation.rbs +8 -0
- data/sig/sketchup/app_observer.rbs +11 -0
- data/sig/sketchup/arc_curve.rbs +14 -0
- data/sig/sketchup/attribute_dictionaries.rbs +11 -0
- data/sig/sketchup/attribute_dictionary.rbs +18 -0
- data/sig/sketchup/axes.rbs +13 -0
- data/sig/sketchup/behavior.rbs +19 -0
- data/sig/sketchup/camera.rbs +33 -0
- data/sig/sketchup/classification_schema.rbs +8 -0
- data/sig/sketchup/classifications.rbs +12 -0
- data/sig/sketchup/color.rbs +22 -0
- data/sig/sketchup/component_definition.rbs +43 -0
- data/sig/sketchup/component_instance.rbs +32 -0
- data/sig/sketchup/console.rbs +8 -0
- data/sig/sketchup/construction_line.rbs +17 -0
- data/sig/sketchup/construction_point.rbs +5 -0
- data/sig/sketchup/curve.rbs +13 -0
- data/sig/sketchup/definition_list.rbs +26 -0
- data/sig/sketchup/definition_observer.rbs +6 -0
- data/sig/sketchup/definitions_observer.rbs +8 -0
- data/sig/sketchup/dimension.rbs +18 -0
- data/sig/sketchup/dimension_linear.rbs +24 -0
- data/sig/sketchup/dimension_observer.rbs +5 -0
- data/sig/sketchup/dimension_radial.rbs +9 -0
- data/sig/sketchup/drawingelement.rbs +18 -0
- data/sig/sketchup/edge.rbs +24 -0
- data/sig/sketchup/edge_use.rbs +13 -0
- data/sig/sketchup/entities.rbs +61 -0
- data/sig/sketchup/entities_builder.rbs +15 -0
- data/sig/sketchup/entities_observer.rbs +9 -0
- data/sig/sketchup/entity.rbs +21 -0
- data/sig/sketchup/entity_observer.rbs +6 -0
- data/sig/sketchup/environment.rbs +25 -0
- data/sig/sketchup/environments.rbs +18 -0
- data/sig/sketchup/environments_observer.rbs +8 -0
- data/sig/sketchup/extensions_manager.rbs +11 -0
- data/sig/sketchup/face.rbs +44 -0
- data/sig/sketchup/frame_change_observer.rbs +5 -0
- data/sig/sketchup/group.rbs +38 -0
- data/sig/sketchup/http/request.rbs +17 -0
- data/sig/sketchup/http/response.rbs +7 -0
- data/sig/sketchup/http.rbs +27 -0
- data/sig/sketchup/image.rbs +23 -0
- data/sig/sketchup/image_rep.rbs +17 -0
- data/sig/sketchup/importer.rbs +14 -0
- data/sig/sketchup/input_point.rbs +25 -0
- data/sig/sketchup/instance_observer.rbs +6 -0
- data/sig/sketchup/instance_path.rbs +20 -0
- data/sig/sketchup/layer.rbs +20 -0
- data/sig/sketchup/layer_folder.rbs +26 -0
- data/sig/sketchup/layers.rbs +30 -0
- data/sig/sketchup/layers_observer.rbs +13 -0
- data/sig/sketchup/licensing/extension_license.rbs +8 -0
- data/sig/sketchup/licensing.rbs +15 -0
- data/sig/sketchup/line_style.rbs +5 -0
- data/sig/sketchup/line_styles.rbs +13 -0
- data/sig/sketchup/load_handler.rbs +8 -0
- data/sig/sketchup/loop.rbs +10 -0
- data/sig/sketchup/material.rbs +74 -0
- data/sig/sketchup/materials.rbs +22 -0
- data/sig/sketchup/materials_observer.rbs +10 -0
- data/sig/sketchup/menu.rbs +9 -0
- data/sig/sketchup/model.rbs +105 -0
- data/sig/sketchup/model_observer.rbs +23 -0
- data/sig/sketchup/options_manager.rbs +12 -0
- data/sig/sketchup/options_provider.rbs +23 -0
- data/sig/sketchup/options_provider_observer.rbs +5 -0
- data/sig/sketchup/overlay.rbs +21 -0
- data/sig/sketchup/overlays_manager.rbs +10 -0
- data/sig/sketchup/page.rbs +55 -0
- data/sig/sketchup/pages.rbs +25 -0
- data/sig/sketchup/pages_observer.rbs +7 -0
- data/sig/sketchup/pick_helper.rbs +28 -0
- data/sig/sketchup/regional_settings.rbs +7 -0
- data/sig/sketchup/rendering_options.rbs +89 -0
- data/sig/sketchup/rendering_options_observer.rbs +5 -0
- data/sig/sketchup/section_plane.rbs +12 -0
- data/sig/sketchup/selection.rbs +31 -0
- data/sig/sketchup/selection_observer.rbs +8 -0
- data/sig/sketchup/set.rbs +15 -0
- data/sig/sketchup/shadow_info.rbs +18 -0
- data/sig/sketchup/shadow_info_observer.rbs +5 -0
- data/sig/sketchup/skp.rbs +5 -0
- data/sig/sketchup/snap.rbs +10 -0
- data/sig/sketchup/style.rbs +9 -0
- data/sig/sketchup/styles.rbs +21 -0
- data/sig/sketchup/text.rbs +22 -0
- data/sig/sketchup/texture.rbs +14 -0
- data/sig/sketchup/texture_writer.rbs +14 -0
- data/sig/sketchup/tool.rbs +45 -0
- data/sig/sketchup/tools.rbs +14 -0
- data/sig/sketchup/tools_observer.rbs +6 -0
- data/sig/sketchup/uv_helper.rbs +6 -0
- data/sig/sketchup/vertex.rbs +11 -0
- data/sig/sketchup/view.rbs +87 -0
- data/sig/sketchup/view_observer.rbs +6 -0
- data/sig/sketchup.rbs +137 -0
- data/sig/sketchup_extension.rbs +23 -0
- data/sig/string.rbs +5 -0
- data/sig/ui/command.rbs +20 -0
- data/sig/ui/html_dialog.rbs +29 -0
- data/sig/ui/notification.rbs +16 -0
- data/sig/ui/toolbar.rbs +18 -0
- data/sig/ui/web_dialog.rbs +38 -0
- data/sig/ui.rbs +66 -0
- metadata +204 -275
- data/ext/attribute_dictionaries.h +0 -8
- data/ext/attribute_dictionary.h +0 -8
- data/ext/behavior.h +0 -8
- data/ext/color.h +0 -8
- data/ext/component_definition.h +0 -8
- data/ext/component_instance.h +0 -8
- data/ext/definition_list.h +0 -8
- data/ext/drawing_element.h +0 -8
- data/ext/entities.h +0 -8
- data/ext/entity.h +0 -8
- data/ext/material.h +0 -8
- data/ext/materials.h +0 -8
- data/ext/model.h +0 -8
- data/ext/not_implemented.c +0 -88
- data/ext/not_implemented.h +0 -20
- data/ext/sketchup.h +0 -9
- data/ext/texture.h +0 -8
- data/ext/typed_value.c +0 -84
- data/ext/typed_value.h +0 -11
- data/ext/utils.h +0 -111
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +0 -36
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +0 -59
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +0 -248
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +0 -118
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +0 -107
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +0 -178
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +0 -19
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +0 -62
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +0 -34
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +0 -153
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +0 -96
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +0 -98
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +0 -64
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +0 -321
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +0 -163
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +0 -235
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +0 -285
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +0 -152
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +0 -165
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +0 -183
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +0 -84
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +0 -43
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +0 -424
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +0 -244
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +0 -17
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +0 -161
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +0 -242
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +0 -398
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +0 -89
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +0 -125
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +0 -86
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +0 -588
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +0 -344
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +0 -143
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +0 -142
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +0 -222
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +0 -421
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +0 -194
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +0 -253
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +0 -198
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +0 -92
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +0 -70
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +0 -271
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +0 -214
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +0 -834
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +0 -186
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +0 -80
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +0 -90
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +0 -686
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +0 -138
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +0 -20
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +0 -685
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +0 -244
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +0 -155
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +0 -153
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +0 -288
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +0 -275
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +0 -266
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +0 -265
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +0 -301
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +0 -211
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +0 -81
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +0 -65
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +0 -182
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +0 -390
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +0 -187
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +0 -1663
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +0 -49
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +0 -72
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +0 -79
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +0 -166
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +0 -140
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +0 -179
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +0 -836
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +0 -56
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +0 -26
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +0 -212
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +0 -156
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +0 -147
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +0 -45
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +0 -303
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +0 -190
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +0 -384
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +0 -358
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +0 -280
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +0 -390
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +0 -79
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +0 -154
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +0 -122
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +0 -65
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +0 -16
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +0 -16
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +0 -239
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +0 -124
- 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 -4
- 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 +0 -50
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +0 -835
- data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -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/LayOutAPI/application/application.h +0 -117
- data/sketchup-sdk-win/headers/LayOutAPI/common.h +0 -22
- data/sketchup-sdk-win/headers/LayOutAPI/geometry/geometry.h +0 -78
- data/sketchup-sdk-win/headers/LayOutAPI/initialize.h +0 -36
- data/sketchup-sdk-win/headers/LayOutAPI/layout.h +0 -49
- data/sketchup-sdk-win/headers/LayOutAPI/model/angulardimension.h +0 -468
- data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinition.h +0 -569
- data/sketchup-sdk-win/headers/LayOutAPI/model/autotextdefinitionlist.h +0 -79
- data/sketchup-sdk-win/headers/LayOutAPI/model/connectionpoint.h +0 -107
- data/sketchup-sdk-win/headers/LayOutAPI/model/defs.h +0 -42
- data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +0 -120
- data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +0 -864
- data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +0 -59
- data/sketchup-sdk-win/headers/LayOutAPI/model/ellipse.h +0 -78
- data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +0 -330
- data/sketchup-sdk-win/headers/LayOutAPI/model/entityiterator.h +0 -49
- data/sketchup-sdk-win/headers/LayOutAPI/model/entitylist.h +0 -114
- data/sketchup-sdk-win/headers/LayOutAPI/model/formattedtext.h +0 -397
- data/sketchup-sdk-win/headers/LayOutAPI/model/grid.h +0 -251
- data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +0 -243
- data/sketchup-sdk-win/headers/LayOutAPI/model/image.h +0 -146
- data/sketchup-sdk-win/headers/LayOutAPI/model/imagerep.h +0 -109
- data/sketchup-sdk-win/headers/LayOutAPI/model/label.h +0 -332
- data/sketchup-sdk-win/headers/LayOutAPI/model/layer.h +0 -207
- data/sketchup-sdk-win/headers/LayOutAPI/model/layerinstance.h +0 -117
- data/sketchup-sdk-win/headers/LayOutAPI/model/layerlist.h +0 -69
- data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +0 -456
- data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +0 -261
- data/sketchup-sdk-win/headers/LayOutAPI/model/pageinfo.h +0 -372
- data/sketchup-sdk-win/headers/LayOutAPI/model/pagelist.h +0 -81
- data/sketchup-sdk-win/headers/LayOutAPI/model/path.h +0 -464
- data/sketchup-sdk-win/headers/LayOutAPI/model/rectangle.h +0 -240
- data/sketchup-sdk-win/headers/LayOutAPI/model/referenceentity.h +0 -120
- data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +0 -624
- data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +0 -94
- data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +0 -1080
- data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +0 -470
- data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +0 -156
- data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +0 -36
- data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +0 -59
- data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +0 -248
- data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +0 -118
- data/sketchup-sdk-win/headers/SketchUpAPI/color.h +0 -107
- data/sketchup-sdk-win/headers/SketchUpAPI/common.h +0 -178
- data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +0 -19
- data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +0 -62
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +0 -34
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +0 -153
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +0 -96
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +0 -98
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +0 -64
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +0 -321
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +0 -163
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +0 -235
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +0 -285
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +0 -152
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +0 -165
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +0 -183
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +0 -84
- data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +0 -43
- data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +0 -424
- data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +0 -244
- data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +0 -17
- data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +0 -161
- data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +0 -242
- data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +0 -398
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +0 -89
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +0 -125
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +0 -86
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +0 -588
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +0 -344
- data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +0 -143
- data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +0 -142
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +0 -222
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +0 -421
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +0 -194
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +0 -253
- data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +0 -198
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +0 -92
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +0 -70
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +0 -271
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +0 -214
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +0 -834
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +0 -186
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +0 -80
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +0 -90
- data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +0 -686
- data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +0 -138
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +0 -20
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +0 -685
- data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +0 -244
- data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +0 -155
- data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +0 -153
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +0 -288
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +0 -275
- data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +0 -266
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +0 -265
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +0 -301
- data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +0 -211
- data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +0 -81
- data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +0 -65
- data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +0 -182
- data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +0 -390
- data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +0 -187
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +0 -1663
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +0 -49
- data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +0 -72
- data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +0 -79
- data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +0 -166
- data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +0 -140
- data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +0 -179
- data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +0 -836
- data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +0 -56
- data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +0 -26
- data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +0 -212
- data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +0 -156
- data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +0 -147
- data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +0 -45
- data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +0 -303
- data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +0 -190
- data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +0 -384
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +0 -358
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +0 -280
- data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +0 -390
- data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +0 -79
- data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +0 -154
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +0 -122
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +0 -65
- data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +0 -16
- data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +0 -16
- data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +0 -239
- data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +0 -124
data/ext/sketchup.c
CHANGED
|
@@ -1,104 +1,130 @@
|
|
|
1
|
-
#include <
|
|
2
|
-
#include <stdbool.h>
|
|
3
|
-
#include <sketchup.h>
|
|
4
|
-
#include <entity.h>
|
|
5
|
-
#include <entities.h>
|
|
6
|
-
#include <model.h>
|
|
7
|
-
#include <material.h>
|
|
8
|
-
#include <materials.h>
|
|
9
|
-
#include <texture.h>
|
|
10
|
-
#include <color.h>
|
|
11
|
-
#include <attribute_dictionary.h>
|
|
12
|
-
#include <attribute_dictionaries.h>
|
|
13
|
-
#include <component_definition.h>
|
|
14
|
-
#include <component_instance.h>
|
|
15
|
-
#include <definition_list.h>
|
|
16
|
-
#include <drawing_element.h>
|
|
17
|
-
#include <behavior.h>
|
|
18
|
-
#include <not_implemented.h>
|
|
19
|
-
#include <utils.h>
|
|
1
|
+
#include <scriptup.h>
|
|
20
2
|
|
|
21
|
-
|
|
3
|
+
VALUE mSketchup;
|
|
4
|
+
VALUE mGeom;
|
|
22
5
|
|
|
23
|
-
|
|
6
|
+
#define SCRIPTUP_DEFINE_CLASS(var, ns, name, parent) VALUE var;
|
|
7
|
+
SCRIPTUP_CLASSES(SCRIPTUP_DEFINE_CLASS)
|
|
8
|
+
|
|
9
|
+
static SUModelRef active_model = SU_INVALID;
|
|
10
|
+
|
|
11
|
+
SUModelRef Sketchup_get_active_model(void)
|
|
24
12
|
{
|
|
25
13
|
return active_model;
|
|
26
14
|
}
|
|
15
|
+
|
|
27
16
|
void Sketchup_set_active_model(SUModelRef model)
|
|
28
17
|
{
|
|
29
18
|
active_model = model;
|
|
30
19
|
}
|
|
31
20
|
|
|
32
|
-
static VALUE
|
|
21
|
+
static VALUE sketchup_open_file(int argc, VALUE* argv, VALUE self)
|
|
33
22
|
{
|
|
34
23
|
VALUE path;
|
|
35
|
-
VALUE
|
|
36
|
-
rb_scan_args(argc, argv, "1:", &path, &
|
|
24
|
+
VALUE options;
|
|
25
|
+
rb_scan_args(argc, argv, "1:", &path, &options);
|
|
37
26
|
|
|
38
|
-
const VALUE kwarg_ids[1] = {
|
|
39
|
-
rb_intern_const("with_status")
|
|
40
|
-
};
|
|
41
|
-
VALUE kwargs[1];
|
|
42
|
-
rb_get_kwargs(kwarg_hash, kwarg_ids, 0, 1, kwargs);
|
|
43
27
|
bool with_status = true;
|
|
44
|
-
if (
|
|
45
|
-
|
|
28
|
+
if (!NIL_P(options))
|
|
29
|
+
{
|
|
30
|
+
ID ids[1] = { (rb_intern)("with_status") };
|
|
31
|
+
VALUE values[1];
|
|
32
|
+
rb_get_kwargs(options, ids, 0, 1, values);
|
|
33
|
+
if (values[0] != Qundef)
|
|
34
|
+
with_status = RTEST(values[0]);
|
|
35
|
+
}
|
|
46
36
|
|
|
47
37
|
enum SUModelLoadStatus status;
|
|
48
38
|
SUModelRef model = SU_INVALID;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
if (SUModelCreateFromFileWithStatus(&model, StringValueCStr(path), &status) != SU_ERROR_NONE)
|
|
40
|
+
return Qfalse;
|
|
41
|
+
|
|
42
|
+
Sketchup_set_active_model(model);
|
|
43
|
+
return with_status ? INT2FIX(status) : Qtrue;
|
|
44
|
+
}
|
|
52
45
|
|
|
46
|
+
// Creates an empty model and makes it the active one.
|
|
47
|
+
static VALUE sketchup_file_new(VALUE self)
|
|
48
|
+
{
|
|
49
|
+
SUModelRef model = SU_INVALID;
|
|
50
|
+
if (SUModelCreate(&model) != SU_ERROR_NONE)
|
|
51
|
+
rb_raise(rb_eRuntimeError, "cannot create a model");
|
|
53
52
|
Sketchup_set_active_model(model);
|
|
54
|
-
|
|
55
|
-
return INT2FIX(status);
|
|
56
|
-
else
|
|
57
|
-
return Qtrue;
|
|
53
|
+
return self;
|
|
58
54
|
}
|
|
59
55
|
|
|
60
|
-
static VALUE
|
|
56
|
+
static VALUE sketchup_active_model(VALUE self)
|
|
61
57
|
{
|
|
62
|
-
|
|
63
|
-
return Data_Wrap_Struct(rb_path2class(SKETCHUP_MODEL), 0, 0, active_model.ptr);
|
|
64
|
-
else
|
|
65
|
-
return Qnil;
|
|
58
|
+
return su_wrap_or_nil(cModel, active_model.ptr);
|
|
66
59
|
}
|
|
67
60
|
|
|
68
|
-
void Init_sketchup()
|
|
61
|
+
void Init_sketchup(void)
|
|
62
|
+
{
|
|
69
63
|
SUInitialize();
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
rb_define_singleton_method(Sketchup, "active_model", Sketchup_active_model, 0);
|
|
64
|
+
mSketchup = rb_define_module("Sketchup");
|
|
65
|
+
mGeom = rb_define_module("Geom");
|
|
73
66
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
#define SCRIPTUP_CREATE_CLASS(var, ns, name, parent) \
|
|
68
|
+
var = rb_define_class_under(ns, name, parent); \
|
|
69
|
+
rb_undef_alloc_func(var);
|
|
70
|
+
SCRIPTUP_CLASSES(SCRIPTUP_CREATE_CLASS)
|
|
77
71
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Material_Init(Sketchup, Sketchup_Entity);
|
|
82
|
-
DefinitionList_Init(Sketchup, Sketchup_Entity);
|
|
83
|
-
AttributeDictionary_Init(Sketchup, Sketchup_Entity);
|
|
84
|
-
AttributeDictionaries_Init(Sketchup, Sketchup_Entity);
|
|
85
|
-
Texture_Init(Sketchup, Sketchup_Entity);
|
|
86
|
-
Behavior_Init(Sketchup, Sketchup_Entity);
|
|
87
|
-
Layer_Init(Sketchup, Sketchup_Entity);
|
|
88
|
-
|
|
89
|
-
VALUE Geom = rb_define_module(GEOM);
|
|
90
|
-
BoundingBox_Init(Geom, rb_cObject);
|
|
72
|
+
rb_define_singleton_method(mSketchup, "open_file", sketchup_open_file, -1);
|
|
73
|
+
rb_define_singleton_method(mSketchup, "active_model", sketchup_active_model, 0);
|
|
74
|
+
rb_define_singleton_method(mSketchup, "file_new", sketchup_file_new, 0);
|
|
91
75
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
76
|
+
Init_arc_curve();
|
|
77
|
+
Init_attribute_dictionaries();
|
|
78
|
+
Init_attribute_dictionary();
|
|
79
|
+
Init_axes();
|
|
80
|
+
Init_behavior();
|
|
81
|
+
Init_bounding_box();
|
|
82
|
+
Init_camera();
|
|
83
|
+
Init_classifications();
|
|
84
|
+
Init_color();
|
|
85
|
+
Init_component_definition();
|
|
86
|
+
Init_component_instance();
|
|
87
|
+
Init_construction();
|
|
88
|
+
Init_curve();
|
|
89
|
+
Init_definition_list();
|
|
90
|
+
Init_drawing_element();
|
|
91
|
+
Init_entities();
|
|
92
|
+
Init_entities_builder();
|
|
93
|
+
Init_edge();
|
|
94
|
+
Init_edge_use();
|
|
95
|
+
Init_entity();
|
|
96
|
+
Init_environments();
|
|
97
|
+
Init_face();
|
|
98
|
+
Init_geom();
|
|
99
|
+
Init_group();
|
|
100
|
+
Init_image();
|
|
101
|
+
Init_image_rep();
|
|
102
|
+
Init_instance_path();
|
|
103
|
+
Init_lat_long();
|
|
104
|
+
Init_layer();
|
|
105
|
+
Init_layer_folder();
|
|
106
|
+
Init_layers();
|
|
107
|
+
Init_length();
|
|
108
|
+
Init_line_styles();
|
|
109
|
+
Init_loop();
|
|
110
|
+
Init_material();
|
|
111
|
+
Init_materials();
|
|
112
|
+
Init_model();
|
|
113
|
+
Init_options_store();
|
|
114
|
+
Init_page();
|
|
115
|
+
Init_pages();
|
|
116
|
+
Init_point2d();
|
|
117
|
+
Init_point3d();
|
|
118
|
+
Init_polygon_mesh();
|
|
119
|
+
Init_section_plane();
|
|
120
|
+
Init_styles();
|
|
121
|
+
Init_text();
|
|
122
|
+
Init_texture();
|
|
123
|
+
Init_texture_writer();
|
|
124
|
+
Init_transformation();
|
|
125
|
+
Init_transformation2d();
|
|
126
|
+
Init_uv_helper();
|
|
127
|
+
Init_vector2d();
|
|
128
|
+
Init_vector3d();
|
|
129
|
+
Init_vertex();
|
|
130
|
+
}
|
data/ext/styles.c
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#include <scriptup.h>
|
|
2
|
+
|
|
3
|
+
#define STYLES(self) SU_REF(SUStylesRef, self)
|
|
4
|
+
|
|
5
|
+
DEFINE_STRING_GETTER(style_name, SUStyleRef, SUStyleGetName)
|
|
6
|
+
DEFINE_STRING_SETTER(style_set_name, SUStyleRef, SUStyleSetName)
|
|
7
|
+
DEFINE_STRING_GETTER(style_description, SUStyleRef, SUStyleGetDescription)
|
|
8
|
+
DEFINE_STRING_SETTER(style_set_description, SUStyleRef, SUStyleSetDescription)
|
|
9
|
+
DEFINE_STRING_GETTER(style_path, SUStyleRef, SUStyleGetPath)
|
|
10
|
+
|
|
11
|
+
DEFINE_REF_LIST(styles_list, SUStylesRef, SUStylesGetNumStyles, SUStylesGetStyles, SUStyleRef, cStyle)
|
|
12
|
+
DEFINE_REF_GETTER(styles_active_style, SUStylesRef, SUStylesGetActiveStyle, SUStyleRef, cStyle)
|
|
13
|
+
DEFINE_REF_GETTER(styles_selected_style, SUStylesRef, SUStylesGetSelectedStyle, SUStyleRef, cStyle)
|
|
14
|
+
DEFINE_BOOL_GETTER(styles_active_style_changed, SUStylesRef, SUStylesGetActiveStyleChanged)
|
|
15
|
+
|
|
16
|
+
static VALUE styles_to_a(VALUE self) { return styles_list(STYLES(self)); }
|
|
17
|
+
static VALUE styles_each(VALUE self) { su_yield_each(self, styles_to_a(self)); return Qnil; }
|
|
18
|
+
|
|
19
|
+
static VALUE styles_length(VALUE self)
|
|
20
|
+
{
|
|
21
|
+
size_t count = 0;
|
|
22
|
+
SUStylesGetNumStyles(STYLES(self), &count);
|
|
23
|
+
return SIZET2NUM(count);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static VALUE styles_aref(VALUE self, VALUE key)
|
|
27
|
+
{
|
|
28
|
+
VALUE styles = styles_to_a(self);
|
|
29
|
+
if (RB_TYPE_P(key, T_STRING))
|
|
30
|
+
return su_find_by(styles, "name", key);
|
|
31
|
+
return rb_ary_entry(styles, NUM2LONG(key));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static VALUE styles_add_style(int argc, VALUE* argv, VALUE self)
|
|
35
|
+
{
|
|
36
|
+
VALUE path, select;
|
|
37
|
+
rb_scan_args(argc, argv, "11", &path, &select);
|
|
38
|
+
return BOOL2RB(SUStylesAddStyle(STYLES(self), StringValueCStr(path), RTEST(select)) == SU_ERROR_NONE);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static VALUE styles_remove_style(VALUE self, VALUE style)
|
|
42
|
+
{
|
|
43
|
+
SUStyleRef ref = {su_unwrap(style, cStyle)};
|
|
44
|
+
if (SUStylesRemoveStyle(STYLES(self), &ref) != SU_ERROR_NONE)
|
|
45
|
+
rb_raise(rb_eArgError, "cannot remove this style");
|
|
46
|
+
return Qnil;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
static VALUE styles_set_selected_style(VALUE self, VALUE style)
|
|
50
|
+
{
|
|
51
|
+
SUStylesSetSelectedStyle(STYLES(self), (SUStyleRef){su_unwrap(style, cStyle)});
|
|
52
|
+
return Qnil;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static VALUE styles_parent(VALUE self)
|
|
56
|
+
{
|
|
57
|
+
SUModelRef model = SU_INVALID;
|
|
58
|
+
SUEntityGetModel(SU_REF(SUEntityRef, self), &model);
|
|
59
|
+
return su_wrap_or_nil(cModel, model.ptr);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Model#styles
|
|
63
|
+
static VALUE model_styles(VALUE model)
|
|
64
|
+
{
|
|
65
|
+
SUStylesRef styles = SU_INVALID;
|
|
66
|
+
SUModelGetStyles(SU_REF(SUModelRef, model), &styles);
|
|
67
|
+
return su_wrap_or_nil(cStyles, styles.ptr);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
void Init_styles(void)
|
|
71
|
+
{
|
|
72
|
+
rb_define_method(cStyle, "name", style_name, 0);
|
|
73
|
+
rb_define_method(cStyle, "name=", style_set_name, 1);
|
|
74
|
+
rb_define_method(cStyle, "description", style_description, 0);
|
|
75
|
+
rb_define_method(cStyle, "description=", style_set_description, 1);
|
|
76
|
+
rb_define_method(cStyle, "path", style_path, 0);
|
|
77
|
+
rb_include_module(cStyles, rb_mEnumerable);
|
|
78
|
+
rb_define_method(cStyles, "each", styles_each, 0);
|
|
79
|
+
rb_define_method(cStyles, "[]", styles_aref, 1);
|
|
80
|
+
rb_define_method(cStyles, "count", styles_length, 0);
|
|
81
|
+
rb_define_method(cStyles, "length", styles_length, 0);
|
|
82
|
+
rb_define_method(cStyles, "size", styles_length, 0);
|
|
83
|
+
rb_define_method(cStyles, "active_style", styles_active_style, 0);
|
|
84
|
+
rb_define_method(cStyles, "active_style_changed", styles_active_style_changed, 0);
|
|
85
|
+
rb_define_method(cStyles, "selected_style", styles_selected_style, 0);
|
|
86
|
+
rb_define_method(cStyles, "selected_style=", styles_set_selected_style, 1);
|
|
87
|
+
rb_define_method(cStyles, "add_style", styles_add_style, -1);
|
|
88
|
+
rb_define_method(cStyles, "remove_style", styles_remove_style, 1);
|
|
89
|
+
rb_define_method(cStyles, "parent", styles_parent, 0);
|
|
90
|
+
rb_define_method(cModel, "styles", model_styles, 0);
|
|
91
|
+
}
|
data/ext/text.c
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
#include <scriptup.h>
|
|
2
|
+
|
|
3
|
+
#define TEXT_REF(self) SU_REF(SUTextRef, self)
|
|
4
|
+
|
|
5
|
+
DEFINE_STRING_GETTER(text_text, SUTextRef, SUTextGetString)
|
|
6
|
+
DEFINE_STRING_SETTER(text_set_text, SUTextRef, SUTextSetString)
|
|
7
|
+
DEFINE_ENUM_GETTER(text_leader_type, SUTextRef, SUTextGetLeaderType, enum SUTextLeaderType)
|
|
8
|
+
DEFINE_ENUM_GETTER(text_arrow_type, SUTextRef, SUTextGetArrowType, enum SUArrowType)
|
|
9
|
+
|
|
10
|
+
static VALUE text_set_text_bang(VALUE self, VALUE string)
|
|
11
|
+
{
|
|
12
|
+
text_set_text(self, string);
|
|
13
|
+
return self;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static VALUE text_set_leader_type(VALUE self, VALUE type)
|
|
17
|
+
{
|
|
18
|
+
int t = NUM2INT(type);
|
|
19
|
+
if (t < SUTextLeaderType_None || t > SUTextLeaderType_PushPin)
|
|
20
|
+
rb_raise(rb_eArgError, "invalid leader type");
|
|
21
|
+
SUTextSetLeaderType(TEXT_REF(self), (enum SUTextLeaderType)t);
|
|
22
|
+
return type;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static VALUE text_set_arrow_type(VALUE self, VALUE type)
|
|
26
|
+
{
|
|
27
|
+
int t = NUM2INT(type);
|
|
28
|
+
if (t < SUArrowNone || t > SUArrowOpen)
|
|
29
|
+
rb_raise(rb_eArgError, "invalid arrow type");
|
|
30
|
+
SUTextSetArrowType(TEXT_REF(self), (enum SUArrowType)t);
|
|
31
|
+
return type;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static VALUE text_has_leader_p(VALUE self)
|
|
35
|
+
{
|
|
36
|
+
enum SUTextLeaderType type = SUTextLeaderType_None;
|
|
37
|
+
SUTextGetLeaderType(TEXT_REF(self), &type);
|
|
38
|
+
return BOOL2RB(type != SUTextLeaderType_None);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static VALUE text_set_display_leader(VALUE self, VALUE display)
|
|
42
|
+
{
|
|
43
|
+
enum SUTextLeaderType type = SUTextLeaderType_None;
|
|
44
|
+
SUTextGetLeaderType(TEXT_REF(self), &type);
|
|
45
|
+
if (!RTEST(display))
|
|
46
|
+
type = SUTextLeaderType_None;
|
|
47
|
+
else if (type == SUTextLeaderType_None)
|
|
48
|
+
type = SUTextLeaderType_ViewBased;
|
|
49
|
+
SUTextSetLeaderType(TEXT_REF(self), type);
|
|
50
|
+
return display;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static VALUE text_point(VALUE self)
|
|
54
|
+
{
|
|
55
|
+
struct SUPoint3D p = {0, 0, 0};
|
|
56
|
+
SUInstancePathRef path = SU_INVALID;
|
|
57
|
+
SUTextGetPoint(TEXT_REF(self), &p, &path);
|
|
58
|
+
return su_point3d_new(p);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static VALUE text_set_point(VALUE self, VALUE point)
|
|
62
|
+
{
|
|
63
|
+
struct SUPoint3D p = su_to_point3d_like(point);
|
|
64
|
+
SUInstancePathRef none = SU_INVALID;
|
|
65
|
+
SUTextSetPoint(TEXT_REF(self), &p, none);
|
|
66
|
+
return point;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static VALUE text_attached_to(VALUE self)
|
|
70
|
+
{
|
|
71
|
+
struct SUPoint3D p = {0, 0, 0};
|
|
72
|
+
SUInstancePathRef path = SU_INVALID;
|
|
73
|
+
SUTextGetPoint(TEXT_REF(self), &p, &path);
|
|
74
|
+
if (SUIsInvalid(path))
|
|
75
|
+
return Qnil;
|
|
76
|
+
VALUE copy = su_instance_path_copy(path);
|
|
77
|
+
if (NIL_P(copy) || RTEST(rb_funcall(copy, (rb_intern)("empty?"), 0)))
|
|
78
|
+
return Qnil;
|
|
79
|
+
return rb_ary_new_from_args(2, copy, su_point3d_new(p));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static VALUE text_set_attached_to(VALUE self, VALUE attachment)
|
|
83
|
+
{
|
|
84
|
+
Check_Type(attachment, T_ARRAY);
|
|
85
|
+
if (RARRAY_LEN(attachment) != 2)
|
|
86
|
+
rb_raise(rb_eArgError, "expected [instance_path, point]");
|
|
87
|
+
SUInstancePathRef path = su_to_instance_path(RARRAY_AREF(attachment, 0));
|
|
88
|
+
struct SUPoint3D p = su_to_point3d(RARRAY_AREF(attachment, 1));
|
|
89
|
+
if (SUTextSetPoint(TEXT_REF(self), &p, path) != SU_ERROR_NONE)
|
|
90
|
+
rb_raise(rb_eArgError, "cannot attach text to this path");
|
|
91
|
+
return attachment;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static VALUE text_vector(VALUE self)
|
|
95
|
+
{
|
|
96
|
+
struct SUVector3D v = {0, 0, 0};
|
|
97
|
+
SUTextGetLeaderVector(TEXT_REF(self), &v);
|
|
98
|
+
return su_vector3d_new(v);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
static VALUE text_set_vector(VALUE self, VALUE vector)
|
|
102
|
+
{
|
|
103
|
+
struct SUVector3D v = su_to_vector3d(vector);
|
|
104
|
+
SUTextSetLeaderVector(TEXT_REF(self), &v);
|
|
105
|
+
return vector;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
void Init_text(void)
|
|
109
|
+
{
|
|
110
|
+
rb_define_const(rb_cObject, "ALeaderNone", INT2FIX(SUTextLeaderType_None));
|
|
111
|
+
rb_define_const(rb_cObject, "ALeaderView", INT2FIX(SUTextLeaderType_ViewBased));
|
|
112
|
+
rb_define_const(rb_cObject, "ALeaderModel", INT2FIX(SUTextLeaderType_PushPin));
|
|
113
|
+
static const struct { const char* name; int value; } arrows[] = {
|
|
114
|
+
{"ARROW_NONE", SUArrowNone}, {"ARROW_SLASH", SUArrowSlash}, {"ARROW_DOT", SUArrowDot},
|
|
115
|
+
{"ARROW_CLOSED", SUArrowClosed}, {"ARROW_OPEN", SUArrowOpen},
|
|
116
|
+
};
|
|
117
|
+
for (size_t i = 0; i < sizeof(arrows) / sizeof(arrows[0]); i++)
|
|
118
|
+
rb_define_const(cDimension, arrows[i].name, INT2FIX(arrows[i].value));
|
|
119
|
+
rb_define_method(cText, "text", text_text, 0);
|
|
120
|
+
rb_define_method(cText, "text=", text_set_text, 1);
|
|
121
|
+
rb_define_method(cText, "set_text", text_set_text_bang, 1);
|
|
122
|
+
rb_define_method(cText, "leader_type", text_leader_type, 0);
|
|
123
|
+
rb_define_method(cText, "leader_type=", text_set_leader_type, 1);
|
|
124
|
+
rb_define_method(cText, "arrow_type", text_arrow_type, 0);
|
|
125
|
+
rb_define_method(cText, "arrow_type=", text_set_arrow_type, 1);
|
|
126
|
+
rb_define_method(cText, "has_leader?", text_has_leader_p, 0);
|
|
127
|
+
rb_define_method(cText, "display_leader?", text_has_leader_p, 0);
|
|
128
|
+
rb_define_method(cText, "display_leader=", text_set_display_leader, 1);
|
|
129
|
+
rb_define_method(cText, "point", text_point, 0);
|
|
130
|
+
rb_define_method(cText, "point=", text_set_point, 1);
|
|
131
|
+
rb_define_method(cText, "attached_to", text_attached_to, 0);
|
|
132
|
+
rb_define_method(cText, "attached_to=", text_set_attached_to, 1);
|
|
133
|
+
rb_define_method(cText, "vector", text_vector, 0);
|
|
134
|
+
rb_define_method(cText, "vector=", text_set_vector, 1);
|
|
135
|
+
}
|
data/ext/texture.c
CHANGED
|
@@ -1,109 +1,100 @@
|
|
|
1
|
-
#include <
|
|
2
|
-
#include <texture.h>
|
|
3
|
-
#include <SketchUpAPI/sketchup.h>
|
|
4
|
-
#include <not_implemented.h>
|
|
5
|
-
#include <utils.h>
|
|
1
|
+
#include <scriptup.h>
|
|
6
2
|
|
|
7
|
-
|
|
3
|
+
struct texture_dimensions
|
|
8
4
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return Qnil;
|
|
15
|
-
return c;
|
|
16
|
-
}
|
|
5
|
+
size_t width;
|
|
6
|
+
size_t height;
|
|
7
|
+
double s_scale;
|
|
8
|
+
double t_scale;
|
|
9
|
+
};
|
|
17
10
|
|
|
18
|
-
static
|
|
11
|
+
static struct texture_dimensions texture_dimensions(VALUE self)
|
|
19
12
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return output;
|
|
13
|
+
struct texture_dimensions d = {0, 0, 0.0, 0.0};
|
|
14
|
+
SUTextureGetDimensions(SU_REF(SUTextureRef, self), &d.width, &d.height, &d.s_scale, &d.t_scale);
|
|
15
|
+
return d;
|
|
24
16
|
}
|
|
25
17
|
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
SUTextureRef texture = {DATA_PTR(self)};
|
|
29
|
-
size_t width = 0;
|
|
30
|
-
size_t height = 0;
|
|
31
|
-
double s_scale = 0.0;
|
|
32
|
-
double t_scale = 0.0;
|
|
33
|
-
SUTextureGetDimensions(texture, &width, &height, &s_scale, &t_scale);
|
|
34
|
-
return ULL2NUM(height);
|
|
35
|
-
}
|
|
18
|
+
DEFINE_STRING_GETTER(texture_filename, SUTextureRef, SUTextureGetFileName)
|
|
36
19
|
|
|
37
|
-
|
|
20
|
+
// The caller owns the image rep, so it is released when the Ruby object is collected.
|
|
21
|
+
static VALUE texture_image_rep(int argc, VALUE* argv, VALUE self)
|
|
38
22
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
VALUE colorized;
|
|
24
|
+
rb_scan_args(argc, argv, "01", &colorized);
|
|
25
|
+
SUImageRepRef image = SU_INVALID;
|
|
26
|
+
SUImageRepCreate(&image);
|
|
27
|
+
SUTextureRef texture = SU_REF(SUTextureRef, self);
|
|
28
|
+
enum SUResult result = RTEST(colorized) ? SUTextureGetColorizedImageRep(texture, &image) : SUTextureGetImageRep(texture, &image);
|
|
29
|
+
if (result != SU_ERROR_NONE)
|
|
30
|
+
{
|
|
31
|
+
SUImageRepRelease(&image);
|
|
32
|
+
return Qnil;
|
|
33
|
+
}
|
|
34
|
+
return su_image_rep_new(image);
|
|
46
35
|
}
|
|
47
36
|
|
|
48
|
-
static VALUE
|
|
37
|
+
static VALUE texture_average_color(VALUE self)
|
|
49
38
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
double t_scale = 0.0;
|
|
55
|
-
SUTextureGetDimensions(texture, &width, &height, &s_scale, &t_scale);
|
|
56
|
-
return DBL2NUM(1.0 / s_scale);
|
|
39
|
+
SUColor color = {0, 0, 0, 255};
|
|
40
|
+
if (SUTextureGetAverageColor(SU_REF(SUTextureRef, self), &color) != SU_ERROR_NONE)
|
|
41
|
+
return Qnil;
|
|
42
|
+
return su_color_new(color);
|
|
57
43
|
}
|
|
58
44
|
|
|
59
|
-
static VALUE
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
size_t height = 0;
|
|
64
|
-
double s_scale = 0.0;
|
|
65
|
-
double t_scale = 0.0;
|
|
66
|
-
SUTextureGetDimensions(texture, &width, &height, &s_scale, &t_scale);
|
|
67
|
-
return ULL2NUM(width);
|
|
68
|
-
}
|
|
45
|
+
static VALUE texture_image_width(VALUE self) { return SIZET2NUM(texture_dimensions(self).width); }
|
|
46
|
+
static VALUE texture_image_height(VALUE self) { return SIZET2NUM(texture_dimensions(self).height); }
|
|
47
|
+
static VALUE texture_width(VALUE self) { return DBL2NUM(1.0 / texture_dimensions(self).s_scale); }
|
|
48
|
+
static VALUE texture_height(VALUE self) { return DBL2NUM(1.0 / texture_dimensions(self).t_scale); }
|
|
69
49
|
|
|
70
|
-
static VALUE
|
|
50
|
+
static VALUE texture_valid_p(VALUE self)
|
|
71
51
|
{
|
|
72
|
-
|
|
73
|
-
SUImageRepRef image = SU_INVALID;
|
|
74
|
-
SUTextureGetImageRep(texture, &image);
|
|
75
|
-
return Data_Wrap_Struct(rb_path2class(SKETCHUP_IMAGEREP), 0, 0, image.ptr);
|
|
52
|
+
return BOOL2RB(DATA_PTR(self) != NULL);
|
|
76
53
|
}
|
|
77
54
|
|
|
78
|
-
static VALUE
|
|
55
|
+
static VALUE texture_write(VALUE self, VALUE path, VALUE colorize)
|
|
79
56
|
{
|
|
80
|
-
SUTextureRef texture =
|
|
81
|
-
|
|
57
|
+
SUTextureRef texture = SU_REF(SUTextureRef, self);
|
|
58
|
+
const char* file = StringValueCStr(path);
|
|
59
|
+
enum SUResult result = RTEST(colorize) ? SUTextureWriteToFile(texture, file) : SUTextureWriteOriginalToFile(texture, file);
|
|
60
|
+
return BOOL2RB(result == SU_ERROR_NONE);
|
|
82
61
|
}
|
|
83
62
|
|
|
84
|
-
|
|
63
|
+
// A single size keeps the image's aspect ratio; [width, height] sets both (in inches).
|
|
64
|
+
static VALUE texture_set_size(VALUE self, VALUE size)
|
|
85
65
|
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (
|
|
90
|
-
|
|
66
|
+
struct texture_dimensions d = texture_dimensions(self);
|
|
67
|
+
double width;
|
|
68
|
+
double height;
|
|
69
|
+
if (RB_TYPE_P(size, T_ARRAY))
|
|
70
|
+
{
|
|
71
|
+
double wh[2];
|
|
72
|
+
su_array_to_xy(size, wh);
|
|
73
|
+
width = wh[0];
|
|
74
|
+
height = wh[1];
|
|
75
|
+
}
|
|
91
76
|
else
|
|
92
|
-
|
|
93
|
-
|
|
77
|
+
{
|
|
78
|
+
width = NUM2DBL(size);
|
|
79
|
+
height = d.width > 0 ? width * (double)d.height / (double)d.width : width;
|
|
80
|
+
}
|
|
81
|
+
if (width <= 0 || height <= 0)
|
|
82
|
+
rb_raise(rb_eArgError, "texture size must be positive");
|
|
83
|
+
// Set takes the size in inches while Get reports its reciprocal as the scale.
|
|
84
|
+
SUTextureSetDimensions(SU_REF(SUTextureRef, self), width, height);
|
|
85
|
+
return size;
|
|
94
86
|
}
|
|
95
87
|
|
|
96
|
-
void
|
|
88
|
+
void Init_texture(void)
|
|
97
89
|
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
rb_define_method(
|
|
101
|
-
rb_define_method(
|
|
102
|
-
rb_define_method(
|
|
103
|
-
rb_define_method(
|
|
104
|
-
rb_define_method(
|
|
105
|
-
rb_define_method(
|
|
106
|
-
rb_define_method(
|
|
107
|
-
rb_define_method(
|
|
108
|
-
rb_define_method(Sketchup_Texture, "write", Sketchup_Texture_write, 2);
|
|
90
|
+
rb_define_method(cTexture, "size=", texture_set_size, 1);
|
|
91
|
+
rb_define_method(cTexture, "average_color", texture_average_color, 0);
|
|
92
|
+
rb_define_method(cTexture, "filename", texture_filename, 0);
|
|
93
|
+
rb_define_method(cTexture, "image_height", texture_image_height, 0);
|
|
94
|
+
rb_define_method(cTexture, "height", texture_height, 0);
|
|
95
|
+
rb_define_method(cTexture, "image_width", texture_image_width, 0);
|
|
96
|
+
rb_define_method(cTexture, "width", texture_width, 0);
|
|
97
|
+
rb_define_method(cTexture, "image_rep", texture_image_rep, -1);
|
|
98
|
+
rb_define_method(cTexture, "valid?", texture_valid_p, 0);
|
|
99
|
+
rb_define_method(cTexture, "write", texture_write, 2);
|
|
109
100
|
}
|