sketchup-api-stubs 0.7.0 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +2 -0
  3. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +14 -10
  4. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +4 -4
  5. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +4 -4
  6. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +4 -5
  7. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +17 -17
  8. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +6 -0
  9. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -2
  10. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +3 -3
  11. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +4 -0
  12. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +6 -13
  13. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +60 -4
  14. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +6 -13
  15. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +188 -0
  16. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +8 -3
  17. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -2
  18. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +6 -13
  19. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +5 -1
  20. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +6 -13
  21. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +147 -4
  22. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +4 -0
  23. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +3 -3
  24. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +2 -2
  25. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +5 -0
  26. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +31 -57
  27. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +109 -208
  28. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +23 -10
  29. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +22 -7
  30. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +23 -12
  31. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +15 -8
  32. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +60 -27
  33. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +5 -3
  34. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +5 -3
  35. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +2 -8
  36. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +4 -0
  37. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +9 -3
  38. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +7 -13
  39. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +54 -25
  40. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +5 -3
  41. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +19 -14
  42. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +5 -4
  43. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +8 -7
  44. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +8 -7
  45. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +46 -44
  46. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +8 -0
  47. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +46 -6
  48. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +10 -11
  49. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +32 -20
  50. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +5 -3
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +4 -1
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +112 -69
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -0
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +224 -28
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +117 -4
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -12
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +7 -9
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +14 -7
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +5 -4
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +8 -10
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +122 -72
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +4 -3
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +1 -2
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +6 -6
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +3 -3
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +142 -39
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +21 -11
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +5 -4
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +36 -14
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +4 -3
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +9 -4
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +19 -19
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +4 -4
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +5 -3
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -0
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +8 -2
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +13 -21
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +30 -24
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +5 -3
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +31 -21
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +72 -66
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +5 -3
  84. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +12 -5
  85. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +34 -3
  86. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +36 -10
  87. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +2 -2
  88. data/lib/sketchup-api-stubs/stubs/_top_level.rb +2 -0
  89. data/lib/sketchup-api-stubs/stubs/geom.rb +3 -0
  90. data/lib/sketchup-api-stubs/stubs/sketchup.rb +54 -22
  91. data/lib/sketchup-api-stubs/stubs/ui.rb +9 -8
  92. metadata +4 -16
@@ -8,6 +8,62 @@ class Layout::Grid
8
8
 
9
9
  # Instance Methods
10
10
 
11
+ # The {#clip_to_margins=} method sets whether or not the grid is clipped to the
12
+ # page margins.
13
+ #
14
+ # @example
15
+ # doc = Layout::Document.open("C:/path/to/document.layout")
16
+ # grid = doc.grid
17
+ # grid.clip_to_margins = true
18
+ #
19
+ # @param [Boolean] clip
20
+ #
21
+ # @version LayOut 2020.1
22
+ def clip_to_margins=(clip)
23
+ end
24
+
25
+ # The {#clip_to_margins?} method returns whether or not the grid is clipped to
26
+ # the page margins.
27
+ #
28
+ # @example
29
+ # doc = Layout::Document.open("C:/path/to/document.layout")
30
+ # grid = doc.grid
31
+ # in_front = grid.clip_to_margins?
32
+ #
33
+ # @return [Boolean]
34
+ #
35
+ # @version LayOut 2020.1
36
+ def clip_to_margins?
37
+ end
38
+
39
+ # The {#in_front=} method sets whether or not the grid is drawn on top of
40
+ # entities.
41
+ #
42
+ # @example
43
+ # doc = Layout::Document.open("C:/path/to/document.layout")
44
+ # grid = doc.grid
45
+ # grid.in_front = true
46
+ #
47
+ # @param [Boolean] in_front
48
+ #
49
+ # @version LayOut 2020.1
50
+ def in_front=(in_front)
51
+ end
52
+
53
+ # The {#in_front?} method returns whether or not the grid is drawn on top of
54
+ # entities.
55
+ #
56
+ # @example
57
+ # doc = Layout::Document.open("C:/path/to/document.layout")
58
+ # grid = doc.grid
59
+ # in_front = grid.in_front?
60
+ #
61
+ # @return [Boolean]
62
+ #
63
+ # @version LayOut 2020.1
64
+ def in_front?
65
+ end
66
+
11
67
  # The {#major_color} method returns the {Sketchup::Color} for the major grid
