sketchup-api-stubs 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/SketchUp/Geom/BoundingBox.rb +17 -20
  3. data/SketchUp/Geom/Bounds2d.rb +172 -0
  4. data/SketchUp/Geom/LatLong.rb +31 -16
  5. data/SketchUp/Geom/OrientedBounds2d.rb +102 -0
  6. data/SketchUp/Geom/Point2d.rb +365 -0
  7. data/SketchUp/Geom/Point3d.rb +121 -110
  8. data/SketchUp/Geom/PolygonMesh.rb +30 -21
  9. data/SketchUp/Geom/Transformation.rb +8 -4
  10. data/SketchUp/Geom/Transformation2d.rb +125 -0
  11. data/SketchUp/Geom/UTM.rb +43 -37
  12. data/SketchUp/Geom/Vector2d.rb +497 -0
  13. data/SketchUp/Geom/Vector3d.rb +143 -131
  14. data/SketchUp/Layout.rb +25 -0
  15. data/SketchUp/Layout/AngularDimension.rb +569 -0
  16. data/SketchUp/Layout/AutoTextDefinition.rb +417 -0
  17. data/SketchUp/Layout/AutoTextDefinitions.rb +186 -0
  18. data/SketchUp/Layout/ConnectionPoint.rb +70 -0
  19. data/SketchUp/Layout/Document.rb +458 -0
  20. data/SketchUp/Layout/Ellipse.rb +29 -0
  21. data/SketchUp/Layout/Entities.rb +155 -0
  22. data/SketchUp/Layout/Entity.rb +363 -0
  23. data/SketchUp/Layout/FormattedText.rb +349 -0
  24. data/SketchUp/Layout/Grid.rb +131 -0
  25. data/SketchUp/Layout/Group.rb +261 -0
  26. data/SketchUp/Layout/Image.rb +86 -0
  27. data/SketchUp/Layout/Label.rb +371 -0
  28. data/SketchUp/Layout/Layer.rb +222 -0
  29. data/SketchUp/Layout/LayerInstance.rb +128 -0
  30. data/SketchUp/Layout/Layers.rb +232 -0
  31. data/SketchUp/Layout/LinearDimension.rb +563 -0
  32. data/SketchUp/Layout/LockedEntityError.rb +10 -0
  33. data/SketchUp/Layout/LockedLayerError.rb +11 -0
  34. data/SketchUp/Layout/Page.rb +187 -0
  35. data/SketchUp/Layout/PageInfo.rb +393 -0
  36. data/SketchUp/Layout/Pages.rb +216 -0
  37. data/SketchUp/Layout/Path.rb +326 -0
  38. data/SketchUp/Layout/Rectangle.rb +174 -0
  39. data/SketchUp/Layout/SketchUpModel.rb +522 -0
  40. data/SketchUp/Layout/Style.rb +1520 -0
  41. data/SketchUp/Layout/Table.rb +290 -0
  42. data/SketchUp/Layout/TableCell.rb +149 -0
  43. data/SketchUp/Layout/TableColumn.rb +139 -0
  44. data/SketchUp/Layout/TableRow.rb +135 -0
  45. data/SketchUp/Sketchup/Animation.rb +7 -4
  46. data/SketchUp/Sketchup/ArcCurve.rb +10 -10
  47. data/SketchUp/Sketchup/AttributeDictionaries.rb +13 -4
  48. data/SketchUp/Sketchup/AttributeDictionary.rb +12 -12
  49. data/SketchUp/Sketchup/Color.rb +68 -78
  50. data/SketchUp/Sketchup/ComponentDefinition.rb +60 -60
  51. data/SketchUp/Sketchup/ComponentInstance.rb +57 -55
  52. data/SketchUp/Sketchup/DefinitionList.rb +34 -17
  53. data/SketchUp/Sketchup/Drawingelement.rb +19 -21
  54. data/SketchUp/Sketchup/Edge.rb +22 -24
  55. data/SketchUp/Sketchup/Entities.rb +173 -162
  56. data/SketchUp/Sketchup/Entity.rb +71 -55
  57. data/SketchUp/Sketchup/Face.rb +45 -44
  58. data/SketchUp/Sketchup/Group.rb +47 -49
  59. data/SketchUp/Sketchup/Image.rb +16 -0
  60. data/SketchUp/Sketchup/ImageRep.rb +226 -0
  61. data/SketchUp/Sketchup/InstancePath.rb +13 -13
  62. data/SketchUp/Sketchup/Layer.rb +15 -17
  63. data/SketchUp/Sketchup/Material.rb +40 -30
  64. data/SketchUp/Sketchup/Materials.rb +40 -22
  65. data/SketchUp/Sketchup/Menu.rb +5 -5
  66. data/SketchUp/Sketchup/Model.rb +230 -228
  67. data/SketchUp/Sketchup/Page.rb +32 -0
  68. data/SketchUp/Sketchup/Pages.rb +3 -4
  69. data/SketchUp/Sketchup/RenderingOptions.rb +21 -16
  70. data/SketchUp/Sketchup/SectionPlane.rb +64 -0
  71. data/SketchUp/Sketchup/Selection.rb +20 -28
  72. data/SketchUp/Sketchup/ShadowInfo.rb +14 -14
  73. data/SketchUp/Sketchup/Text.rb +24 -26
  74. data/SketchUp/Sketchup/Texture.rb +28 -12
  75. data/SketchUp/Sketchup/Vertex.rb +14 -11
  76. data/SketchUp/Sketchup/View.rb +126 -116
  77. data/SketchUp/UI/Command.rb +17 -17
  78. data/SketchUp/UI/HtmlDialog.rb +8 -5
  79. data/SketchUp/UI/Notification.rb +1 -1
  80. data/SketchUp/UI/Toolbar.rb +13 -14
  81. data/SketchUp/UI/WebDialog.rb +55 -59
  82. data/SketchUp/_top_level.rb +139 -27
  83. data/SketchUp/{Array.rb → array.rb} +167 -30
  84. data/SketchUp/{Geom.rb → geom.rb} +9 -7
  85. data/SketchUp/{LanguageHandler.rb → languagehandler.rb} +15 -15
  86. data/SketchUp/{Length.rb → length.rb} +15 -15
  87. data/SketchUp/{Numeric.rb → numeric.rb} +19 -19
  88. data/SketchUp/sketchup.rb +167 -156
  89. data/SketchUp/{SketchupExtension.rb → sketchupextension.rb} +27 -27
  90. data/SketchUp/{String.rb → string.rb} +1 -1
  91. data/SketchUp/ui.rb +113 -87
  92. metadata +46 -9
