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.
- checksums.yaml +4 -4
- data/SketchUp/Geom/BoundingBox.rb +17 -20
- data/SketchUp/Geom/Bounds2d.rb +172 -0
- data/SketchUp/Geom/LatLong.rb +31 -16
- data/SketchUp/Geom/OrientedBounds2d.rb +102 -0
- data/SketchUp/Geom/Point2d.rb +365 -0
- data/SketchUp/Geom/Point3d.rb +121 -110
- data/SketchUp/Geom/PolygonMesh.rb +30 -21
- data/SketchUp/Geom/Transformation.rb +8 -4
- data/SketchUp/Geom/Transformation2d.rb +125 -0
- data/SketchUp/Geom/UTM.rb +43 -37
- data/SketchUp/Geom/Vector2d.rb +497 -0
- data/SketchUp/Geom/Vector3d.rb +143 -131
- data/SketchUp/Layout.rb +25 -0
- data/SketchUp/Layout/AngularDimension.rb +569 -0
- data/SketchUp/Layout/AutoTextDefinition.rb +417 -0
- data/SketchUp/Layout/AutoTextDefinitions.rb +186 -0
- data/SketchUp/Layout/ConnectionPoint.rb +70 -0
- data/SketchUp/Layout/Document.rb +458 -0
- data/SketchUp/Layout/Ellipse.rb +29 -0
- data/SketchUp/Layout/Entities.rb +155 -0
- data/SketchUp/Layout/Entity.rb +363 -0
- data/SketchUp/Layout/FormattedText.rb +349 -0
- data/SketchUp/Layout/Grid.rb +131 -0
- data/SketchUp/Layout/Group.rb +261 -0
- data/SketchUp/Layout/Image.rb +86 -0
- data/SketchUp/Layout/Label.rb +371 -0
- data/SketchUp/Layout/Layer.rb +222 -0
- data/SketchUp/Layout/LayerInstance.rb +128 -0
- data/SketchUp/Layout/Layers.rb +232 -0
- data/SketchUp/Layout/LinearDimension.rb +563 -0
- data/SketchUp/Layout/LockedEntityError.rb +10 -0
- data/SketchUp/Layout/LockedLayerError.rb +11 -0
- data/SketchUp/Layout/Page.rb +187 -0
- data/SketchUp/Layout/PageInfo.rb +393 -0
- data/SketchUp/Layout/Pages.rb +216 -0
- data/SketchUp/Layout/Path.rb +326 -0
- data/SketchUp/Layout/Rectangle.rb +174 -0
- data/SketchUp/Layout/SketchUpModel.rb +522 -0
- data/SketchUp/Layout/Style.rb +1520 -0
- data/SketchUp/Layout/Table.rb +290 -0
- data/SketchUp/Layout/TableCell.rb +149 -0
- data/SketchUp/Layout/TableColumn.rb +139 -0
- data/SketchUp/Layout/TableRow.rb +135 -0
- data/SketchUp/Sketchup/Animation.rb +7 -4
- data/SketchUp/Sketchup/ArcCurve.rb +10 -10
- data/SketchUp/Sketchup/AttributeDictionaries.rb +13 -4
- data/SketchUp/Sketchup/AttributeDictionary.rb +12 -12
- data/SketchUp/Sketchup/Color.rb +68 -78
- data/SketchUp/Sketchup/ComponentDefinition.rb +60 -60
- data/SketchUp/Sketchup/ComponentInstance.rb +57 -55
- data/SketchUp/Sketchup/DefinitionList.rb +34 -17
- data/SketchUp/Sketchup/Drawingelement.rb +19 -21
- data/SketchUp/Sketchup/Edge.rb +22 -24
- data/SketchUp/Sketchup/Entities.rb +173 -162
- data/SketchUp/Sketchup/Entity.rb +71 -55
- data/SketchUp/Sketchup/Face.rb +45 -44
- data/SketchUp/Sketchup/Group.rb +47 -49
- data/SketchUp/Sketchup/Image.rb +16 -0
- data/SketchUp/Sketchup/ImageRep.rb +226 -0
- data/SketchUp/Sketchup/InstancePath.rb +13 -13
- data/SketchUp/Sketchup/Layer.rb +15 -17
- data/SketchUp/Sketchup/Material.rb +40 -30
- data/SketchUp/Sketchup/Materials.rb +40 -22
- data/SketchUp/Sketchup/Menu.rb +5 -5
- data/SketchUp/Sketchup/Model.rb +230 -228
- data/SketchUp/Sketchup/Page.rb +32 -0
- data/SketchUp/Sketchup/Pages.rb +3 -4
- data/SketchUp/Sketchup/RenderingOptions.rb +21 -16
- data/SketchUp/Sketchup/SectionPlane.rb +64 -0
- data/SketchUp/Sketchup/Selection.rb +20 -28
- data/SketchUp/Sketchup/ShadowInfo.rb +14 -14
- data/SketchUp/Sketchup/Text.rb +24 -26
- data/SketchUp/Sketchup/Texture.rb +28 -12
- data/SketchUp/Sketchup/Vertex.rb +14 -11
- data/SketchUp/Sketchup/View.rb +126 -116
- data/SketchUp/UI/Command.rb +17 -17
- data/SketchUp/UI/HtmlDialog.rb +8 -5
- data/SketchUp/UI/Notification.rb +1 -1
- data/SketchUp/UI/Toolbar.rb +13 -14
- data/SketchUp/UI/WebDialog.rb +55 -59
- data/SketchUp/_top_level.rb +139 -27
- data/SketchUp/{Array.rb → array.rb} +167 -30
- data/SketchUp/{Geom.rb → geom.rb} +9 -7
- data/SketchUp/{LanguageHandler.rb → languagehandler.rb} +15 -15
- data/SketchUp/{Length.rb → length.rb} +15 -15
- data/SketchUp/{Numeric.rb → numeric.rb} +19 -19
- data/SketchUp/sketchup.rb +167 -156
- data/SketchUp/{SketchupExtension.rb → sketchupextension.rb} +27 -27
- data/SketchUp/{String.rb → string.rb} +1 -1
- data/SketchUp/ui.rb +113 -87
- metadata +46 -9
@@ -0,0 +1,10 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# This is raised whenever a method attempts to modify any {Layout::Entity}
|
5
|
+
# that is individually locked.
|
6
|
+
#
|
7
|
+
# @version LayOut 2018
|
8
|
+
class Layout::LockedEntityError < ArgError
|
9
|
+
|
10
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# This is raised whenever a method attempts to modify any {Layout::Entity}
|
5
|
+
# that resides on a locked {Layout::Layer}, or when attempting to change the
|
6
|
+
# shared attribute of a locked {Layout::Layer}.
|
7
|
+
#
|
8
|
+
# @version LayOut 2018
|
9
|
+
class Layout::LockedLayerError < ArgError
|
10
|
+
|
11
|
+
end
|
@@ -0,0 +1,187 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# Class for a single page in a LayOut document.
|
5
|
+
#
|
6
|
+
# @version LayOut 2018
|
7
|
+
class Layout::Page
|
8
|
+
|
9
|
+
# Instance Methods
|
10
|
+
|
11
|
+
# The {#==} method checks to see if the two {Layout::Page}s are equal.
|
12
|
+
# This checks whether the Ruby Objects are pointing to the same internal
|
13
|
+
# object.
|
14
|
+
#
|
15
|
+
# @example
|
16
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
17
|
+
# document = doc.pages.first.document
|
18
|
+
# doc.pages.first == document.pages.first
|
19
|
+
#
|
20
|
+
# @param [Layout::Page] other
|
21
|
+
#
|
22
|
+
# @return [Boolean]
|
23
|
+
#
|
24
|
+
# @version LayOut 2018
|
25
|
+
def ==(other)
|
26
|
+
end
|
27
|
+
|
28
|
+
# The {#document} method returns the {Layout::Document} that the {Layout::Page}
|
29
|
+
# belongs to.
|
30
|
+
#
|
31
|
+
# @example
|
32
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
33
|
+
# first_page = doc.pages.first
|
34
|
+
# # page_doc should reference the same document as doc
|
35
|
+
# page_doc = first_page.document
|
36
|
+
#
|
37
|
+
# @return [Layout::Document]
|
38
|
+
#
|
39
|
+
# @version LayOut 2018
|
40
|
+
def document
|
41
|
+
end
|
42
|
+
|
43
|
+
# The {#entities} method returns all {Layout::Entity}s that are on the
|
44
|
+
# {Layout::Page}. This is the equivalent of iterating over all
|
45
|
+
# {Layout::LayerInstance}s and using {Layout::LayerInstance.entities}.
|
46
|
+
#
|
47
|
+
# @example
|
48
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
49
|
+
# first_page = doc.pages.first
|
50
|
+
# entities = first_page.entities
|
51
|
+
#
|
52
|
+
# @return [Layout::Entities]
|
53
|
+
#
|
54
|
+
# @version LayOut 2018
|
55
|
+
def entities
|
56
|
+
end
|
57
|
+
|
58
|
+
# The {#in_presentation=} method sets whether the {Layout::Page} is included in
|
59
|
+
# presentations.
|
60
|
+
#
|
61
|
+
# @example
|
62
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
63
|
+
# first_page = doc.pages.first
|
64
|
+
# first_page.in_presentation = true
|
65
|
+
#
|
66
|
+
# @param [Boolean] in_presentation
|
67
|
+
#
|
68
|
+
# @version LayOut 2018
|
69
|
+
def in_presentation=(in_presentation)
|
70
|
+
end
|
71
|
+
|
72
|
+
# The {#in_presentation?} method returns whether the {Layout::Page} is included
|
73
|
+
# in presentations.
|
74
|
+
#
|
75
|
+
# @example
|
76
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
77
|
+
# first_page = doc.pages.first
|
78
|
+
# in_presentation = first_page.in_presentation?
|
79
|
+
#
|
80
|
+
# @return [Boolean]
|
81
|
+
#
|
82
|
+
# @return [Boolean]
|
83
|
+
#
|
84
|
+
# @version LayOut 2018
|
85
|
+
def in_presentation?
|
86
|
+
end
|
87
|
+
|
88
|
+
# The {#layer_instances} method returns an array of the {Layout::LayerInstance}s
|
89
|
+
# for the {Layout::Page}.
|
90
|
+
#
|
91
|
+
# @example
|
92
|
+
# # An example of page.layer_instances
|
93
|
+
#
|
94
|
+
# @return [Array<Layout::LayerInstance>]
|
95
|
+
#
|
96
|
+
# @version LayOut 2018
|
97
|
+
def layer_instances
|
98
|
+
end
|
99
|
+
|
100
|
+
# The {#layer_visible?} method returns whether a {Layout::Layer} is visible
|
101
|
+
# on the {Layout::Page}.
|
102
|
+
#
|
103
|
+
# @example
|
104
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
105
|
+
# first_page = doc.pages.first
|
106
|
+
# layer = doc.layers.first
|
107
|
+
# visible = first_page.layer_visible?(layer)
|
108
|
+
#
|
109
|
+
# @param [Layout::Layer] layer
|
110
|
+
#
|
111
|
+
# @raise [ArgumentError] if layer and page are not in the same document
|
112
|
+
#
|
113
|
+
# @return [Boolean]
|
114
|
+
#
|
115
|
+
# @return [Boolean]
|
116
|
+
#
|
117
|
+
# @version LayOut 2018
|
118
|
+
def layer_visible?(layer)
|
119
|
+
end
|
120
|
+
|
121
|
+
# The {#name} method returns the name of the {Layout::Page}.
|
122
|
+
#
|
123
|
+
# @example
|
124
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
125
|
+
# pages = doc.pages
|
126
|
+
# first_page_name = pages.first.name
|
127
|
+
#
|
128
|
+
# @return [String]
|
129
|
+
#
|
130
|
+
# @version LayOut 2018
|
131
|
+
def name
|
132
|
+
end
|
133
|
+
|
134
|
+
# The {#name=} method sets the name of a page.
|
135
|
+
#
|
136
|
+
# @example
|
137
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
138
|
+
# pages = doc.pages
|
139
|
+
# pages.first.name = "First page"
|
140
|
+
#
|
141
|
+
# @param [String] name
|
142
|
+
#
|
143
|
+
# @raise [ArgumentError] if name is an empty string
|
144
|
+
#
|
145
|
+
# @version LayOut 2018
|
146
|
+
def name=(name)
|
147
|
+
end
|
148
|
+
|
149
|
+
# The {#nonshared_entities} method returns the {Layout::Entities}
|
150
|
+
# unique to the {Layout::Page}.
|
151
|
+
#
|
152
|
+
# @example
|
153
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
154
|
+
# first_page = doc.pages.first
|
155
|
+
# entities = first_page.nonshared_entities
|
156
|
+
#
|
157
|
+
# @return [Layout::Entities]
|
158
|
+
#
|
159
|
+
# @version LayOut 2018
|
160
|
+
def nonshared_entities
|
161
|
+
end
|
162
|
+
|
163
|
+
# The {#set_layer_visibility} method sets whether a {Layout::Layer} is visible
|
164
|
+
# on the {Layout::Page}.
|
165
|
+
#
|
166
|
+
# @example
|
167
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
168
|
+
# first_page = doc.pages.first
|
169
|
+
# layer = doc.layers.first
|
170
|
+
# first_page.set_layer_visibility(layer, false)
|
171
|
+
#
|
172
|
+
# @param [Layout::Layer] layer
|
173
|
+
#
|
174
|
+
# @param [Boolean] visible
|
175
|
+
#
|
176
|
+
# @raise [ArgumentError] if layer could not be hidden because there must be at
|
177
|
+
# least one unlocked, visible layer on each page
|
178
|
+
#
|
179
|
+
# @raise [ArgumentError] if layer and page are not in the same document
|
180
|
+
#
|
181
|
+
# @return [Boolean]
|
182
|
+
#
|
183
|
+
# @version LayOut 2018
|
184
|
+
def set_layer_visibility(layer, visible)
|
185
|
+
end
|
186
|
+
|
187
|
+
end
|
@@ -0,0 +1,393 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# This is the interface to a {Layout::Document}'s paper space information. The
|
5
|
+
# paper size and margins, display resolution, and colors can all be accessed
|
6
|
+
# and set through this class.
|
7
|
+
#
|
8
|
+
# @example
|
9
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
10
|
+
# page_info = doc.page_info
|
11
|
+
# # Get the paper height and width and set the output resolution
|
12
|
+
# width = page_info.width
|
13
|
+
# height = page_info.height
|
14
|
+
# page_info.output_resolution = Layout::PageInfo::RESOLUTION_HIGH
|
15
|
+
#
|
16
|
+
# @version LayOut 2018
|
17
|
+
class Layout::PageInfo
|
18
|
+
|
19
|
+
# Constants
|
20
|
+
|
21
|
+
RESOLUTION_HIGH = nil # Stub value.
|
22
|
+
RESOLUTION_LOW = nil # Stub value.
|
23
|
+
RESOLUTION_MEDIUM = nil # Stub value.
|
24
|
+
|
25
|
+
# Instance Methods
|
26
|
+
|
27
|
+
# The {bottom_margin} method returns the paper's bottom margin in document
|
28
|
+
# units.
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
32
|
+
# bottom_margin = doc.page_info.bottom_margin
|
33
|
+
#
|
34
|
+
# @return [Numeric]
|
35
|
+
#
|
36
|
+
# @version LayOut 2018
|
37
|
+
def bottom_margin
|
38
|
+
end
|
39
|
+
|
40
|
+
# The {#bottom_margin=} method sets the paper's bottom margin in document units.
|
41
|
+
#
|
42
|
+
# @example
|
43
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
44
|
+
# doc.page_info.bottom_margin = 0.40
|
45
|
+
#
|
46
|
+
# @param [Numeric] margin
|
47
|
+
#
|
48
|
+
# @raise [ArgumentError] if margin is less than 0 or greater than the page
|
49
|
+
# height
|
50
|
+
#
|
51
|
+
# @version LayOut 2018
|
52
|
+
def bottom_margin=(margin)
|
53
|
+
end
|
54
|
+
|
55
|
+
# The {#color} method returns the paper's color.
|
56
|
+
#
|
57
|
+
# @example
|
58
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
59
|
+
# paper_color = Layout.page_info.color
|
60
|
+
#
|
61
|
+
# @return [Sketchup::Color]
|
62
|
+
#
|
63
|
+
# @version LayOut 2018
|
64
|
+
def color
|
65
|
+
end
|
66
|
+
|
67
|
+
# The {#color=} method sets the paper's color.
|
68
|
+
#
|
69
|
+
# @example
|
70
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
71
|
+
# doc.page_info.color = Sketchup::Color.new(45, 45, 75, 255)
|
72
|
+
#
|
73
|
+
# @param [Sketchup::Color] new_color
|
74
|
+
#
|
75
|
+
# @version LayOut 2018
|
76
|
+
def color=(new_color)
|
77
|
+
end
|
78
|
+
|
79
|
+
# The {#display_resolution} method returns the on screen rendering resolution
|
80
|
+
# quality.
|
81
|
+
#
|
82
|
+
# The resolution can be one of the following values:
|
83
|
+
# [+Layout::PageInfo::RESOLUTION_LOW+]
|
84
|
+
# [+Layout::PageInfo::RESOLUTION_MEDIUM+]
|
85
|
+
# [+Layout::PageInfo::RESOLUTION_HIGH+]
|
86
|
+
#
|
87
|
+
# @example
|
88
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
89
|
+
# display_resolution = doc.page_info.display_resolution
|
90
|
+
#
|
91
|
+
# @return [Integer]
|
92
|
+
#
|
93
|
+
# @version LayOut 2018
|
94
|
+
def display_resolution
|
95
|
+
end
|
96
|
+
|
97
|
+
# The {#display_resolution=} method sets the on screen rendering resolution
|
98
|
+
# quality.
|
99
|
+
#
|
100
|
+
# The resolution can be one of the following values:
|
101
|
+
# [+Layout::PageInfo::RESOLUTION_LOW+]
|
102
|
+
# [+Layout::PageInfo::RESOLUTION_MEDIUM+]
|
103
|
+
# [+Layout::PageInfo::RESOLUTION_HIGH+]
|
104
|
+
#
|
105
|
+
# @example
|
106
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
107
|
+
# doc.page_info.display_resolution = Layout::PageInfo::RESOLUTION_MEDIUM
|
108
|
+
#
|
109
|
+
# @param [Integer] resolution
|
110
|
+
#
|
111
|
+
# @raise [ArgumentError] if resolution is not a valid resolution value
|
112
|
+
#
|
113
|
+
# @version LayOut 2018
|
114
|
+
def display_resolution=(resolution)
|
115
|
+
end
|
116
|
+
|
117
|
+
# The {#height} method returns the paper height in document units.
|
118
|
+
#
|
119
|
+
# @example
|
120
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
121
|
+
# height = doc.page_info.height
|
122
|
+
#
|
123
|
+
# @return [Numeric]
|
124
|
+
#
|
125
|
+
# @version LayOut 2018
|
126
|
+
def height
|
127
|
+
end
|
128
|
+
|
129
|
+
# The {#height=} method sets the paper height in document units.
|
130
|
+
#
|
131
|
+
# @example
|
132
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
133
|
+
# doc.page_info.height = 8.5
|
134
|
+
#
|
135
|
+
# @param [Numeric] height
|
136
|
+
#
|
137
|
+
# @raise [ArgumentError] if height is less than 1 or greater than 200
|
138
|
+
#
|
139
|
+
# @version LayOut 2018
|
140
|
+
def height=(height)
|
141
|
+
end
|
142
|
+
|
143
|
+
# The {#left_margin} method returns the paper's left margin in document units.
|
144
|
+
#
|
145
|
+
# @example
|
146
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
147
|
+
# left_margin = doc.page_info.left_margin
|
148
|
+
#
|
149
|
+
# @return [Numeric]
|
150
|
+
#
|
151
|
+
# @version LayOut 2018
|
152
|
+
def left_margin
|
153
|
+
end
|
154
|
+
|
155
|
+
# The {#left_margin=} method sets the paper's left margin in document units.
|
156
|
+
#
|
157
|
+
# @example
|
158
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
159
|
+
# doc.page_info.left_margin = 0.40
|
160
|
+
#
|
161
|
+
# @param [Numeric] margin
|
162
|
+
#
|
163
|
+
# @raise [ArgumentError] if margin is less than 0 or greater than the page
|
164
|
+
# width
|
165
|
+
#
|
166
|
+
# @version LayOut 2018
|
167
|
+
def left_margin=(margin)
|
168
|
+
end
|
169
|
+
|
170
|
+
# The {#margin_color} method returns the color of the paper's margin.
|
171
|
+
#
|
172
|
+
# @example
|
173
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
174
|
+
# margin_color = doc.page_info.margin_color
|
175
|
+
#
|
176
|
+
# @return [Sketchup::Color]
|
177
|
+
#
|
178
|
+
# @version LayOut 2018
|
179
|
+
def margin_color
|
180
|
+
end
|
181
|
+
|
182
|
+
# The {#margin_color=} sets the color of paper's margin.
|
183
|
+
#
|
184
|
+
# @example
|
185
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
186
|
+
# new_color = Sketchup::Color("Red")
|
187
|
+
# doc.page_info.margin_color = new_color
|
188
|
+
#
|
189
|
+
# @param [Sketchup::Color] color
|
190
|
+
#
|
191
|
+
# @version LayOut 2018
|
192
|
+
def margin_color=(color)
|
193
|
+
end
|
194
|
+
|
195
|
+
# The {#output_resolution} method returns the output rendering resolution
|
196
|
+
# quality.
|
197
|
+
#
|
198
|
+
# The resolution can be one of the following values:
|
199
|
+
# [+Layout::PageInfo::RESOLUTION_LOW+]
|
200
|
+
# [+Layout::PageInfo::RESOLUTION_MEDIUM+]
|
201
|
+
# [+Layout::PageInfo::RESOLUTION_HIGH+]
|
202
|
+
#
|
203
|
+
# @example
|
204
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
205
|
+
# output_resolution = doc.page_info.output_resolution
|
206
|
+
#
|
207
|
+
# @return [Integer]
|
208
|
+
#
|
209
|
+
# @version LayOut 2018
|
210
|
+
def output_resolution
|
211
|
+
end
|
212
|
+
|
213
|
+
# The {#output_resolution=} method sets the output rendering resolution
|
214
|
+
# quality.
|
215
|
+
#
|
216
|
+
# The resolution can be one of the following values:
|
217
|
+
# [+Layout::PageInfo::RESOLUTION_LOW+]
|
218
|
+
# [+Layout::PageInfo::RESOLUTION_MEDIUM+]
|
219
|
+
# [+Layout::PageInfo::RESOLUTION_HIGH+]
|
220
|
+
#
|
221
|
+
# @example
|
222
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
223
|
+
# doc.page_info.output_resolution = Layout::PageInfo::RESOLUTION_MEDIUM
|
224
|
+
#
|
225
|
+
# @param [Integer] resolution
|
226
|
+
#
|
227
|
+
# @raise [ArgumentError] if resolution is not a valid resolution value
|
228
|
+
#
|
229
|
+
# @version LayOut 2018
|
230
|
+
def output_resolution=(resolution)
|
231
|
+
end
|
232
|
+
|
233
|
+
# The {#print_margins=} method sets whether to print the paper's margins.
|
234
|
+
#
|
235
|
+
# @example
|
236
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
237
|
+
# doc.page_info.print_margins=true
|
238
|
+
#
|
239
|
+
# @param [Boolean] print
|
240
|
+
#
|
241
|
+
# @version LayOut 2018
|
242
|
+
def print_margins=(print)
|
243
|
+
end
|
244
|
+
|
245
|
+
# The {#print_margins?} method returns whether to print the paper's margins.
|
246
|
+
#
|
247
|
+
# @example
|
248
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
249
|
+
# margins_printed = doc.page_info.print_margins?
|
250
|
+
#
|
251
|
+
# @return [Boolean]
|
252
|
+
#
|
253
|
+
# @return [Boolean]
|
254
|
+
#
|
255
|
+
# @version LayOut 2018
|
256
|
+
def print_margins?
|
257
|
+
end
|
258
|
+
|
259
|
+
# The {#print_paper_color=} method sets whether or not the page color should be
|
260
|
+
# printed.
|
261
|
+
#
|
262
|
+
# @example
|
263
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
264
|
+
# doc.page_info.print_color = true
|
265
|
+
#
|
266
|
+
# @param [Boolean] print_paper_color
|
267
|
+
#
|
268
|
+
# @version LayOut 2018
|
269
|
+
def print_paper_color=(print_paper_color)
|
270
|
+
end
|
271
|
+
|
272
|
+
# The {#print_paper_color?} method returns whether or not the page color should
|
273
|
+
# be printed.
|
274
|
+
#
|
275
|
+
# @example
|
276
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
277
|
+
# paper_color = doc.page_info.print_paper_color?
|
278
|
+
#
|
279
|
+
# @return [Boolean]
|
280
|
+
#
|
281
|
+
# @return [Boolean]
|
282
|
+
#
|
283
|
+
# @version LayOut 2018
|
284
|
+
def print_paper_color?
|
285
|
+
end
|
286
|
+
|
287
|
+
# The {#right_margin} method returns the paper's right margin in document units.
|
288
|
+
#
|
289
|
+
# @example
|
290
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
291
|
+
# right_margin = doc.page_info.right_margin
|
292
|
+
#
|
293
|
+
# @return [Numeric]
|
294
|
+
#
|
295
|
+
# @version LayOut 2018
|
296
|
+
def right_margin
|
297
|
+
end
|
298
|
+
|
299
|
+
# The {#right_margin=} sets the paper's right margin in document units.
|
300
|
+
#
|
301
|
+
# @example
|
302
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
303
|
+
# doc.page_info.right_margin = 0.40
|
304
|
+
#
|
305
|
+
# @param [Numeric] margin
|
306
|
+
#
|
307
|
+
# @raise [ArgumentError] if margin is less than 0 or greater than the page
|
308
|
+
# width
|
309
|
+
#
|
310
|
+
# @version LayOut 2018
|
311
|
+
def right_margin=(margin)
|
312
|
+
end
|
313
|
+
|
314
|
+
# The {#show_margins=} method sets whether the paper's margins are visible.
|
315
|
+
#
|
316
|
+
# @example
|
317
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
318
|
+
# doc.page_info.show_margins = false
|
319
|
+
#
|
320
|
+
# @param [Boolean] margins_visible
|
321
|
+
#
|
322
|
+
# @version LayOut 2018
|
323
|
+
def show_margins=(margins_visible)
|
324
|
+
end
|
325
|
+
|
326
|
+
# The {#show_margins?} method returns whether the paper's margins are visible.
|
327
|
+
#
|
328
|
+
# @example
|
329
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
330
|
+
# show_margins = doc.page_info.show_margins?
|
331
|
+
#
|
332
|
+
# @return [Boolean]
|
333
|
+
#
|
334
|
+
# @return [Boolean]
|
335
|
+
#
|
336
|
+
# @version LayOut 2018
|
337
|
+
def show_margins?
|
338
|
+
end
|
339
|
+
|
340
|
+
# The {#top_margin} method returns the paper's top margin in document units.
|
341
|
+
#
|
342
|
+
# @example
|
343
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
344
|
+
# top_margin = doc.page_info.top_margin
|
345
|
+
#
|
346
|
+
# @return [Numeric]
|
347
|
+
#
|
348
|
+
# @version LayOut 2018
|
349
|
+
def top_margin
|
350
|
+
end
|
351
|
+
|
352
|
+
# The {#top_margin} method sets the paper's top margin in document units.
|
353
|
+
#
|
354
|
+
# @example
|
355
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
356
|
+
# doc.page_info.top_margin = 0.40
|
357
|
+
#
|
358
|
+
# @param [Numeric] margin
|
359
|
+
#
|
360
|
+
# @raise [ArgumentError] if margin is less than 0 or greater than the page
|
361
|
+
# height
|
362
|
+
#
|
363
|
+
# @version LayOut 2018
|
364
|
+
def top_margin=(margin)
|
365
|
+
end
|
366
|
+
|
367
|
+
# The {#width} method returns the paper width in document units.
|
368
|
+
#
|
369
|
+
# @example
|
370
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
371
|
+
# width = doc.page_info.width
|
372
|
+
#
|
373
|
+
# @return [Numeric]
|
374
|
+
#
|
375
|
+
# @version LayOut 2018
|
376
|
+
def width
|
377
|
+
end
|
378
|
+
|
379
|
+
# The {#width=} method sets the paper width in document units.
|
380
|
+
#
|
381
|
+
# @example
|
382
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
383
|
+
# doc.page_info.width = 8.5
|
384
|
+
#
|
385
|
+
# @param [Numeric] width
|
386
|
+
#
|
387
|
+
# @raise [ArgumentError] if width is less than 1 or greater than 200
|
388
|
+
#
|
389
|
+
# @version LayOut 2018
|
390
|
+
def width=(width)
|
391
|
+
end
|
392
|
+
|
393
|
+
end
|