12
68
  # lines.
13
69
  #
@@ -22,6 +78,26 @@ class Layout::Grid
22
78
  def major_color
23
79
  end
24
80
 
81
+ # The {#major_color=} method sets the {Sketchup::Color} for the major grid
82
+ # lines.
83
+ #
84
+ # @example
85
+ # doc = Layout::Document.open("C:/path/to/document.layout")
86
+ # grid = doc.grid
87
+ # grid.major_color = Sketchup::Color.new(255, 0, 0)
88
+ # grid.major_color = 255
89
+ # grid.major_color = 0x0000ff
90
+ # grid.major_color = "red"
91
+ # grid.major_color = "#ff0000"
92
+ # grid.major_color = [1.0, 0.0, 0.0]
93
+ # grid.major_color = [255, 0, 0]
94
+ #
95
+ # @param [Sketchup::Color] color
96
+ #
97
+ # @version LayOut 2020.1
98
+ def major_color=(color)
99
+ end
100
+
25
101
  # The {#major_spacing} method returns the major space size of the
26
102
  # {Layout::Grid}.
27
103
  #
@@ -36,6 +112,24 @@ class Layout::Grid
36
112
  def major_spacing
37
113
  end
38
114
 
115
+ # The {#major_spacing=} method sets the major space size of the
116
+ # {Layout::Grid}.
117
+ #
118
+ # @example
119
+ # doc = Layout::Document.open("C:/path/to/document.layout")
120
+ # grid = doc.grid
121
+ # grid.major_spacing = 1.25
122
+ #
123
+ # @param [Float] spacing
124
+ # The double specifying the space size for the
125
+ # {Layout::Grid}
126
+ #
127
+ # @raise [ArgumentError] if spacing is not greater than zero
128
+ #
129
+ # @version LayOut 2020.1
130
+ def major_spacing=(spacing)
131
+ end
132
+
39
133
  # The {#minor_color} method returns the {Sketchup::Color} for the minor grid
40
134
  # lines.
41
135
  #
@@ -50,6 +144,26 @@ class Layout::Grid
50
144
  def minor_color
51
145
  end
52
146
 
147
+ # The {#minor_color=} method sets the {Sketchup::Color} for the minor grid
148
+ # lines.
149
+ #
150
+ # @example
151
+ # doc = Layout::Document.open("C:/path/to/document.layout")
152
+ # grid = doc.grid
153
+ # grid.minor_color = Sketchup::Color.new(255, 0, 0)
154
+ # grid.minor_color = 255
155
+ # grid.minor_color = 0x0000ff
156
+ # grid.minor_color = "red"
157
+ # grid.minor_color = "#ff0000"
158
+ # grid.minor_color = [1.0, 0.0, 0.0]
159
+ # grid.minor_color = [255, 0, 0]
160
+ #
161
+ # @param [Sketchup::Color] color
162
+ #
163
+ # @version LayOut 2020.1
164
+ def minor_color=(color)
165
+ end
166
+
53
167
  # The {#minor_divisions} method returns the number of minor divisions of the
54
168
  # {Layout::Grid}.
55
169
  #
@@ -64,6 +178,38 @@ class Layout::Grid
64
178
  def minor_divisions
65
179
  end
66
180
 