@@ -0,0 +1,29 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # A simple elliptical shape entity.
5
+ #
6
+ # @version LayOut 2018
7
+ class Layout::Ellipse < Layout::Entity
8
+
9
+ # Instance Methods
10
+
11
+ # The {#initialize} method creates a new {Layout::Ellipse}.
12
+ #
13
+ # @example
14
+ # upper_left = Geom::Point2d.new(1, 1)
15
+ # lower_right = Geom::Point2d.new(2, 2)
16
+ # bounds = Geom::Bounds2d.new(upper_left, lower_right)
17
+ # ellipse = Layout::Ellipse.new(bounds)
18
+ #
19
+ # @param [Geom::Bounds2d] bounds
20
+ #
21
+ # @raise ArgumentError if bounds is zero size
22
+ #
23
+ # @return [Layout::Ellipse]
24
+ #
25
+ # @version LayOut 2018
26
+ def initialize(bounds)
27
+ end
28
+
29
+ end
@@ -0,0 +1,155 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The Entities class is a container class for {Layout::Entity}s. A
5
+ # {Layout::Entities} object is different from a SketchUp::Entities object in
6
+ # that it is read-only. Adding or removing {Layout::Entity}s from a
7
+ # {Layout::Document} happens with the {Layout::Document#add_entity} and
8
+ # {Layout::Document#remove_entity} methods.
9
+ #
10
+ # The {Layout::Entities} from {Layout::AngularDimension#entities},
11
+ # {Layout::Label#entities}, {Layout::LinearDimension#entities}, or
12
+ # {Layout::Table#entities} contains the {Layout::Entity}s that represent the
13
+ # {Layout::Entity} in its exploded form.
14
+ #
15
+ # The {Layout::Entities} from {Layout::Group#entities} contains all the
16
+ # {Layout::Entity}s that belong to the {Layout::Group}.
17
+ #
18
+ # The {Layout::Entities} from {Layout::Page#entities} contains all of the
19
+ # {Layout::Entity}s on both shared and non-shared {Layout::Layer}s. This class
20
+ # is used to iterate through the {Layout::Entity}s in draw order or pick order
21
+ # (reverse draw order) using the {#each} and {#reverse_each} methods.
22
+ #
23
+ # The {Layout::Entities} from {Layout::Document#shared_entities} contains all
24
+ # of the {Layout::Entity}s that belong on all shared {Layout::Layer}s.
25
+ #
26
+ # The {Layout::Entities} from {Layout::Page#nonshared_entities} contains all of
27
+ # the {Layout::Entity}s that belong to that {Layout::Page}.
28
+ #
29
+ # The {Layout::Entities} from {Layout::LayerInstance#entities} contains all of
30
+ # the {Layout::Entity}s that belong on that {Layout::LayerInstance}.
31
+ #
32
+ # @example
33
+ # # Grab a handle to a pages entities
34
+ # doc = Layout::Document.open("C:/path/to/document.layout")
35
+ # entities = doc.pages.first.entities
36
+ #
37
+ # # From here, we can iterate over the entities in draw order or pick order
38
+ # entities.each { |entity|
39
+ # puts entity
40
+ # }
41
+ # entities.reverse_each(skip_locked: true) { |entity|
42
+ # puts entity
43
+ # }
44
+ #
45
+ # @version LayOut 2018
46
+ class Layout::Entities
47
+
48
+ # Includes
49
+
50
+ include Enumerable
51
+
52
+ # Instance Methods
53
+
54
+ # The {#[]} method returns the {Layout::Entity} at the given index. This method
55
+ # is not valid for use when the {Layout::Entities} object came from a
56
+ # {Layout::Page}.
57
+ #
58
+ # @example
59
+ # table = Layout::Table.new([1, 1, 4, 4], 4, 4)
60
+ # entities = table.entities
61
+ # entity = entities[10]
62
+ #
63
+ # @param [Integer] index
64
+ #
65
+ # @raise [ArgumentError] if this came from a {Layout::Page}
66
+ #
67
+ # @return [Layout::Entity]
68
+ #
69
+ # @version LayOut 2018
70
+ def [](index)
71
+ end
72
+
73
+ # The {#each} method iterates through all of the {Layout::Entity}s. When
74
+ # iterating over a {Layout::LayerInstance}'s {Layout::Entities}, it is not
75
+ # necessary to provide a flags Hash. When iterating over a {Layout::Page}'s
76
+ # {Layout::Entities}, the flags Hash is optional; providing no Hash will
77
+ # result in iterating over all {Layout::Entity}s, including those on hidden or
78
+ # locked {Layout::Layer}s. Valid symbols for the Hash are +:skip_hidden+ and
79
+ # +:skip_locked+.
80
+ #
81
+ # @example
82
+ # doc = Layout::Document.open("C:/path/to/document.layout")
83
+ # flags = { :skip_hidden => true }
84
+ # entities = doc.pages.first.entities
85
+ # entities.each(flags) { |entity|
86
+ # puts entity
87
+ # }
88
+ #
89
+ # @param [Hash{Symbol => Boolean}] flags
90
+ # A hash that allows skipping of
91
+ # {Layout::Entity}s on hidden or locked {Layout::Layers}
92
+ #
93
+ # @version LayOut 2018
94
+ #
95
+ # @yieldparam [Layout::Entity] entity
96
+ def each(flags = {})
97
+ end
98
+
99
+ # The {#length} method returns the number of {Layout::Entity}s.
100
+ #
101
+ # @example
102
+ # doc = Layout::Document.open("C:/path/to/document.layout")
103
+ # entities = doc.shared_entities
104
+ # num_entities = entities.length
105
+ #
106
+ # @return [Integer]
107
+ #
108
+ # @version LayOut 2018
109
+ def length
110
+ end
111
+
112
+ # The {#reverse_each} method iterates through all of the {Layout::Entity}s in
113
+ # reverse order. When iterating over a {Layout::LayerInstance}'s
114
+ # {Layout::Entities}, it is not necessary to provide a flags Hash. When
115
+ # iterating over a {Layout::Page}'s {Layout::Entities}, the flags Hash is
116
+ # optional; providing no Hash will result in iterating over all
117
+ # {Layout::Entity}s, including those on hidden or locked {Layout::Layer}s.
118
+ # Valid symbols for the Hash are +:skip_hidden+ and +:skip_locked+.
119
+ #
120
+ # @example
121
+ # doc = Layout::Document.open("C:/path/to/document.layout")
122
+ # flags = { :skip_hidden => true, :skip_locked => true }
123
+ # entities = doc.pages.first.entities
124
+ # entities.reverse_each(flags) { |entity|
125
+ # puts entity
126
+ # }
127
+ #
128
+ # @overload reverse_each
129
+ #
130
+ # @yieldparam [Layout::Entity] entity
131
+ #
132
+ # @overload reverse_each(flags)
133
+ #
134
+ # @param [Hash{Symbol => Boolean}] flags A hash that allows skipping of
135
+ # {Layout::Entity}s on hidden or locked {Layout::Layers}.
136
+ # @yieldparam [Layout::Entity] entity
137
+ #
138
+ # @version LayOut 2018
139
+ def reverse_each(*args)
140
+ end
141
+
142
+ # The {#length} method returns the number of {Layout::Entity}s.
143
+ #
144
+ # @example
145
+ # doc = Layout::Document.open("C:/path/to/document.layout")
146
+ # entities = doc.shared_entities
147
+ # num_entities = entities.length
148
+ #
149
+ # @return [Integer]
150
+ #
151
+ # @version LayOut 2018
152
+ def size
153
+ end
154
+
155
+ end
@@ -0,0 +1,363 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # An entity is an object shown on a page of a LayOut document.
5
+ #
6
+ # @example
7
+ # doc = Layout::Document.open("C:/path/to/document.layout")
8
+ # # Get the shared entities in the document. If there are no shared layers,
9
+ # # the resulting array will be empty.
10
+ # entities = doc.entities
11
+ # # Count how many of the entites are a rectangle
12
+ # rectangle_count = 0
13
+ #
14
+ # # Look at all of the entities in the array.
15
+ # entities.each { |entity|
16
+ # if entity.is_a?(Layout::Rectangle)
17
+ # rectangle_count = rectangle_count++
18
+ # end
19
+ # }
20
+ #
21
+ # @version LayOut 2018
22
+ class Layout::Entity
23
+
24
+ # Instance Methods
25
+
26
+ # The {#==} method checks to see if the two {Layout::Entity}s are equal. This
27
+ # checks whether the Ruby Objects are pointing to the same internal object.
28
+ #
29
+ # @example
30
+ # doc = Layout::Document.open("C:/path/to/document.layout")
31
+ # page_entities = doc.pages.first.entities
32
+ # layer_entities = doc.layers.first.layer_instance(page).entities
33
+ # page_entities.first == layer_entities.first
34
+ #
35
+ # @param [Layout::Entity] other
36
+ #
37
+ # @return [Boolean]
38
+ #
39
+ # @version LayOut 2018
40
+ def ==(other)
41
+ end
42
+
43
+ # The {#bounds} method returns the 2D rectangular bounds of the {Layout::Entity}.
44
+ #
45
+ # @example
46
+ # doc = Layout::Document.open("C:/path/to/document.layout")
47
+ # entities = doc.pages.first.entities
48
+ # bounds = entities.first.bounds
49
+ #
50
+ # @return [Geom::Bounds2d]
51
+ #
52
+ # @version LayOut 2018
53
+ def bounds
54
+ end
55
+
56
+ # The {#document} method returns the {Layout::Document} that the
57
+ # {Layout::Entity} belongs to, or +nil+ if it is not in a {Layout::Document}.
58
+ #
59
+ # @example
60
+ # doc = Layout::Document.open("C:/path/to/document.layout")
61
+ # entities = doc.shared_entities
62
+ # # entity_doc should be the same document as doc
63
+ # entity_doc = entities.first.document
64
+ #
65
+ # @return [Layout::Document, nil]
66
+ #
67
+ # @version LayOut 2018
68
+ def document
69
+ end
70
+
71
+ # The {#drawing_bounds} method returns the 2D rectangular drawing bounds of the
72
+ # {Layout::Entity}.
73
+ #
74
+ # @example
75
+ # doc = Layout::Document.open("C:/path/to/document.layout")
76
+ # entities = doc.pages.first.entities
77
+ # draw_bounds = entities.first.drawing_bounds
78
+ #
79
+ # @return [Geom::OrientedBounds2d]
80
+ #
81
+ # @version LayOut 2018
82
+ def drawing_bounds
83
+ end
84
+
85
+ # The {#group} method returns the {Layout::Group} the {Layout::Entity} belongs
86
+ # to, or +nil+ if it is not in a {Layout::Group}.
87
+ #
88
+ # @example
89
+ # doc = Layout::Document.open("C:/path/to/document.layout")
90
+ # pages = doc.pages
91
+ # entities = pages.first.entities
92
+ # group = entities.first.group
93
+ #
94
+ # @return [Layout::Group, nil]
95
+ #
96
+ # @version LayOut 2018
97
+ def group
98
+ end
99
+
100
+ # The {#layer_instance} method returns the {Layout::LayerInstance} that the
101
+ # {Layout::Entity} is on, or +nil+ if it is not associated with a
102
+ # {Layout::LayerInstance}.
103
+ #
104
+ # @example
105
+ # doc = Layout::Document.open("C:/path/to/document.layout")
106
+ # entities = doc.pages.first.entities
107
+ # entity_layer_instance = entities.first.layer_instance
108
+ #
109
+ # @note {Layout::Group}s are never associated with a {Layout::LayerInstance}.
110
+ #
111
+ # @return [Layout::LayerInstance, nil]
112
+ #
113
+ # @version LayOut 2018
114
+ def layer_instance
115
+ end
116
+
117
+ # The {#locked=} method sets the {Layout::Entity} as locked or unlocked. When
118
+ # locked, the {Layout::Entity} cannot be modified directly.
119
+ #
120
+ # @example
121
+ # doc = Layout::Document.open("C:/path/to/document.layout")
122
+ # entities = doc.pages.first.entities
123
+ # entities.first.locked = true
124
+ #
125
+ # @param [Boolean] is_locked
126
+ #
127
+ # @version LayOut 2018
128
+ def locked=(is_locked)
129
+ end
130
+
131
+ # The {#locked?} method returns whether the {Layout::Entity} is locked or
132
+ # unlocked.
133
+ #
134
+ # @example
135
+ # doc = Layout::Document.open("C:/path/to/document.layout")
136
+ # entities = doc.pages.first.entities
137
+ # is_first_locked = entities.first.locked?
138
+ #
139
+ # @return [Boolean]
140
+ #
141
+ # @return [Boolean]
142
+ #
143
+ # @version LayOut 2018
144
+ def locked?
145
+ end
146
+
147
+ # The {#move_to_group} method moves the {Layout::Entity} into a {Layout::Group}.
148
+ # If the {Layout::Entity} is already in a {Layout::Group}, it will be removed
149
+ # from that {Layout::Group} prior to being added to the new one. If this action
150
+ # results in the old {Layout::Group} containing only one {Layout::Entity}, the
151
+ # old {Layout::Group} will be collapsed and the remaining {Layout::Entity} will
152
+ # be moved to the old {Layout::Group}'s parent.
153
+ #
154
+ # @example
155
+ # doc = Layout::Document.open("C:/path/to/document.layout")
156
+ # entities = doc.pages.first.entities
157
+ # new_group = Layout::Group.new
158
+ # entities.first.move_to_group(new_group)
159
+ #
160
+ # @param [Layout::Group] group
161
+ #
162
+ # @raise [ArgumentError] if entity and group are not in the same
163
+ # {Layout::Document}
164
+ #
165
+ # @raise [LockedLayerError] if the {Layout::Entity} is on a locked
166
+ # {Layout::Layer}
167
+ #
168
+ # @raise [LockedEntityError] if the {Layout::Entity} is locked
169
+ #
170
+ # @raise [ArgumentError] if of entity and group one is shared and one is not
171
+ #
172
+ # @raise [ArgumentError] if entity and group are not on the same {Layout::Page}
173
+ #
174
+ # @version LayOut 2018
175
+ def move_to_group(group)
176
+ end
177
+
178
+ # The {#move_to_layer} method moves the {Layout::Entity} to the given
179
+ # {Layout::Layer}. If the {Layout::Layer} is non-shared and the
180
+ # {Layout::Entity} is currently on a shared {Layout::Layer}, an array of
181
+ # {Layout::Page}s must be provided to move the {Layout::Entity} to. In all other
182
+ # cases, passing in an array of {Layout::Page}s is not necessary. The
183
+ # {Layout::Entity} must belong to the same {Layout::Document} as the the
184
+ # {Layout::Layer} and the {Layout::Page}s.
185
+ #
186
+ # @example
187
+ # doc = Layout::Document.open("C:/path/to/document.layout")
188
+ # entities = doc.pages.first.entities
189
+ # layers = doc.layers
190
+ # entities.last.move_to_layer(layers.first)
191
+ #
192
+ # @overload move_to_layer(layer)
193
+ #
194
+ # @param [Layout::Layer] layer
195
+ #
196
+ # @overload move_to_layer(layer, pages)
197
+ #
198
+ # @param [Layout::Layer] layer
199
+ # @param [Array<Layout::Page>] pages
200
+ #
201
+ # @raise [ArgumentError] if layer is shared and a valid array of non-duplicate
202
+ # {Layout::Page}s is not passed in
203
+ #
204
+ # @raise [LockedEntityError] if the {Layout::Entity} is locked
205
+ #
206
+ # @raise [LockedLayerError] if the {Layout::Entity} is on a locked
207
+ # {Layout::Layer}
208
+ #
209
+ # @raise [LockedLayerError] if layer is locked
210
+ #
211
+ # @raise [ArgumentError] if entity, layer, and pages are not all in the same
212
+ # {Layout::Document}
213
+ #
214
+ # @version LayOut 2018
215
+ def move_to_layer(*args)
216
+ end
217
+
218
+ # The {#on_shared_layer?} method returns whether or not the {Layout::Entity} is
219
+ # on a shared {Layout::Layer}. This function works for all {Layout::Entity}
220
+ # types, including {Layout::Group}. {Layout::Group}s do not belong to a
221
+ # specific {Layout::Layer}, but their children are all on either a shared
222
+ # or non-shared {Layout::Layer}.
223
+ #
224
+ # @example
225
+ # doc = Layout::Document.open("C:/path/to/document.layout")
226
+ # entities = doc.pages.first.entities
227
+ # on_shared_layer = entities.first.on_shared_layer?
228
+ #
229
+ # @raise [ArgumentError] if the {Layout::Entity} is not in a {Layout::Document}
230
+ #
231
+ # @return [Boolean]
232
+ #
233
+ # @return [Boolean]
234
+ #
235
+ # @version LayOut 2018
236
+ def on_shared_layer?
237
+ end
238
+
239
+ # The {#page} method returns the {Layout::Page} that the {Layout::Entity}
240
+ # belongs to, or +nil+ if it is on a shared {Layout::Layer} or not in a
241
+ # {Layout::Document}.
242
+ #
243
+ # @example
244
+ # doc = Layout::Document.open("C:/path/to/document.layout")
245
+ # # page will be nil
246
+ # page = doc.shared_entities.first.page
247
+ # # page will be the first page of the document
248
+ # page = doc.pages.first.nonshared_entities.first.page
249
+ #
250
+ # @return [Layout::Page, nil]
251
+ #
252
+ # @version LayOut 2018
253
+ def page
254
+ end
255
+
256
+ # The {#style} method returns the {Layout::Style} of the {Layout::Entity}. If
257
+ # the {Layout::Entity} is a {Layout::Group}, +nil+ will be returned, as they
258
+ # do not have a {Layout::Style}.
259
+ #
260
+ # @example
261
+ # doc = Layout::Document.open("C:/path/to/document.layout")
262
+ # entities = doc.entities
263
+ # style = entities.first.style
264
+ #
265
+ # @return [Layout::Style, nil]
266
+ #
267
+ # @version LayOut 2018
268
+ def style
269
+ end
270
+
271
+ # The {#style=} method sets the {Layout::Style} of the {Layout::Entity}.
272
+ #
273
+ # @param [Layout::Style] style
274
+ #
275
+ # @raise [LockedEntityError] if the {Layout::Entity} is locked
276
+ #
277
+ # @raise [LockedLayerError] if the {Layout::Entity} is on a locked
278
+ # {Layout::Layer}
279
+ #
280
+ # @version LayOut 2018
281
+ def style=(style)
282
+ end
283
+
284
+ # The {#transform!} method transforms the {Layout::Entity} with a given
285
+ # {Geom::Transformation2d}.
286
+ #
287
+ # @example
288
+ # doc = Layout::Document.open("C:/path/to/document.layout")
289
+ # entities = doc.pages.first.entities
290
+ # transform = Geom::Transformation2d.new([1.0, 0.0, 0.0, 1.0, 1.0, 1.0])
291
+ # entity = entities.first.transform!(transform)
292
+ #
293
+ # @param [Geom::Transformation2d] transformation
294
+ #
295
+ # @raise [LockedEntityError] if the {Layout::Entity} is locked
296
+ #
297
+ # @raise [LockedLayerError] if the {Layout::Entity} is on a locked
298
+ # {Layout::Layer}
299
+ #
300
+ # @version LayOut 2018
301
+ def transform!(transformation)
302
+ end
303
+
304
+ # The {#transformation} method returns the explicit {Geom::Transformation2d}.
305
+ #
306
+ # @example
307
+ # doc = Layout::Document.open("C:/path/to/document.layout")
308
+ # entities = doc.pages.first.entities
309
+ # transform = entities.first.transformation
310
+ #
311
+ # @return [Geom::Transformation2d, nil]
312
+ #
313
+ # @version LayOut 2018
314
+ def transformation
315
+ end
316
+
317
+ # The {#untransformed_bounds} method returns the untransformed bounds of the
318
+ # {Layout::Entity}. This is the bounds of the {Layout::Entity} before its
319
+ # explicit {Geom::Transformation2d} is applied.
320
+ #
321
+ # @example
322
+ # doc = Layout::Document.open("C:/path/to/document.layout")
323
+ # entities = doc.pages.first.entities
324
+ # bounds = entities.first.untransformed_bounds
325
+ #
326
+ # @raise [ArgumentError] if the {Layout::Entity} does not have an explicit
327
+ # {Geom::Transformation2d}
328
+ #
329
+ # @return [Geom::Bounds2d]
330
+ #
331
+ # @version LayOut 2018
332
+ def untransformed_bounds
333
+ end
334
+
335
+ # The {#untransformed_bounds=} method sets the untransformed bounds of the
336
+ # {Layout::Entity}. This is the bounds of the {Layout::Entity} before its
337
+ # explicit {Geom::Transformation2d} is applied.
338
+ #
339
+ # @example
340
+ # doc = Layout::Document.open("C:/path/to/document.layout")
341
+ # entities = doc.pages.first.entities
342
+ # point1 = Geom::Point2d.new(1, 1)
343
+ # point2 = Geom::Point2d.new(2, 2)
344
+ # bounds = Geom::Bounds2d(point1, point2)
345
+ # entities.first.untransformed_bounds = bounds
346
+ #
347
+ # @param [Geom::Bounds2d] bounds
348
+ #
349
+ # @raise [ArgumentError] if the {Layout::Entity} does not have an explicit
350
+ # {Geom::Transformation2d}
351
+ #
352
+ # @raise [ArgumentError] if the bounds are of zero size
353
+ #
354
+ # @raise [LockedEntityError] if the {Layout::Entity} is locked
355
+ #
356
+ # @raise [LockedLayerError] if the {Layout::Entity} is on a locked
357
+ # {Layout::Layer}
358
+ #
359
+ # @version LayOut 2018
360
+ def untransformed_bounds=(bounds)
361
+ end
362
+
363
+ end