sketchup-api-stubs 0.7.10 → 0.8.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 (165) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +12 -0
  3. data/lib/sketchup-api-stubs/stubs/Array.rb +5 -1
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +37 -13
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +25 -15
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +17 -32
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +63 -40
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +145 -109
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +56 -30
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +81 -52
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +45 -31
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +8 -16
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +135 -110
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +212 -224
  16. data/lib/sketchup-api-stubs/stubs/Geom.rb +8 -6
  17. data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +5 -5
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +54 -52
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +13 -8
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
  22. data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
  23. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +125 -11
  24. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
  26. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +112 -4
  27. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +7 -9
  28. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
  29. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +54 -4
  30. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +9 -11
  31. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
  32. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
  33. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
  34. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
  35. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +56 -9
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
  37. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
  38. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +100 -1
  39. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +13 -14
  40. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
  41. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +6 -4
  42. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
  43. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +9 -11
  44. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +7 -10
  45. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +48 -2
  46. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +18 -1
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
  48. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
  49. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
  50. data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
  51. data/lib/sketchup-api-stubs/stubs/Length.rb +9 -1
  52. data/lib/sketchup-api-stubs/stubs/Numeric.rb +1 -1
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +65 -13
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +110 -22
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +18 -12
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +2 -7
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +16 -3
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +13 -13
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +8 -14
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/CRSLocation.rb +402 -0
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/CRSMapUnit.rb +83 -0
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +10 -15
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +2 -2
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +247 -21
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +100 -24
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +7 -12
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +12 -10
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +9 -11
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +23 -21
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +36 -28
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +11 -12
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +11 -14
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +2 -2
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +10 -10
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +237 -49
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +1 -1
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -6
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +10 -3
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -6
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +3 -6
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +104 -33
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +2 -2
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +116 -45
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPattern.rb +277 -0
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPatternData.rb +245 -0
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPatterns.rb +155 -0
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +24 -17
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +11 -9
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +6 -69
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +2 -2
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +2 -2
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +34 -8
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +148 -3
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +20 -8
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +15 -45
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +3 -23
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -9
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +10 -3
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +894 -130
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +39 -26
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +253 -108
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +150 -9
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +14 -11
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +1 -1
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -2
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +17 -44
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +1 -13
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +247 -93
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +58 -31
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +61 -40
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/Procedure.rb +452 -0
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +40 -2
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +31 -1
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +84 -91
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -2
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +22 -16
  140. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
  141. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
  142. data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
  143. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +36 -1
  144. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +59 -13
  145. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +103 -8
  146. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +13 -31
  147. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +9 -9
  148. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +276 -145
  149. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
  150. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +26 -13
  151. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
  152. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +23 -22
  153. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +411 -118
  154. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +34 -8
  155. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +126 -40
  156. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +83 -69
  157. data/lib/sketchup-api-stubs/stubs/String.rb +1 -1
  158. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +120 -153
  159. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +130 -14
  160. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +14 -3
  161. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +20 -3
  162. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +13 -7
  163. data/lib/sketchup-api-stubs/stubs/UI.rb +92 -22
  164. data/lib/sketchup-api-stubs/stubs/_top_level.rb +15 -7
  165. metadata +16 -28