181
+ # The {#minor_divisions=} method sets the number of minor divisions of the
182
+ # {Layout::Grid}.
183
+ #
184
+ # @example
185
+ # doc = Layout::Document.open("C:/path/to/document.layout")
186
+ # grid = doc.grid
187
+ # grid.major_spacing = 1.25
188
+ #
189
+ # @param [Integer] divisions
190
+ # The number of minor divisions for the
191
+ # {Layout::Grid}
192
+ #
193
+ # @raise [ArgumentError] if divisions is negative
194
+ #
195
+ # @version LayOut 2020.1
196
+ def minor_divisions=(divisions)
197
+ end
198
+
199
+ # The {#print=} method sets whether or not the {Layout::Grid} is
200
+ # printed.
201
+ #
202
+ # @example
203
+ # doc = Layout::Document.open("C:/path/to/document.layout")
204
+ # grid = doc.grid
205
+ # grid.print = false
206
+ #
207
+ # @param [Boolean] print
208
+ #
209
+ # @version LayOut 2020.1
210
+ def print=(print)
211
+ end
212
+
67
213
  # The {#print?} method returns whether or not the {Layout::Grid} is
68
214
  # printed.
69
215
  #
@@ -78,6 +224,20 @@ class Layout::Grid
78
224
  def print?
79
225
  end
80
226
 
227
+ # The {#show=} method sets whether or not the {Layout::Grid} is
228
+ # visible.
229
+ #
230
+ # @example
231
+ # doc = Layout::Document.open("C:/path/to/document.layout")
232
+ # grid = doc.grid
233
+ # grid.show = true
234
+ #
235
+ # @param [Boolean] show
236
+ #
237
+ # @version LayOut 2020.1
238
+ def show=(show)
239
+ end
240
+
81
241
  # The {#show?} method returns whether or not the {Layout::Grid} is
82
242
  # visible.
83
243
  #
@@ -92,6 +252,20 @@ class Layout::Grid
92
252
  def show?
93
253
  end
94
254
 
255
+ # The {#show_major=} method sets whether or not the major grid lines are
256
+ # visible.
257
+ #
258
+ # @example
259
+ # doc = Layout::Document.open("C:/path/to/document.layout")
260
+ # grid = doc.grid
261
+ # grid.show_major = true
262
+ #
263
+ # @param [Boolean] show
264
+ #
265
+ # @version LayOut 2020.1
266
+ def show_major=(show)
267
+ end
268
+
95
269
  # The {#show_major?} method returns whether or not the major grid lines are
96
270
  # visible.
97
271
  #
@@ -106,6 +280,20 @@ class Layout::Grid
106
280
  def show_major?
107
281
  end
108
282
 
283
+ # The {#show_minor=} method sets whether or not the minor grid lines are
284
+ # visible.
285
+ #
286
+ # @example
287
+ # doc = Layout::Document.open("C:/path/to/document.layout")
288
+ # grid = doc.grid
289
+ # grid.show_minor = false
290
+ #
291
+ # @param [Boolean] show
292
+ #
293
+ # @version LayOut 2020.1
294
+ def show_minor=(show)
295
+ end
296
+
109
297
  # The {#show_minor?} method returns whether or not the minor grid lines are
110
298
  # visible.
111
299
  #
@@ -32,7 +32,9 @@ class Layout::Image < Layout::Entity
32
32
  def clip_mask
33
33
  end
34
34
 
35
- # The {#clip_mask=} method sets the clip mask of the {Layout::Image}.
35
+ # The {#clip_mask=} method sets the clip mask of the {Layout::Image}. clip_mask
36
+ # can be a {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path}, or +nil+,
37
+ # and it must not currently exist in a {Layout::Document}, or {Layout::Group}.
36
38
  #
37
39
  # @example
38
40
  # image = Layout::Image.new("my_image.png", [[1, 1], [3, 3]])
@@ -42,11 +44,14 @@ class Layout::Image < Layout::Entity
42
44
  # clip_mask = Layout::Rectangle.new(bounds)
43
45
  # image.clip_mask = clip_mask
44
46
  #
45
- # @param [Layout::Entity] clip_mask
47
+ # @note +clip_mask+ may be +nil+ as of LayOut 2020.1.
48
+ #
49
+ # @param [Layout::Entity, nil] clip_mask
46
50
  # The clip mask can be a {Layout::Path},
47
51
  # {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
48
52
  #
49
- # @raise [ArgumentError] if clip mask is already in a document
53
+ # @raise [ArgumentError] if clip mask is already in a {Layout::Document} or
54
+ # {Layout::Group}
50
55
  #
