sketchup-api-stubs 0.7.2 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +3 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +15 -11
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +5 -6
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +18 -18
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +27 -10
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +61 -5
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +189 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +9 -4
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +6 -2
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +148 -5
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +6 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +32 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +110 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +24 -11
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +24 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +58 -57
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +16 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +135 -39
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +3 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +10 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +8 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +55 -26
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +20 -15
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +9 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +232 -65
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +98 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +48 -41
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +60 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +47 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +11 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +33 -21
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +5 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +115 -68
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +225 -29
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +118 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +2 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +8 -10
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +16 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +9 -11
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +126 -73
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +5 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +143 -40
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +22 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +37 -15
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +5 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +10 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +20 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +9 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +14 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +31 -25
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +32 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +73 -67
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +13 -6
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +132 -10
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +94 -54
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +3 -1
- data/lib/sketchup-api-stubs/stubs/array.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/geom.rb +4 -1
- data/lib/sketchup-api-stubs/stubs/languagehandler.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/length.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/numeric.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/sketchup.rb +66 -23
- data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/string.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/ui.rb +17 -12
- metadata +5 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The AutoTextDefinitions class is a container class for all
|
@@ -88,6 +88,11 @@ class Layout::AutoTextDefinitions
|
|
88
88
|
# puts auto_text.name
|
89
89
|
# }
|
90
90
|
#
|
91
|
+
# @note Don't remove content from this collection while iterating over it with
|
92
|
+
# {#each}. This would change the size of the collection and cause elements to
|
93
|
+
# be skipped as the indices change. Instead copy the current collection to an
|
94
|
+
# array using +to_a+ and then use +each+ on the array, when removing content.
|
95
|
+
#
|
91
96
|
# @version LayOut 2018
|
92
97
|
#
|
93
98
|
# @yieldparam [Layout::AutoTextDefinition] auto_text
|
@@ -129,6 +134,7 @@ class Layout::AutoTextDefinitions
|
|
129
134
|
# @version LayOut 2018
|
130
135
|
def length
|
131
136
|
end
|
137
|
+
alias_method :size, :length
|
132
138
|
|
133
139
|
# The {#remove} method removes an {Layout::AutoTextDefinition} from the
|
134
140
|
# {Layout::Document}.
|
@@ -170,17 +176,4 @@ class Layout::AutoTextDefinitions
|
|
170
176
|
def remove(*args)
|
171
177
|
end
|
172
178
|
|
173
|
-
# The {#length} method returns the number of {Layout::AutoTextDefinition}s.
|
174
|
-
#
|
175
|
-
# @example
|
176
|
-
# doc = Layout::Document.open("C:/path/to/document.layout")
|
177
|
-
# auto_texts = doc.auto_text_definitions
|
178
|
-
# num_auto_texts = auto_texts.length
|
179
|
-
#
|
180
|
-
# @return [Integer]
|
181
|
-
#
|
182
|
-
# @version LayOut 2018
|
183
|
-
def size
|
184
|
-
end
|
185
|
-
|
186
179
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 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
|
@@ -46,6 +46,7 @@ class Layout::Document
|
|
46
46
|
VERSION_2018 = nil # Stub value.
|
47
47
|
VERSION_2019 = nil # Stub value.
|
48
48
|
VERSION_2020 = nil # Stub value.
|
49
|
+
VERSION_2021 = nil # Stub value.
|
49
50
|
VERSION_3 = nil # Stub value.
|
50
51
|
VERSION_CURRENT = nil # Stub value.
|
51
52
|
|
@@ -143,6 +144,61 @@ class Layout::Document
|
|
143
144
|
def auto_text_definitions
|
144
145
|
end
|
145
146
|
|
147
|
+
# The {#export} method exports the {Layout::Document} to a given file format.
|
148
|
+
# It knows which format to export based on the file extension you place on the
|
149
|
+
# file name. For example, a filename of "thing.pdf" will export a PDF file,
|
150
|
+
# whereas "thing.png" will export a set of PNG images.
|
151
|
+
#
|
152
|
+
# For LayOut version 2020.1, valid extensions include .pdf, .jpg, and .png.
|
153
|
+
#
|
154
|
+
# @example PDF Export Examples
|
155
|
+
# doc = Layout::Document.open("c:/path/to/document.layout")
|
156
|
+
#
|
157
|
+
# # Export pdf file on a PC, with default settings.
|
158
|
+
# status = doc.export("c:/my_export.pdf")
|
159
|
+
#
|
160
|
+
# # Export pages one through three at high quality, compressing jpeg images
|
161
|
+
# # at 0.75 compression quality (valid range is 0.0 - 1.0). Note that the
|
162
|
+
# # first page of a {Layout::Document} is index 0.
|
163
|
+
# options = { start_page: 1,
|
164
|
+
# end_page: 3,
|
165
|
+
# output_resolution: Layout::PageInfo::RESOLUTION_HIGH,
|
166
|
+
# compress_images: TRUE,
|
167
|
+
# compress_quality: 0.75 }
|
168
|
+
#
|
169
|
+
# status = doc.export("c:/my_export.pdf", options)
|
170
|
+
#
|
171
|
+
# @example Image Set Export Examples
|
172
|
+
# doc = Layout::Document.open("c:/path/to/document.layout")
|
173
|
+
#
|
174
|
+
# # Export png files on macOS, with default settings.
|
175
|
+
# status = doc.export('/Users/username/Desktop/pngs/page.png')
|
176
|
+
#
|
177
|
+
# # Export pages one through three at 300 dpi as JPGs.
|
178
|
+
# options = { start_page: 1,
|
179
|
+
# end_page: 3,
|
180
|
+
# dpi: 300 }
|
181
|
+
# status = doc.export('c:/page.jpg', options)
|
182
|
+
#
|
183
|
+
# @param [String] file_path
|
184
|
+
# The file or image set to create. The directory
|
185
|
+
# path must already exist. The path must include the file extension.
|
186
|
+
#
|
187
|
+
# @param [Hash, nil] options
|
188
|
+
# An optional hash of settings for the export.
|
189
|
+
#
|
190
|
+
# @raise [TypeError] if an options value is the wrong type
|
191
|
+
#
|
192
|
+
# @raise [RangeError] if an options value is out of range
|
193
|
+
#
|
194
|
+
# @raise [ArgumentError] if the full file path does not exist
|
195
|
+
#
|
196
|
+
# @raise [ArgumentError] if the specified file type is missing or not supported
|
197
|
+
#
|
198
|
+
# @version LayOut 2020.1
|
199
|
+
def export(file_path, options = nil)
|
200
|
+
end
|
201
|
+
|
146
202
|
# The {#grid} method returns the {Layout::Grid} for a {Layout::Document}.
|
147
203
|
#
|
148
204
|
# @example
|
@@ -347,15 +403,15 @@ class Layout::Document
|
|
347
403
|
# @example
|
348
404
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
349
405
|
# # Save the model using the current Layout format
|
350
|
-
#
|
351
|
-
# status = doc.save(
|
406
|
+
# path = File.join(ENV['Home'], 'Desktop', 'mydoc.layout')
|
407
|
+
# status = doc.save(path)
|
352
408
|
# # Save the document to the current file using the current LayOut format
|
353
409
|
# status = doc.save
|
354
410
|
# # Save the document to the current file in LayOut 3 format
|
355
411
|
# status = doc.save(Layout::Document::VERSION_3)
|
356
412
|
# # Save the document in LayOut 2013 format
|
357
|
-
#
|
358
|
-
# status = doc.save(
|
413
|
+
# path = File.join(ENV['Home'], 'Desktop', 'mydoc_v2013.layout')
|
414
|
+
# status = doc.save(path, Layout::Document::VERSION_2013)
|
359
415
|
#
|
360
416
|
# @overload save
|
361
417
|
#
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 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
|
@@ -86,6 +86,11 @@ class Layout::Entities
|
|
86
86
|
# puts entity
|
87
87
|
# }
|
88
88
|
#
|
89
|
+
# @note Don't remove content from this collection while iterating over it with
|
90
|
+
# {#each}. This would change the size of the collection and cause elements to
|
91
|
+
# be skipped as the indices change. Instead copy the current collection to an
|
92
|
+
# array using +to_a+ and then use +each+ on the array, when removing content.
|
93
|
+
#
|
89
94
|
# @param [Hash{Symbol => Boolean}] flags
|
90
95
|
# A hash that allows skipping of
|
91
96
|
# {Layout::Entity}s on hidden or locked {Layout::Layers}
|
@@ -108,6 +113,7 @@ class Layout::Entities
|
|
108
113
|
# @version LayOut 2018
|
109
114
|
def length
|
110
115
|
end
|
116
|
+
alias_method :size, :length
|
111
117
|
|
112
118
|
# The {#reverse_each} method iterates through all of the {Layout::Entity}s in
|
113
119
|
# reverse order. When iterating over a {Layout::LayerInstance}'s
|
@@ -139,17 +145,4 @@ class Layout::Entities
|
|
139
145
|
def reverse_each(*args)
|
140
146
|
end
|
141
147
|
|
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
148
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# Class that references a {Layout::Document}'s grid settings.
|
@@ -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
|
#
|