@@ -0,0 +1,234 @@
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # This is the interface to a LayOut dictionary. A {Layout::Dictionary} wraps key/value pairs.
5
+ #
6
+ # @example
7
+ # dict = Layout::Dictionary.new
8
+ #
9
+ # @version LayOut 2026.0
10
+ class Layout::Dictionary
11
+
12
+ # Includes
13
+
14
+ include Enumerable
15
+
16
+ # Instance Methods
17
+
18
+ # The {#[]} method retrieves the value for a given key.
19
+ #
20
+ # @example
21
+ # dictionary = Layout::Dictionary.new
22
+ # dictionary['test'] = 115
23
+ #
24
+ # # value will contain 115
25
+ # value = dictionary["test"]
26
+ #
27
+ # @param [String] key
28
+ # The name of the attribute.
29
+ #
30
+ # @return [String, Boolean, Integer, Float, Layout::Dictionary, nil]
31
+ #
32
+ # @version LayOut 2026.0
33
+ def [](key)
34
+ end
35
+
36
+ # The {#[]=} method sets a value for a given key.
37
+ #
38
+ # Creates a new dictionary entry for the given key if needed.
39
+ #
40
+ # @example
41
+ # dictionary = Layout::Dictionary.new
42
+ # dictionary['test'] = 110
43
+ # value = dictionary['test2'] = 120
44
+ # p value
45
+ #
46
+ # @param [String] key
47
+ # The valid key.
48
+ #
49
+ # @param [String, Boolean, Integer, Float, Hash, Layout::Dictionary, nil] value
50
+ #
51
+ # @version LayOut 2026.0
52
+ def []=(key, value)
53
+ end
54
+
55
+ # The {#delete_key} method deletes a key/value pair from the dictionary.
56
+ #
57
+ # @example
58
+ # dictionary = Layout::Dictionary.new
59
+ # dictionary["attr_one"] = "one"
60
+ # dictionary["attr_two"] = "two"
61
+ #
62
+ # # Delete a key/value pair and get the deleted value.
63
+ # value = dictionary.delete_key("attr_one")
64
+ #
65
+ # @param [String] key
66
+ # The key to be deleted.
67
+ #
68
+ # @return [String, Boolean, Integer, Float, Layout::Dictionary, nil]
69
+ #
70
+ # @version LayOut 2026.0
71
+ def delete_key(key)
72
+ end
73
+
74
+ # The {#each_pair} method is an alias for {#each}.
75
+ #
76
+ # @example
77
+ # dictionary = Layout::Dictionary.new
78
+ # dictionary["attr_one"] = "one"
79
+ # dictionary["attr_two"] = "two"
80
+ #
81
+ # # iterates through all attributes and prints the key to the screen
82
+ # dictionary.each_pair { | key, value |
83
+ # puts "#{key} = #{value}"
84
+ # }
85
+ #
86
+ # @see #each
87
+ #
88
+ # @version LayOut 2026.0
89
+ #
90
+ # @yield [key, value]
91
+ #
92
+ # @yieldparam [String] key
93
+ #
94
+ # @yieldparam [Object] value
95
+ def each
96
+ end
97
+
98
+ # The {#each_key} method iterates through all of the dictionary keys.
99
+ #
100
+ # @example
101
+ # dictionary = Layout::Dictionary.new
102
+ # dictionary["attr_one"] = "one"
103
+ # dictionary["attr_two"] = "two"
104
+ #
105
+ # # iterates through all attributes and prints the key to the screen
106
+ # dictionary.each_key { |key| puts key }
107
+ #
108
+ # @version LayOut 2026.0
109
+ #
110
+ # @yieldparam [String] key
111
+ def each_key
112
+ end
113
+
114
+ # The {#each_pair} method is an alias for {#each}.
115
+ #
116
+ # @example
117
+ # dictionary = Layout::Dictionary.new
118
+ # dictionary["attr_one"] = "one"
119
+ # dictionary["attr_two"] = "two"
120
+ #
121
+ # # iterates through all attributes and prints the key to the screen
122
+ # dictionary.each_pair { | key, value |
123
+ # puts "#{key} = #{value}"
124
+ # }
125
+ #
126
+ # @see #each
127
+ #
128
+ # @version LayOut 2026.0
129
+ #
130
+ # @yield [key, value]
131
+ #
132
+ # @yieldparam [String] key
133
+ #
134
+ # @yieldparam [Object] value
135
+ def each_pair
136
+ end
137
+
138
+ # The {#empty?} method checks if the dictionary is empty.
139
+ #
140
+ # @example
141
+ # dictionary = Layout::Dictionary.new
142
+ # dictionary["attribute_one"] = "1"
143
+ # dictionary.empty? # Returns false
144
+ #
145
+ # @return [Boolean]
146
+ #
147
+ # @version LayOut 2026.0
148
+ def empty?
149
+ end
150
+
151
+ # The {#initialize} method creates a new {Layout::Dictionary}.
152
+ #
153
+ # @example
154
+ # doc = Layout::Dictionary.new
155
+ # doc2 = Layout::Dictionary.new({"String key" => "string value", "Number key" => 42})
156
+ #
157
+ # @overload initialize
158
+ #
159
+ # @return [Layout::Dictionary]
160
+ #
161
+ # @overload initialize(dict)
162
+ #
163
+ # @param [Hash, Layout::Dictionary] hash
164
+ # @return [Layout::Dictionary]
165
+ #
166
+ # @raise [ArgumentError] if dict isn't a dictionary or hash
167
+ #
168
+ # @version LayOut 2026.0
169
+ def initialize(*args)
170
+ end
171
+
172
+ # The {#keys} method retrieves an array with all of the dictionary keys.
173
+ #
174
+ # @example
175
+ # dictionary = Layout::Dictionary.new
176
+ # dictionary["attr_one"] = "one"
177
+ # dictionary["attr_two"] = "two"
178
+ #
179
+ # # Gets an array of keys
180
+ # keys = dictionary.keys
181
+ #
182
+ # @return [Array<String>] an array of keys within the dictionary if successful
183
+ #
184
+ # @version LayOut 2026.0
185
+ def keys
186
+ end
187
+
188
+ # The {#length} method retrieves the size (number of elements) of a dictionary.
189
+ #
190
+ # @example
191
+ # dictionary = Layout::Dictionary.new
192
+ # dictionary['Hello'] = 'World'
193
+ # number = dictionary.length
194
+ #
195
+ # @return [Integer]
196
+ #
197
+ # @see #size
198
+ #
199
+ # @version LayOut 2026.0
200
+ def length
201
+ end
202
+
203
+ # The {#length} method retrieves the size (number of elements) of a dictionary.
204
+ #
205
+ # @example
206
+ # dictionary = Layout::Dictionary.new
207
+ # dictionary['Hello'] = 'World'
208
+ # number = dictionary.length
209
+ #
210
+ # @return [Integer]
211
+ #
212
+ # @see #size
213
+ #
214
+ # @version LayOut 2026.0
215
+ def size
216
+ end
217
+
218
+ # The {#values} method retrieves an array with all of the dictionary values.
219
+ #
220
+ # @example
221
+ # dictionary = Layout::Dictionary.new
222
+ # dictionary["attr_one"] = "one"
223
+ # dictionary["attr_two"] = "two"
224
+ #
225
+ # # Gets an array of values
226
+ # values = dictionary.values
227
+ #
228
+ # @return [Array<Object>] an array of values within the dictionary if successful
229
+ #
230
+ # @version LayOut 2026.0
231
+ def values
232
+ end
233
+
234
+ end
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This is the interface to a LayOut document. A {Layout::Document} is the 2D
@@ -129,10 +129,33 @@ class Layout::Document
129
129
  #