51
56
  # @raise [ArgumentError] if clip mask is not a {Layout::Path},
52
57
  # {Layout::Rectangle}, or {Layout::Ellipse}
@@ -205,9 +205,8 @@ class Layout::Label < Layout::Entity
205
205
  # @param [Geom::Bounds2d] bounds
206
206
  # @return [Layout::Label]
207
207
  #
208
- # @overload initialize(text, leader_type, target_point, anchor_point,
208
+ # @overload initialize(text, leader_type, target_point, anchor_point, anchor_type)
209
209
  #
210
- # anchor_type)
211
210
  # @param [String] text The label text
212
211
  # @param [Integer] leader_type The leader line type
213
212
  # @param [Geom::Point2d] target_point Where the label leader should point to
@@ -119,6 +119,11 @@ class Layout::Layers
119
119
  # puts layer.name
120
120
  # }
121
121
  #
122
+ # @note Don't remove content from this collection while iterating over it with
123
+ # {#each}. This would change the size of the collection and cause elements to
124
+ # be skipped as the indices change. Instead copy the current collection to an
125
+ # array using +to_a+ and then use +each+ on the array, when removing content.
126
+ #
122
127
  # @version LayOut 2018
123
128
  #
124
129
  # @yieldparam [Layout::Layer] layer
@@ -153,6 +158,7 @@ class Layout::Layers
153
158
  # @version LayOut 2018
154
159
  def length
155
160
  end
161
+ alias_method :size, :length
156
162
 
157
163
  # The {#remove} method deletes the given {Layout::Layer} from the
158
164
  # {Layout::Document}.
@@ -216,17 +222,4 @@ class Layout::Layers
216
222
  def reorder(layer, new_index)
217
223
  end
218
224
 
219
- # The {#length} method returns the number of {Layout::Layer}s.
220
- #
221
- # @example
222
- # doc = Layout::Document.open("C:/path/to/document.layout")
223
- # layers = doc.layers
224
- # num_layers = layers.length
225
- #
226
- # @return [Integer]
227
- #
228
- # @version LayOut 2018
229
- def size
230
- end
231
-
232
225
  end
@@ -77,7 +77,7 @@ class Layout::LinearDimension < Layout::Entity
77
77
  # point_1 = Geom::Point2d.new(5, 7.5)
78
78
  # point_2 = Geom::Point2d.new(8.5, 9)
79
79
  # table = Layout::Rectangle.new([point_1, point_2])
80
- # doc.add_entity(table, @doc.layers.first, @doc.pages.first)
80
+ # doc.add_entity(table, doc.layers.first, doc.pages.first)
81
81
  # start_point = Layout::ConnectionPoint.new(table, point_1)
82
82
  # end_point = Layout::ConnectionPoint.new(table, point_2)
83
83
  # height = 1.0
@@ -532,6 +532,10 @@ class Layout::LinearDimension < Layout::Entity
532
532
  # dim = Layout::LinearDimension.new(start_point, end_point, height)
533
533
  # text = dim.text
534
534
  #
535
+ # @note With the addition of auto-text in dimensions for LayOut 2019.2, the
536
+ # copy of the dimension text incorrectly provided the plain text when
537
+ # requesting the display text. This has been fixed for LayOut 2020.1.
538
+ #
535
539
  # @return [Layout::FormattedText]
536
540
  #
537
541
  # @version LayOut 2018
@@ -65,6 +65,11 @@ class Layout::Pages
65
65
  # puts page.name
66
66
  # }
67
67
  #
68
+ # @note Don't remove content from this collection while iterating over it with
69
+ # {#each}. This would change the size of the collection and cause elements to
70
+ # be skipped as the indices change. Instead copy the current collection to an
71
+ # array using +to_a+ and then use +each+ on the array, when removing content.
72
+ #
68
73
  # @version LayOut 2018
69
74
  #
70
75
  # @yieldparam [Layout::Page] page
@@ -142,6 +147,7 @@ class Layout::Pages
142
147
  # @version LayOut 2018
143
148
  def length
144
149
  end
150
+ alias_method :size, :length
145
151
 
