sketchup-api-stubs 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/SketchUp/Geom/BoundingBox.rb +335 -0
  3. data/SketchUp/Geom/LatLong.rb +123 -0
  4. data/SketchUp/Geom/Point3d.rb +643 -0
  5. data/SketchUp/Geom/PolygonMesh.rb +478 -0
  6. data/SketchUp/Geom/Transformation.rb +476 -0
  7. data/SketchUp/Geom/UTM.rb +135 -0
  8. data/SketchUp/Geom/Vector3d.rb +684 -0
  9. data/SketchUp/Sketchup/Animation.rb +137 -0
  10. data/SketchUp/Sketchup/AppObserver.rb +157 -0
  11. data/SketchUp/Sketchup/ArcCurve.rb +209 -0
  12. data/SketchUp/Sketchup/AttributeDictionaries.rb +146 -0
  13. data/SketchUp/Sketchup/AttributeDictionary.rb +280 -0
  14. data/SketchUp/Sketchup/Axes.rb +149 -0
  15. data/SketchUp/Sketchup/Behavior.rb +338 -0
  16. data/SketchUp/Sketchup/Camera.rb +594 -0
  17. data/SketchUp/Sketchup/ClassificationSchema.rb +63 -0
  18. data/SketchUp/Sketchup/Classifications.rb +118 -0
  19. data/SketchUp/Sketchup/Color.rb +291 -0
  20. data/SketchUp/Sketchup/ComponentDefinition.rb +562 -0
  21. data/SketchUp/Sketchup/ComponentInstance.rb +597 -0
  22. data/SketchUp/Sketchup/Console.rb +78 -0
  23. data/SketchUp/Sketchup/ConstructionLine.rb +257 -0
  24. data/SketchUp/Sketchup/ConstructionPoint.rb +32 -0
  25. data/SketchUp/Sketchup/Curve.rb +196 -0
  26. data/SketchUp/Sketchup/DefinitionList.rb +312 -0
  27. data/SketchUp/Sketchup/DefinitionObserver.rb +73 -0
  28. data/SketchUp/Sketchup/DefinitionsObserver.rb +102 -0
  29. data/SketchUp/Sketchup/Dimension.rb +167 -0
  30. data/SketchUp/Sketchup/DimensionLinear.rb +232 -0
  31. data/SketchUp/Sketchup/DimensionObserver.rb +38 -0
  32. data/SketchUp/Sketchup/DimensionRadial.rb +87 -0
  33. data/SketchUp/Sketchup/Drawingelement.rb +400 -0
  34. data/SketchUp/Sketchup/Edge.rb +517 -0
  35. data/SketchUp/Sketchup/EdgeUse.rb +213 -0
  36. data/SketchUp/Sketchup/Entities.rb +1011 -0
  37. data/SketchUp/Sketchup/EntitiesObserver.rb +125 -0
  38. data/SketchUp/Sketchup/Entity.rb +522 -0
  39. data/SketchUp/Sketchup/EntityObserver.rb +59 -0
  40. data/SketchUp/Sketchup/ExtensionsManager.rb +129 -0
  41. data/SketchUp/Sketchup/Face.rb +737 -0
  42. data/SketchUp/Sketchup/FrameChangeObserver.rb +104 -0
  43. data/SketchUp/Sketchup/Group.rb +705 -0
  44. data/SketchUp/Sketchup/Http.rb +27 -0
  45. data/SketchUp/Sketchup/Http/Request.rb +285 -0
  46. data/SketchUp/Sketchup/Http/Response.rb +62 -0
  47. data/SketchUp/Sketchup/Image.rb +393 -0
  48. data/SketchUp/Sketchup/Importer.rb +192 -0
  49. data/SketchUp/Sketchup/InputPoint.rb +393 -0
  50. data/SketchUp/Sketchup/InstanceObserver.rb +82 -0
  51. data/SketchUp/Sketchup/InstancePath.rb +297 -0
  52. data/SketchUp/Sketchup/Layer.rb +240 -0
  53. data/SketchUp/Sketchup/Layers.rb +235 -0
  54. data/SketchUp/Sketchup/LayersObserver.rb +136 -0
  55. data/SketchUp/Sketchup/Licensing.rb +47 -0
  56. data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +88 -0
  57. data/SketchUp/Sketchup/Loop.rb +141 -0
  58. data/SketchUp/Sketchup/Material.rb +384 -0
  59. data/SketchUp/Sketchup/Materials.rb +283 -0
  60. data/SketchUp/Sketchup/MaterialsObserver.rb +141 -0
  61. data/SketchUp/Sketchup/Menu.rb +97 -0
  62. data/SketchUp/Sketchup/Model.rb +1459 -0
  63. data/SketchUp/Sketchup/ModelObserver.rb +356 -0
  64. data/SketchUp/Sketchup/OptionsManager.rb +135 -0
  65. data/SketchUp/Sketchup/OptionsProvider.rb +277 -0
  66. data/SketchUp/Sketchup/OptionsProviderObserver.rb +58 -0
  67. data/SketchUp/Sketchup/Page.rb +636 -0
  68. data/SketchUp/Sketchup/Pages.rb +349 -0
  69. data/SketchUp/Sketchup/PagesObserver.rb +76 -0
  70. data/SketchUp/Sketchup/PickHelper.rb +457 -0
  71. data/SketchUp/Sketchup/RegionalSettings.rb +43 -0
  72. data/SketchUp/Sketchup/RenderingOptions.rb +337 -0
  73. data/SketchUp/Sketchup/RenderingOptionsObserver.rb +44 -0
  74. data/SketchUp/Sketchup/SectionPlane.rb +88 -0
  75. data/SketchUp/Sketchup/Selection.rb +470 -0
  76. data/SketchUp/Sketchup/SelectionObserver.rb +115 -0
  77. data/SketchUp/Sketchup/Set.rb +253 -0
  78. data/SketchUp/Sketchup/ShadowInfo.rb +257 -0
  79. data/SketchUp/Sketchup/ShadowInfoObserver.rb +57 -0
  80. data/SketchUp/Sketchup/Style.rb +77 -0
  81. data/SketchUp/Sketchup/Styles.rb +204 -0
  82. data/SketchUp/Sketchup/Text.rb +241 -0
  83. data/SketchUp/Sketchup/Texture.rb +211 -0
  84. data/SketchUp/Sketchup/TextureWriter.rb +237 -0
  85. data/SketchUp/Sketchup/Tool.rb +808 -0
  86. data/SketchUp/Sketchup/Tools.rb +120 -0
  87. data/SketchUp/Sketchup/ToolsObserver.rb +154 -0
  88. data/SketchUp/Sketchup/UVHelper.rb +61 -0
  89. data/SketchUp/Sketchup/Vertex.rb +143 -0
  90. data/SketchUp/Sketchup/View.rb +965 -0
  91. data/SketchUp/Sketchup/ViewObserver.rb +40 -0
  92. data/SketchUp/UI/Command.rb +307 -0
  93. data/SketchUp/UI/HtmlDialog.rb +346 -0
  94. data/SketchUp/UI/Notification.rb +229 -0
  95. data/SketchUp/UI/Toolbar.rb +243 -0
  96. data/SketchUp/UI/WebDialog.rb +623 -0
  97. data/SketchUp/_top_level.rb +193 -0
  98. data/SketchUp/array.rb +593 -0
  99. data/SketchUp/geom.rb +231 -0
  100. data/SketchUp/languagehandler.rb +92 -0
  101. data/SketchUp/length.rb +210 -0
  102. data/SketchUp/numeric.rb +249 -0
  103. data/SketchUp/sketchup.rb +1290 -0
  104. data/SketchUp/sketchupextension.rb +355 -0
  105. data/SketchUp/string.rb +24 -0
  106. data/SketchUp/ui.rb +637 -0
  107. metadata +176 -0
@@ -0,0 +1,27 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The {Sketchup::Http} module provides interfaces to create asynchronous HTTP
5
+ # requests. This is an alternative to the Net::Http module that comes with
6
+ # Ruby StdLib - which is known to have issues within SketchUp.
7
+ #
8
+ # @version SketchUp 2017
9
+ module Sketchup::Http
10
+
11
+ # Constants
12
+
13
+ DELETE = nil # Stub value.
14
+ GET = nil # Stub value.
15
+ HEAD = nil # Stub value.
16
+ OPTIONS = nil # Stub value.
17
+ PATCH = nil # Stub value.
18
+ POST = nil # Stub value.
19
+ PUT = nil # Stub value.
20
+
21
+ STATUS_CANCELED = nil # Stub value.
22
+ STATUS_FAILED = nil # Stub value.
23
+ STATUS_PENDING = nil # Stub value.
24
+ STATUS_SUCCESS = nil # Stub value.
25
+ STATUS_UNKNOWN = nil # Stub value.
26
+
27
+ end
@@ -0,0 +1,285 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # Http::Request objects allows you to send HTTP request to HTTP servers.
5
+ #
6
+ # @version SketchUp 2017
7
+ class Sketchup::Http::Request
8
+
9
+ # Instance Methods
10
+
11
+ # Gets the http body that is going to be used when sending the request.
12
+ #
13
+ # @example
14
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
15
+ #
16
+ # request.start do |request, response|
17
+ # puts "body: #{request.body}"
18
+ # end
19
+ #
20
+ # @return [String]
21
+ #
22
+ # @version SketchUp 2017
23
+ def body
24
+ end
25
+
26
+ # Sets the http body that is going to be used when sending the request.
27
+ #
28
+ # @example
29
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
30
+ # request.body = "Hello World"
31
+ #
32
+ # request.start do |request, response|
33
+ # puts "body: #{request.body}"
34
+ # end
35
+ #
36
+ # @param [String] body
37
+ # A String containing the body.
38
+ #
39
+ # @return [String]
40
+ #
41
+ # @version SketchUp 2017
42
+ def body=(body)
43
+ end
44
+
45
+ # Cancels the request.
46
+ #
47
+ # @example
48
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
49
+ # request.start do |request, response|
50
+ # puts "body: #{response.body}"
51
+ # end
52
+ #
53
+ # request.cancel
54
+ #
55
+ # @return [true]
56
+ #
57
+ # @version SketchUp 2017
58
+ def cancel
59
+ end
60
+
61
+ # Returns the http headers that are going to be used when sending the request.
62
+ #
63
+ # @example
64
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
65
+ # request.headers = { :key1 => "value1", :key2 => "value2" }
66
+ #
67
+ # request.headers.each do |key, value|
68
+ # puts "#{key}: #{value}"
69
+ # end
70
+ #
71
+ # @return [Hash]
72
+ #
73
+ # @version SketchUp 2017
74
+ def headers
75
+ end
76
+
77
+ # Sets the http headers that are going to be used when sending the request.
78
+ #
79
+ # @example
80
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
81
+ # request.headers = { :key1 => "value1", :key2 => "value2" }
82
+ #
83
+ # request.headers.each do |key, value|
84
+ # puts "#{key}: #{value}"
85
+ # end
86
+ #
87
+ # @param [Hash] headers
88
+ # A key/value pair hash.
89
+ #
90
+ # @return [Boolean]
91
+ #
92
+ # @version SketchUp 2017
93
+ def headers=(headers)
94
+ end
95
+
96
+ # The new method is used to create a new Sketchup::Http::Request.
97
+ #
98
+ # The default port is 80, to use a different port define it in the URL when
99
+ # creating a new Http::Request
100
+ #
101
+ # Keeping a reference to the request is necessary in order to ensure the use of
102
+ # the response.
103
+ #
104
+ # The +method+ parameter accepts any custom http method or one of the
105
+ # following:
106
+ # * +Sketchup::Http::GET+
107
+ # * +Sketchup::Http::POST+
108
+ # * +Sketchup::Http::PUT+
109
+ # * +Sketchup::Http::DELETE+
110
+ # * +Sketchup::Http::HEAD+
111
+ # * +Sketchup::Http::OPTIONS+
112
+ #
113
+ # @example
114
+ # request = Sketchup::Http::Request.new("http://localhost:8080", Sketchup::Http::GET)
115
+ #
116
+ # request.start do |request, response|
117
+ # puts "body: #{response.body}"
118
+ # end
119
+ #
120
+ # @param [String] url
121
+ # The targetted URL.
122
+ #
123
+ # @param [String] method
124
+ # Optionally, the request method to use, the
125
+ # default is Sketchup::Http::GET
126
+ #
127
+ # @return [Request]
128
+ #
129
+ # @version SketchUp 2017
130
+ def initialize(url, method)
131
+ end
132
+
133
+ # Returns the http method that is going to be used when sending the request.
134
+ #
135
+ # @example
136
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
137
+ #
138
+ # request.start do |request, response|
139
+ # puts "request.method: #{request.method}"
140
+ # end
141
+ #
142
+ # @return [String]
143
+ #
144
+ # @version SketchUp 2017
145
+ def method
146
+ end
147
+
148
+ # Sets the http method that is going to be used when sending the request.
149
+ # The value can be any custom http method or one of the following:
150
+ # * +Sketchup::Http::GET+
151
+ # * +Sketchup::Http::POST+
152
+ # * +Sketchup::Http::PUT+
153
+ # * +Sketchup::Http::DELETE+
154
+ # * +Sketchup::Http::HEAD+
155
+ # * +Sketchup::Http::OPTIONS+
156
+ #
157
+ # @example
158
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
159
+ # request.method = Sketchup::Http::POST
160
+ #
161
+ # request.start do |request, response|
162
+ # puts "request.method: #{request.method}"
163
+ # end
164
+ #
165
+ # @param [String] method
166
+ # A string containing the http method name.
167
+ #
168
+ # @return [Boolean]
169
+ #
170
+ # @version SketchUp 2017
171
+ def method=(method)
172
+ end
173
+
174
+ # Adds a download progress callback block that will get called everytime we
175
+ # have received data from the server until the download finishes.
176
+ #
177
+ # @example
178
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
179
+ #
180
+ # request.set_download_progress_callback do |current, total|
181
+ # puts "download current: #{current}"
182
+ # puts "download total: #{total}"
183
+ # end
184
+ #
185
+ # request.start
186
+ #
187
+ # @return [Boolean]
188
+ #
189
+ # @version SketchUp 2017
190
+ #
191
+ # @yield A block to be invoked everytime data is downloaded from the server.
192
+ #
193
+ # @yieldparam [Integer] current
194
+ # Current bytes transferred.
195
+ #
196
+ # @yieldparam [Integer] total
197
+ # Total bytes to transfer.
198
+ def set_download_progress_callback
199
+ end
200
+
201
+ # Adds a upload progress callback block that will get called everytime we have
202
+ # uploaded data to the server until the upload finishes.
203
+ #
204
+ # @example
205
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
206
+ #
207
+ # request.set_upload_progress_callback do |current, total|
208
+ # puts "upload current: #{current}"
209
+ # puts "upload total: #{total}"
210
+ # end
211
+ #
212
+ # request.start
213
+ #
214
+ # @return [Boolean]
215
+ #
216
+ # @version SketchUp 2017
217
+ #
218
+ # @yield A block to be invoked everytime data is sent to the server.
219
+ #
220
+ # @yieldparam [Integer] current
221
+ # Current bytes transferred.
222
+ #
223
+ # @yieldparam [Integer] total
224
+ # Total bytes to transfer.
225
+ def set_upload_progress_callback
226
+ end
227
+
228
+ # Starts the request and optionally add a callback block.
229
+ #
230
+ # @example
231
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
232
+ #
233
+ # request.start do |request, response|
234
+ # puts "body: #{response.body}"
235
+ # end
236
+ #
237
+ # @return [Boolean]
238
+ #
239
+ # @version SketchUp 2017
240
+ #
241
+ # @yield A block that is invoked when the request has finished.
242
+ #
243
+ # @yieldparam [FileUploadRequest] request
244
+ # The FileUploadRequest object.
245
+ #
246
+ # @yieldparam [Response] response
247
+ # The response object, use this to read the
248
+ # server response.
249
+ def start
250
+ end
251
+
252
+ # Returns the internal status code. It can be one of the following:
253
+ # * +Sketchup::Http::STATUS_UNKNOWN+
254
+ # * +Sketchup::Http::STATUS_SUCCESS+
255
+ # * +Sketchup::Http::STATUS_PENDING+
256
+ # * +Sketchup::Http::STATUS_CANCELED+
257
+ # * +Sketchup::Http::STATUS_FAILED+
258
+ #
259
+ # @example
260
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
261
+ # request.start
262
+ # puts "response.status: #{request.status}"
263
+ #
264
+ # @return [int]
265
+ #
266
+ # @version SketchUp 2017
267
+ def status
268
+ end
269
+
270
+ # Returns a copy of the Request's URL.
271
+ #
272
+ # @example
273
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
274
+ #
275
+ # request.start do |request, response|
276
+ # puts "url: #{request.url}"
277
+ # end
278
+ #
279
+ # @return [String]
280
+ #
281
+ # @version SketchUp 2017
282
+ def url
283
+ end
284
+
285
+ end
@@ -0,0 +1,62 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # Http::Response objects allows you to get the response information from the
5
+ # server, you can only receive the Http::Response if you have attached a
6
+ # callback block when calling start from the Http::Request object.
7
+ #
8
+ # @version SketchUp 2017
9
+ class Sketchup::Http::Response
10
+
11
+ # Instance Methods
12
+
13
+ # Gets the http body that was received from the server as a string encoded
14
+ # using the charset provided in the Content-Type of the server response, if
15
+ # no charset is specified, ASCII-8BIT will be used.
16
+ #
17
+ # @example
18
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
19
+ #
20
+ # request.start do |request, response|
21
+ # puts "body: " + response.body
22
+ # end
23
+ #
24
+ # @return [String]
25
+ #
26
+ # @version SketchUp 2017
27
+ def body
28
+ end
29
+
30
+ # Returns the http headers that were sent by the server.
31
+ #
32
+ # @example
33
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
34
+ #
35
+ # request.start do |request, response|
36
+ # response.headers.each do |key, value|
37
+ # puts "#{key}: #{value}"
38
+ # end
39
+ # end
40
+ #
41
+ # @return [Hash]
42
+ #
43
+ # @version SketchUp 2017
44
+ def headers
45
+ end
46
+
47
+ # Returns the HTTP response status code as defined in rfc2616.
48
+ #
49
+ # @example
50
+ # request = Sketchup::Http::Request.new("http://localhost:8080")
51
+ #
52
+ # request.start do |request, response|
53
+ # puts "http status code: #{response.status_code}"
54
+ # end
55
+ #
56
+ # @return [int]
57
+ #
58
+ # @version SketchUp 2017
59
+ def status_code
60
+ end
61
+
62
+ end
@@ -0,0 +1,393 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # An Image object represents a raster image placed in the Model.
5
+ #
6
+ # @version SketchUp 6.0
7
+ class Sketchup::Image < Sketchup::Drawingelement
8
+
9
+ # Instance Methods
10
+
11
+ # The explode method is used to explode an image into a face with a texture
12
+ # on it.
13
+ #
14
+ # Note that current versions of SketchUp will return an empty array here.
15
+ # To work around this limitation you can iterate over your entities collection
16
+ # to determine which new entities were created.
17
+ #
18
+ # Versions prior to SketchUp 2015 returned an empty array due to a bug.
19
+ #
20
+ # @example
21
+ # model = Sketchup.active_model
22
+ # path = "Plugins/su_dynamiccomponents/images"
23
+ # image_file = Sketchup.find_support_file("report_tool.png", path)
24
+ # image = model.active_entities.add_image(image_file, ORIGIN, 300)
25
+ # entities = image.explode
26
+ #
27
+ # @return entitiesarray - an Array object of entities if
28
+ # successful
29
+ #
30
+ # @version SketchUp 6.0
31
+ def explode
32
+ end
33
+
34
+ # The height method is used to retrieve the height of the image.
35
+ #
36
+ # The height is given in inches.
37
+ #
38
+ # @example
39
+ # model = Sketchup.active_model
40
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
41
+ # pt = Geom::Point3d.new
42
+ # entities = model.active_entities
43
+ # image = entities.add_image path, pt, 300
44
+ # height = image.height
45
+ # if (height)
46
+ # UI.messagebox height
47
+ # else
48
+ # UI.messagebox "Failure"
49
+ # end
50
+ #
51
+ # @return height - the height of the model if successful
52
+ #
53
+ # @version SketchUp 6.0
54
+ def height
55
+ end
56
+
57
+ # The height= method is used to set the height of the image.
58
+ #
59
+ # The height is set in inches.
60
+ #
61
+ # @example
62
+ # model = Sketchup.active_model
63
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
64
+ # pt = Geom::Point3d.new
65
+ # entities = model.active_entities
66
+ # image = entities.add_image path, pt, 300
67
+ # UI.messagebox "Before adjustment"
68
+ # height = image.height = 400
69
+ # if (height)
70
+ # UI.messagebox height
71
+ # else
72
+ # UI.messagebox "Failure"
73
+ # end
74
+ #
75
+ # @param height
76
+ # The height, in inches, to set the image.
77
+ #
78
+ # @return height - the new height if successful
79
+ #
80
+ # @version SketchUp 6.0
81
+ def height=(height)
82
+ end
83
+
84
+ # The normal method is used to retrieve the 3D Vector that is perpendicular to
85
+ # the plane of the image.
86
+ #
87
+ # @example
88
+ # model = Sketchup.active_model
89
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
90
+ # pt = Geom::Point3d.new
91
+ # entities = model.active_entities
92
+ # image = entities.add_image path, pt, 300
93
+ # vector = image.normal
94
+ # if (vector)
95
+ # UI.messagebox vector
96
+ # else
97
+ # UI.messagebox "Failure"
98
+ # end
99
+ #
100
+ # @return vector - a Vector3d object if successful
101
+ #
102
+ # @version SketchUp 6.0
103
+ def normal
104
+ end
105
+
106
+ # The origin method is used to retrieve the 3D point that defines the origin
107
+ # of the image.
108
+ #
109
+ # @example
110
+ # model = Sketchup.active_model
111
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
112
+ # pt = Geom::Point3d.new
113
+ # entities = model.active_entities
114
+ # image = entities.add_image path, pt, 300
115
+ # origin = image.origin
116
+ # if (origin)
117
+ # UI.messagebox origin
118
+ # else
119
+ # UI.messagebox "Failure"
120
+ # end
121
+ #
122
+ # @return point - a Point3d object containing the origin location
123
+ # if successful
124
+ #
125
+ # @version SketchUp 6.0
126
+ def origin
127
+ end
128
+
129
+ # The origin= method is used to set the 3D point as the origin of the image.
130
+ #
131
+ # @example
132
+ # model = Sketchup.active_model
133
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
134
+ # pt = Geom::Point3d.new
135
+ # pt2 = Geom::Point3d.new 100,100,100
136
+ # entities = model.active_entities
137
+ # image = entities.add_image path, pt, 300
138
+ # UI.messagebox "Before Move"
139
+ # origin = image.origin=pt2
140
+ # if (origin)
141
+ # UI.messagebox origin
142
+ # else
143
+ # UI.messagebox "Failure"
144
+ # end
145
+ #
146
+ # @param point
147
+ # A Point3d object with the new origin.
148
+ #
149
+ # @return point - the Point3d object representing the newly
150
+ # established origin if successful
151
+ #
152
+ # @version SketchUp 6.0
153
+ def origin=(point)
154
+ end
155
+
156
+ # The path method is used to retrieve the path of the file defining the image.
157
+ #
158
+ # @example
159
+ # model = Sketchup.active_model
160
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
161
+ # pt = Geom::Point3d.new
162
+ # entities = model.active_entities
163
+ # image = entities.add_image path, pt, 300
164
+ # path = image.path
165
+ # if (path)
166
+ # UI.messagebox path
167
+ # else
168
+ # UI.messagebox "Failure"
169
+ # end
170
+ #
171
+ # @return path - the path for the image file if successful
172
+ #
173
+ # @version SketchUp 6.0
174
+ def path
175
+ end
176
+
177
+ # The pixelheight method is used to retrieve the height of the image file in
178
+ # pixels.
179
+ #
180
+ # @example
181
+ # model = Sketchup.active_model
182
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
183
+ # pt = Geom::Point3d.new
184
+ # entities = model.active_entities
185
+ # image = entities.add_image path, pt, 300
186
+ # pixelheight = image.pixelheight
187
+ # if (pixelheight)
188
+ # UI.messagebox pixelheight
189
+ # else
190
+ # UI.messagebox "Failure"
191
+ # end
192
+ #
193
+ # @return height - the height of the image in pixels if
194
+ # successful
195
+ #
196
+ # @version SketchUp 6.0
197
+ def pixelheight
198
+ end
199
+
200
+ # The pixelwidth method is used to retrieve the width of the image file in
201
+ # pixels.
202
+ #
203
+ # @example
204
+ # model = Sketchup.active_model
205
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
206
+ # pt = Geom::Point3d.new
207
+ # entities = model.active_entities
208
+ # image = entities.add_image path, pt, 300
209
+ # pixelwidth = image.pixelwidth
210
+ # if (pixelwidth)
211
+ # UI.messagebox pixelwidth
212
+ # else
213
+ # UI.messagebox "Failure"
214
+ # end
215
+ #
216
+ # @return width - the width of the image in pixels if successful
217
+ #
218
+ # @version SketchUp 6.0
219
+ def pixelwidth
220
+ end
221
+
222
+ # The size= method is used to set the width and height of the image, in inches.
223
+ #
224
+ # @example
225
+ # model = Sketchup.active_model
226
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
227
+ # pt = Geom::Point3d.new
228
+ # entities = model.active_entities
229
+ # image = entities.add_image path, pt, 300
230
+ # UI.messagebox "Before Resize"
231
+ # size = image.size= 500,500
232
+ # if (size)
233
+ # UI.messagebox size
234
+ # else
235
+ # UI.messagebox "Failure"
236
+ # end
237
+ #
238
+ # @param width
239
+ # The width of the image.
240
+ #
241
+ # @param height
242
+ # The height of the image.
243
+ #
244
+ # @return size - the new width and height of the image if
245
+ # successful
246
+ #
247
+ # @version SketchUp 6.0
248
+ def size=(width, height)
249
+ end
250
+
251
+ # The transform! method is used to apply a transformation to the image.
252
+ #
253
+ # @example
254
+ # model = Sketchup.active_model
255
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
256
+ # point = Geom::Point3d.new 100,100,100
257
+ # t = Geom::Transformation.new point
258
+ # pt = Geom::Point3d.new
259
+ # entities = model.active_entities
260
+ # image = entities.add_image path, pt, 300
261
+ # UI.messagebox "Before Move"
262
+ # image = image.transform! t
263
+ # if (image)
264
+ # UI.messagebox image
265
+ # else
266
+ # UI.messagebox "Failure"
267
+ # end
268
+ #
269
+ # @param transform
270
+ # A Transformation object.
271
+ #
272
+ # @return image - the transformed Image object if successful
273
+ #
274
+ # @version SketchUp 6.0
275
+ def transform!(transform)
276
+ end
277
+
278
+ # The transformation method is used to retrieve the transformation for the
279
+ # image.
280
+ #
281
+ # @example
282
+ # # Add an image to the model.
283
+ # model = Sketchup.active_model
284
+ # entities = model.active_entities
285
+ # path = Sketchup.find_support_file('report_tool.png', 'Plugins/su_dynamiccomponents/images')
286
+ # point = Geom::Point3d.new(100,100,100)
287
+ # image = entities.add_image(path, point, 300)
288
+ #
289
+ # trans = image.transformation
290
+ #
291
+ # @return transformation - a Transformation object if successful
292
+ #
293
+ # @version SketchUp 2014
294
+ def transformation
295
+ end
296
+
297
+ # The transformation= method is used to set the transformation for the
298
+ # image.
299
+ #
300
+ # @example
301
+ # # Add an image to the model.
302
+ # model = Sketchup.active_model
303
+ # entities = model.active_entities
304
+ # path = Sketchup.find_support_file('report_tool.png', 'Plugins/su_dynamiccomponents/images')
305
+ # point = Geom::Point3d.new(100,100,100)
306
+ # image = entities.add_image(path, point, 300)
307
+ #
308
+ # new_transform = Geom::Transformation.new([100,0,0])
309
+ # image.transformation = new_transform
310
+ #
311
+ # @param transform
312
+ # The Transformation object to apply
313
+ #
314
+ # @return image - the newly transformed image
315
+ #
316
+ # @version SketchUp 2014
317
+ def transformation=(transform)
318
+ end
319
+
320
+ # The width method is used to retrieve the width of the image.
321
+ #
322
+ # The width is given in inches.
323
+ #
324
+ # @example
325
+ # model = Sketchup.active_model
326
+ # path = Sketchup.find_support_file "report_tool.png",
327
+ # "Tools/DynamicComponents/images"
328
+ # pt = Geom::Point3d.new
329
+ # entities = model.active_entities
330
+ # image = entities.add_image path, pt, 300
331
+ # width = image.width
332
+ # if (width)
333
+ # UI.messagebox width
334
+ # else
335
+ # UI.messagebox "Failure"
336
+ # end
337
+ #
338
+ # @return width - the width of the image if successful
339
+ #
340
+ # @version SketchUp 6.0
341
+ def width
342
+ end
343
+
344
+ # The width= method is used to set the width of the image.
345
+ #
346
+ # The width is set in inches.
347
+ #
348
+ # @example
349
+ # model = Sketchup.active_model
350
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
351
+ # pt = Geom::Point3d.new
352
+ # entities = model.active_entities
353
+ # image = entities.add_image path, pt, 300
354
+ # UI.messagebox "Before adjustment"
355
+ # width = image.width=400
356
+ # if (width)
357
+ # UI.messagebox width
358
+ # else
359
+ # UI.messagebox "Failure"
360
+ # end
361
+ #
362
+ # @param width
363
+ # The width, in inches, to set the image.
364
+ #
365
+ # @return width - the new width if successful
366
+ #
367
+ # @version SketchUp 6.0
368
+ def width=(width)
369
+ end
370
+
371
+ # The zrotation method is used to get the angle that the image is rotated
372
+ # about the normal vector from an arbitrary X axis.
373
+ #
374
+ # @example
375
+ # model = Sketchup.active_model
376
+ # path = Sketchup.find_support_file "report_tool.png", "Tools/DynamicComponents/images"
377
+ # pt = Geom::Point3d.new
378
+ # entities = model.active_entities
379
+ # image = entities.add_image path, pt, 300
380
+ # zrotation = image.zrotation
381
+ # if (zrotation)
382
+ # UI.messagebox zrotation
383
+ # else
384
+ # UI.messagebox "Failure"
385
+ # end
386
+ #
387
+ # @return vector - a Vector3d object if successful
388
+ #
389
+ # @version SketchUp 6.0
390
+ def zrotation
391
+ end
392
+
393
+ end