130
130
  # @raise [ArgumentError] if entity already belongs to a {Layout::Document}
131
131
  #
132
+ # @return [Layout::Entity] The {Layout::Entity} that was added to the {Layout::Document}.
133
+ #
132
134
  # @version LayOut 2018
133
135
  def add_entity(*args)
134
136
  end
135
137
 
138
+ # The {#attribute_dictionary} method returns a copy of the document's attribute dictionary with the
139
+ # given name.
140
+ #
141
+ # is no attribute dictionary
142
+ #
143
+ # @example
144
+ # doc = Layout::Document.open("C:/path/to/document.layout")
145
+ # doc.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
146
+ # attributes = doc.attribute_dictionary("jane_doe_doc_maker")
147
+ # # Adding to this Layout::Dictionary does not apply to the document's attribute dictionary, use
148
+ # #Layout::Document#set_attribute.
149
+ # attributes.merge!(doc_id: 42)
150
+ #
151
+ # @param [String] name
152
+ #
153
+ # @return [Layout::Dictionary, nil] A copy of the document's attribute dictionary, or nil if there
154
+ #
155
+ # @version LayOut 2026.0
156
+ def attribute_dictionary(name)
157
+ end
158
+
136
159
  # The {#auto_text_definitions} method returns an array of
137
160
  # {Layout::AutoTextDefinition}'s in the {Layout::Document}.
138
161
  #
@@ -146,6 +169,33 @@ class Layout::Document
146
169
  def auto_text_definitions
147
170
  end
148
171
 