146
152
  # The {#remove} method deletes the given {Layout::Page} from the
147
153
  # {Layout::Document}.
@@ -200,17 +206,4 @@ class Layout::Pages
200
206
  def reorder(page, new_index)
201
207
  end
202
208
 
203
- # The {#length} method returns the number of {Layout::Page}s.
204
- #
205
- # @example
206
- # doc = Layout::Document.open("C:/path/to/document.layout")
207
- # pages = doc.pages
208
- # num_pages = pages.length
209
- #
210
- # @return [Integer]
211
- #
212
- # @version LayOut 2018
213
- def size
214
- end
215
-
216
209
  end
@@ -44,6 +44,20 @@ class Layout::SketchUpModel < Layout::Entity
44
44
 
45
45
  # Instance Methods
46
46
 
47
+ # The {#camera_modified?} method returns whether the camera of the
48
+ # {Layout::SketchUpModel} has been modified.
49
+ #
50
+ # @example
51
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
52
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
53
+ # modified = model.camera_modified?
54
+ #
55
+ # @return [Boolean]
56
+ #
57
+ # @version LayOut 2020.1
58
+ def camera_modified?
59
+ end
60
+
47
61
  # The {#clip_mask} method returns the clip mask entity for the
48
62
  # {Layout::SketchUpModel}, or +nil+ if it does not have one. clip_mask can be a
49
63
  # {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path}.
@@ -61,7 +75,8 @@ class Layout::SketchUpModel < Layout::Entity
61
75
 
62
76
  # The {#clip_mask=} method sets a clip mask for the {Layout::SketchUpModel}.
63
77
  # clip_mask can be a {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path},
64
- # and it must not currently exist in a {Layout::Document}.
78
+ # or +nil+, and it must not currently exist in a {Layout::Document},
79
+ # or {Layout::Group}.
65
80
  #
66
81
  # @example
67
82
  # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
@@ -69,9 +84,14 @@ class Layout::SketchUpModel < Layout::Entity
69
84
  # rect = Layout::Rectangle.new([[2, 2], [3, 3]]);
70
85
  # model.clip_mask = rect
71
86
  #
72
- # @param [Layout::Entity] clip_mask
87
+ # @note +clip_mask+ may be +nil+ as of LayOut 2020.1.
73
88
  #
74
- # @raise [ArgumentError] if clip_mask is already in a {Layout::Document}
89
+ # @param [Layout::Entity, nil] clip_mask
90
+ # The clip mask can be a {Layout::Path},
91
+ # {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
92
+ #
93
+ # @raise [ArgumentError] if clip_mask is already in a {Layout::Document} or
94
+ # {Layout::Group}
75
95
  #
76
96
  # @raise [ArgumentError] if clip_mask is not a {Layout::Rectangle},
77
97
  # {Layout::Ellipse}, or {Layout::Path}
@@ -210,6 +230,20 @@ class Layout::SketchUpModel < Layout::Entity
210
230
  def display_background?
211
231
  end
212
232
 
233
+ # The {#effects_modified?} method returns whether the shadow or fog settings
234
+ # of the {Layout::SketchUpModel} have been modified.
235
+ #
236
+ # @example
237
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
238
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
239
+ # modified = model.effects_modified?
240
+ #
241
+ # @return [Boolean]
242
+ #
243
+ # @version LayOut 2020.1
244
+ def effects_modified?
245
+ end
246
+
213
247
  # The {#entities} method returns the {Layout::Group} that represents the
214
248
  # {Layout::SketchUpModel} in its exploded form. The {Layout::Group} will
215
249
  # contain a {Layout::Image} for raster and hybrid-rendered models, and
@@ -248,6 +282,25 @@ class Layout::SketchUpModel < Layout::Entity
248
282
  def initialize(path, bounds)
249
283
  end
250
284
 