172
+ # The {#delete_attribute} method is used to delete an attribute from a document.
173
+ #
174
+ # @overload delete_attribute(dictionary_name)
175
+ #
176
+ # @param [String] dictionary_name The name of an attribute dictionary.
177
+ # @return [Boolean]
178
+ #
179
+ # @example
180
+ # doc = Layout::Document.open("C:/path/to/document.layout")
181
+ # doc.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
182
+ # doc.delete_attribute("jane_doe_doc_maker")
183
+ #
184
+ # @overload delete_attribute(dictionary_name, key)
185
+ #
186
+ # @param [String] dictionary_name The name of an attribute dictionary.
187
+ # @param [String] key An attribute key.
188
+ # @return [Boolean]
189
+ #
190
+ # @example
191
+ # doc = Layout::Document.open("C:/path/to/document.layout")
192
+ # doc.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
193
+ # doc.delete_attribute("jane_doe_doc_maker", "made_by_doc_maker")
194
+ #
195
+ # @version LayOut 2026.0
196
+ def delete_attribute(*args)
197
+ end
198
+
149
199
  # The {#export} method exports the {Layout::Document} to a given file format.
150
200
  # It knows which format to export based on the file extension you place on the
151
201
  # file name. For example, a filename of "thing.pdf" will export a PDF file,
@@ -157,47 +207,64 @@ class Layout::Document
157
207
  # doc = Layout::Document.open("c:/path/to/document.layout")
158
208
  #
159
209
  # # Export pdf file on a PC, with default settings.
160
- # status = doc.export("c:/my_export.pdf")
210
+ # doc.export("c:/my_export.pdf")
161
211
  #
162
212
  # # Export pages one through three at high quality, compressing jpeg images
163
213
  # # at 0.75 compression quality (valid range is 0.0 - 1.0). Note that the
164
214
  # # first page of a {Layout::Document} is index 0.
165
215
  # options = { start_page: 1,
166
216
  # end_page: 3,
167
- # compress_images: TRUE,
217
+ # compress_images: true,
168
218
  # compress_quality: 0.75 }
169
219
  #
170
- # status = doc.export("c:/my_export.pdf", options)
220
+ # doc.export("c:/my_export.pdf", options)
171
221
  #
172
222
  # # Export pages one and three through five. Note that page_range starts at
173
223
  # # index 1.
174
224
  # # `page_range` support added in LayOut 2024.0.
175
225
  # options = { page_range: "1,3-5",
176
- # compress_images: TRUE,
226
+ # compress_images: true,
177
227
  # compress_quality: 0.75 }
178
228
  #
179
- # status = doc.export("c:/my_export.pdf", options)
229
+ # doc.export("c:/my_export.pdf", options)
180
230
  #
181
231
  # @example Image Set Export Examples
182
232
  # doc = Layout::Document.open("c:/path/to/document.layout")
183
233
  #
184
234
  # # Export png files on macOS, with default settings.
185
- # status = doc.export("/Users/<username>/Desktop/pngs/page.png")
235
+ # doc.export("/Users/<username>/Desktop/pngs/page.png")
186
236
  #
187
237
  # # Export pages one through three at 300 dpi as JPGs.
188
238
  # options = { start_page: 1,
189
239
  # end_page: 3,
190
240
  # dpi: 300 }
191
- # status = doc.export('c:/page.jpg', options)
241
+ # doc.export('c:/page.jpg', options)
192
242
  #
193
243
  # # Export pages one and three through five. Note that page_range starts at
194
244
  # # index 1.
195
245
  # # `page_range` support added in LayOut 2024.0.
196
246
  # options = { page_range: "1,3-5",
197
- # compress_images: TRUE,
247
+ # compress_images: true,
198
248
  # compress_quality: 0.75 }
199
249
  #
200
- # status = doc.export("c:/my_export.png", options)
250
+ # doc.export("c:/my_export.png", options)
251
+ #
252
+ # @option options [Integer] :start_page The first page to export.
253
+ #
254
+ # @option options [Integer] :end_page The last page to export.
255
+ #
256
+ # @option options [String] :page_range A string specifying the range of pages to export. The
257
+ # format can include individual page numbers and ranges of pages, separated by commas (e.g.,
258
+ # "1,3-5"). This was added in LayOut 2024.0
259
+ #
260
+ # @option options [Boolean] :compress_images Whether to compress images in the document. This is
261
+ # valid only for image compression for PDF exports.
262
+ #
263
+ # @option options [Float] :compress_quality The compression quality for JPEG images. This is
264
+ # valid only for the quality of the compression of images for PDF exports.
265
+ #
266
+ # @option options [Integer] :dpi The resolution in dots per inch for the exported images. This
267
+ # option is only valid for image exports.
201
268
  #
202
269
  # @param [String] file_path
203
270
  # The file or image set to create. The directory
@@ -218,6 +285,37 @@ class Layout::Document
218
285
  def export(file_path, options = nil)
219
286
  end
220
287
 
288
+ # The {#get_attribute} method is used to retrieve the value of an attribute in
289
+ # the document's attribute dictionary.
290
+ #
291
+ # If the third parameter, +default_value+, is not passed and there is no
292
+ # attribute that matches the given name, it returns +nil+.
293
+ #
294
+ # If +default_value+ is provided and there is no matching attribute it returns
295
+ # the given value. It does not create an attribute with that name though.
296
+ #
297
+ # @example
298
+ # doc = Layout::Document.open("C:/path/to/document.layout")
299
+ # # Read an attribute value from the document. In this case this will return the
300
+ # # default value provided: 42.
301
+ # doc.get_attribute("jane_doe_doc_maker", "doc_id", 42)
302
+ #
303
+ # @param [String] name
304
+ # The name of an attribute dictionary.
305
+ #
306
+ # @param [String] key
307
+ # An attribute key.
308
+ #
309
+ # @param [String, Boolean, Integer, Float, Hash, Layout::Dictionary, nil] default_value
310
+ # A default
311
+ # value to return if no attribute is found.
312
+ #
313
+ # @return [String, Boolean, Integer, Float, Layout::Dictionary, nil] the retrieved value.
314
+ #
315
+ # @version LayOut 2026.0
316
+ def get_attribute(name, key, default_value = nil)
317
+ end
318
+
221
319
  # The {#grid} method returns the {Layout::Grid} for a {Layout::Document}.
222
320
  #
223
321
  # @example
@@ -470,7 +568,7 @@ class Layout::Document
470
568
  # @overload save
471
569
  #
472
570
  # @raise [ArgumentError] if the {Layout::Document} hasn't been saved with a
473
- # path yet
571
+ # path yet
474
572
  #
475
573
  # @overload save(path, version = Layout::Document::VERSION_CURRENT)
476
574
  #
@@ -486,6 +584,22 @@ class Layout::Document
486
584
  def save(*args)
487
585
  end
488
586
 
587
+ # The {#set_attribute} method adds an attribute to the document's attribute dictionary.
588
+ #
589
+ # @example
590
+ # doc = Layout::Document.open("C:/path/to/document.layout")
591
+ # doc.set_attribute "jane_doe_doc_maker", "doc_id", 42
592
+ #
593
+ # @param [String] name
594
+ # The name of an attribute dictionary.
595
+ # @param [String] key An attribute key.
596
+ # @param [String, Boolean, Integer, Float, Hash, Layout::Dictionary, nil] value The value for the
597
+ # attribute.
598
+ #
599
+ # @version LayOut 2026.0
600
+ def set_attribute(name, key, value)
601
+ end
602
+
489
603
  # The {#shared_entities} method returns the {Layout::Entities}
490
604
  # that exist on shared {Layout::Layer}s in the {Layout::Document}.
491
605
  #
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A simple elliptical shape entity.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Entities class is a container class for {Layout::Entity}s. A
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # An entity is an object shown on a page of a LayOut document.
@@ -34,6 +34,28 @@ class Layout::Entity
34
34
  def ==(other)
35
35
  end
36
36
 
37
+ # The {#attribute_dictionary} method returns a copy of the entity's attribute dictionary with the
38
+ # given name.
39
+ #
40
+ # no attribute dictionary
41
+ #
42
+ # @example
43
+ # doc = Layout::Document.open("C:/path/to/document.layout")
44
+ # entity = doc.pages.first.entities.first
45
+ # entity.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
46
+ # attributes = entity.attribute_dictionary("jane_doe_doc_maker")
47
+ # # Adding to this Layout::Dictionary does not apply to the entity's attribute dictionary, use
48
+ # #Layout::Entity#set_attribute.
49
+ # attributes.merge!(doc_id: 42)
50
+ #
51
+ # @param [String] name
52
+ #
53
+ # @return [Layout::Dictionary, nil] A copy of the entity's attribute dictionary, or nil if there is
54
+ #
55
+ # @version LayOut 2026.0
56
+ def attribute_dictionary(name)
57
+ end
58
+
37
59
  # The {#bounds} method returns the 2D rectangular bounds of the {Layout::Entity}.
38
60
  #
39
61
  # @example
@@ -47,6 +69,35 @@ class Layout::Entity
47
69
  def bounds
48
70
  end
49
71
 
72
+ # The {#delete_attribute} method is used to delete an attribute from an entity.
73
+ #
74
+ # @overload delete_attribute(dictionary_name)
75
+ #
76
+ # @param [String] dictionary_name The name of an attribute dictionary.
77
+ # @return [Boolean]
78
+ #
79
+ # @example
80
+ # doc = Layout::Document.open("C:/path/to/document.layout")
81
+ # entity = doc.pages.first.entities.first
82
+ # entity.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
83
+ # entity.delete_attribute("jane_doe_doc_maker")
84
+ #
85
+ # @overload delete_attribute(dictionary_name, key)
86
+ #
87
+ # @param [String] dictionary_name The name of an attribute dictionary.
88
+ # @param [String] key An attribute key.
89
+ # @return [Boolean]
90
+ #
91
+ # @example
92
+ # doc = Layout::Document.open("C:/path/to/document.layout")
93
+ # entity = doc.pages.first.entities.first
94
+ # entity.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
95
+ # entity.delete_attribute("jane_doe_doc_maker", "made_by_doc_maker")
96
+ #
97
+ # @version LayOut 2026.0
98
+ def delete_attribute(*args)
99
+ end
100
+
50
101
  # The {#document} method returns the {Layout::Document} that the
51
102
  # {Layout::Entity} belongs to, or +nil+ if it is not in a {Layout::Document}.
52
103
  #
@@ -76,6 +127,38 @@ class Layout::Entity
76
127
  def drawing_bounds
77
128
  end
78
129
 
130
+ # The {#get_attribute} method is used to retrieve the value of an attribute in
131
+ # the entity's attribute dictionary.
132
+ #
133
+ # If the third parameter, +default_value+, is not passed and there is no
134
+ # attribute that matches the given name, it returns +nil+.
135
+ #
136
+ # If +default_value+ is provided and there is no matching attribute it returns
137
+ # the given value. It does not create an attribute with that name though.
138
+ #
139
+ # @example
140
+ # doc = Layout::Document.open("C:/path/to/document.layout")
141
+ # entity = doc.pages.first.entities.first
142
+ # # Read an attribute value from the entity. In this case this will return the
143
+ # # default value provided: 42.
144
+ # entity.get_attribute("jane_doe_doc_maker", "doc_id", 42)
145
+ #
146
+ # @param [String] name
147
+ # The name of an attribute dictionary.
148
+ #
149
+ # @param [String] key
150
+ # An attribute key.
151
+ #
152
+ # @param [String, Boolean, Integer, Float, Hash, Layout::Dictionary, nil] default_value
153
+ # A default
154
+ # value to return if no attribute is found.
155
+ #
156
+ # @return [String, Boolean, Integer, Float, Layout::Dictionary, nil] the retrieved value.
157
+ #
158
+ # @version LayOut 2026.0
159
+ def get_attribute(name, key, default_value = nil)
160
+ end
161
+
79
162
  # The {#group} method returns the {Layout::Group} the {Layout::Entity} belongs
80
163
  # to, or +nil+ if it is not in a {Layout::Group}.
81
164
  #
@@ -145,9 +228,12 @@ class Layout::Entity
145
228
  #
146
229
  # @example
147
230
  # doc = Layout::Document.open("C:/path/to/document.layout")
148
- # entities = doc.pages.first.entities
149
- # new_group = Layout::Group.new
150
- # entities.first.move_to_group(new_group)
231
+ # # We consider that there are two rectangle objects in the entities.
232
+ # entities = doc.layers.first.layer_instance(doc.pages.first).entities
233
+ # # We move the first rectangle to a new group.
234
+ # group = Layout::Group.new([entities.first])
235
+ # # We move the second rectangle to the same group.
236
+ # entities[1].first.move_to_group(new_group)
151
237
  #
152
238
  # @param [Layout::Group] group
153
239
  #
@@ -246,6 +332,23 @@ class Layout::Entity
246
332
  def page
247
333
  end
248
334
 
335
+ # The {#set_attribute} method adds an attribute to the entity's attribute dictionary.
336
+ #
337
+ # @example
338
+ # doc = Layout::Document.open("C:/path/to/document.layout")
339
+ # entity = doc.pages.first.entities.first
340
+ # entity.set_attribute("jane_doe_doc_maker", "doc_id", 42)
341
+ #
342
+ # @param [String] name
343
+ # The name of an attribute dictionary.
344
+ # @param [String] key An attribute key.
345
+ # @param [String, Boolean, Integer, Float, Hash, Layout::Dictionary, nil] value The value for the
346
+ # attribute.
347
+ #
348
+ # @version LayOut 2026.0
349
+ def set_attribute(name, key, value)
350
+ end
351
+
249
352
  # The {#style} method returns the {Layout::Style} of the {Layout::Entity}. If
250
353
  # the {Layout::Entity} is a {Layout::Group}, +nil+ will be returned, as they
251
354
  # do not have a {Layout::Style}.
@@ -283,6 +386,9 @@ class Layout::Entity
283
386
  # transform = Geom::Transformation2d.new([1.0, 0.0, 0.0, 1.0, 1.0, 1.0])
284
387
  # entity = entities.first.transform!(transform)
285
388
  #
389
+ # @note Since LayOut 2026.1, passing a non-invertible transformation raises
390
+ # an `ArgumentError`.
391
+ #
286
392
  # @param [Geom::Transformation2d] transformation
287
393
  #
288
394
  # @raise [LockedLayerError] if the {Layout::Entity} is on a locked
@@ -290,6 +396,8 @@ class Layout::Entity
290
396
  #
291
397
  # @raise [LockedEntityError] if the {Layout::Entity} is locked
292
398
  #
399
+ # @raise [ArgumentError] if the transformation matrix is not invertible
400
+ #
293
401
  # @version LayOut 2018
294
402
  def transform!(transformation)
295
403
  end
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A formatted text entity.
@@ -37,11 +37,10 @@ class Layout::FormattedText < Layout::Entity
37
37
  # [+ANCHOR_TYPE_CENTER_CENTER+]
38
38
  # [+ANCHOR_TYPE_BOTTOM_CENTER+]
39
39
  #
40
- # Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT)
41
- #
42
40
  # @example
43
41
  # anchor = Geom::Point2d.new(1, 1)
44
42
  # text = Layout::FormattedText.new("C:/Test.txt", anchor,
43
+ # Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT)
45
44
  #
46
45
  # @overload new_from_file(path, bounds)
47
46
  #
@@ -132,12 +131,12 @@ class Layout::FormattedText < Layout::Entity
132
131
  # The {#display_text} method returns the display text representation of the
133
132
  # {Layout::FormattedText}.
134
133
  #
135
- # Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT) doc.add_entity(text, doc.layers.first,
136
- # doc.pages.first) text = text.display_text(doc.pages.first)
137
- #
138
134
  # @example
139
135
  # anchor = Geom::Point2d.new(1, 1)
140
136
  # text = Layout::FormattedText.new("<PageNumber>", anchor,
137
+ # Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT)
138
+ # doc.add_entity(text, doc.layers.first, doc.pages.first)
139
+ # text = text.display_text(doc.pages.first)
141
140
  #
142
141
  # @note Passing an invalid {Layout::Page} will prevent an auto-text tag from
143
142
  # being substituted with its display representation.
@@ -306,12 +305,11 @@ class Layout::FormattedText < Layout::Entity
306
305
  # The {#rtf=} method sets the raw RTF representation of the
307
306
  # {Layout::FormattedText}.
308
307
  #
309
- # text.\par}"
310
- #
311
308
  # @example
312
309
  # anchor = Geom::Point2d.new(1, 1)
313
310
  # text = Layout::FormattedText.new("Test", anchor, Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT)
314
- # text.rtf = "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard This is some {\b bold}
311
+ # text.rtf = "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard " \
312
+ # "This is some {\b bold} text.\par}"
315
313
  #
316
314
  # @param [String] rtf_text
317
315
  #
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Class that references a {Layout::Document}'s grid settings.