285
+ # The {#layers_modified?} method returns whether the layers of the
286
+ # {Layout::SketchUpModel} has been modified.
287
+ #
288
+ #
289
+ # @note: In SketchUp 2020, SketchUp "layers" were renamed to "tags". For
290
+ # consistency with the SketchUp API, this will continue to refer to
291
+ # "tags" as "layers".
292
+ #
293
+ # @example
294
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
295
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
296
+ # modified = model.layers_modified?
297
+ #
298
+ # @return [Boolean]
299
+ #
300
+ # @version LayOut 2020.1
301
+ def layers_modified?
302
+ end
303
+
251
304
  # The {#line_weight} method returns the line weight for the
252
305
  # {Layout::SketchUpModel}.
253
306
  #
@@ -366,7 +419,10 @@ class Layout::SketchUpModel < Layout::Entity
366
419
  def preserve_scale_on_resize?
367
420
  end
368
421
 
369
- # The {#render} method renders the {Layout::SketchUpModel}.
422
+ # The {#render} method renders the {Layout::SketchUpModel}. If the model
423
+ # belongs to a {Layout::Document}, then the render will be performed at the
424
+ # quality set in document.page_info (see {Layout::Document} and
425
+ # {Layout::PageInfo}). Otherwise, the render will be performed at Low quality.
370
426
  #
371
427
  # @example
372
428
  # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
@@ -441,6 +497,79 @@ class Layout::SketchUpModel < Layout::Entity
441
497
  def render_needed?
442
498
  end
443
499
 
500
+ # The {#reset_camera} method resets the {Layout::SketchUpModel}'s camera to
501
+ # the scene's setting.
502
+ #
503
+ # @example
504
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
505
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
506
+ # model.reset_camera if model.camera_modified?
507
+ #
508
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
509
+ # {Layout::Layer}
510
+ #
511
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
512
+ #
513
+ # @version LayOut 2020.1
514
+ def reset_camera
515
+ end
516
+
517
+ # The {#reset_effects} method resets the {Layout::SketchUpModel}'s shadow and
518
+ # fog settings to the scene's settings.
519
+ #
520
+ # @example
521
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
522
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
523
+ # model.reset_effects if model.effects_modified?
524
+ #
525
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
526
+ # {Layout::Layer}
527
+ #
528
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
529
+ #
530
+ # @version LayOut 2020.1
531
+ def reset_effects
532
+ end
533
+
534
+ # The {#reset_layers} method resets the {Layout::SketchUpModel}'s layers to
535
+ # the scene's setting.
536
+ #
537
+ #
538
+ # @note: In SketchUp 2020, SketchUp "layers" were renamed to "tags". For
539
+ # consistency with the SketchUp API, this will continue to refer to
540
+ # "tags" as "layers".
541
+ #
542
+ # @example
543
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
544
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
545
+ # model.reset_layers if model.layers_modified?
546
+ #
547
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
548
+ # {Layout::Layer}
549
+ #
550
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
551
+ #
552
+ # @version LayOut 2020.1
553
+ def reset_layers
554
+ end
555
+
556
+ # The {#reset_style} method resets the {Layout::SketchUpModel}'s style to
557
+ # the scene's setting.
558
+ #
559
+ # @example
560
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
561
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
562
+ # model.reset_style if model.style_modified?
563
+ #
564
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
565
+ # {Layout::Layer}
566
+ #
567
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
568
+ #
569
+ # @version LayOut 2020.1
570
+ def reset_style
571
+ end
572
+
444
573
  # The {#scale} method returns the scale of the {Layout::SketchUpModel}.
445
574
  #
446
575
  # @example
@@ -492,6 +621,20 @@ class Layout::SketchUpModel < Layout::Entity
492
621
  def scenes
493
622
  end
494
623
 
624
+ # The {#style_modified?} method returns whether the style of the
625
+ # {Layout::SketchUpModel} has been modified.
626
+ #
627
+ # @example
628
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
629
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
630
+ # modified = model.style_modified?
631
+ #
632
+ # @return [Boolean]
633
+ #
634
+ # @version LayOut 2020.1
635
+ def style_modified?
636
+ end
637
+
495
638
  # The {#view} method returns the standard view of the {Layout::SketchUpModel}.
496
639
  #
497
640
  # The standard view can be one of the following values: