origami-docspring 2.2.0 → 2.3.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/CHANGELOG.md +18 -0
- data/examples/attachments/attachment.rb +7 -8
- data/examples/attachments/nested_document.rb +6 -5
- data/examples/encryption/encryption.rb +5 -4
- data/examples/events/events.rb +7 -6
- data/examples/flash/flash.rb +10 -9
- data/examples/forms/javascript.rb +14 -13
- data/examples/forms/xfa.rb +67 -66
- data/examples/javascript/hello_world.rb +6 -5
- data/examples/javascript/js_emulation.rb +26 -26
- data/examples/loop/goto.rb +12 -11
- data/examples/loop/named.rb +17 -16
- data/examples/signature/signature.rb +11 -11
- data/examples/uri/javascript.rb +25 -24
- data/examples/uri/open-uri.rb +5 -4
- data/examples/uri/submitform.rb +11 -10
- data/lib/origami/3d.rb +330 -334
- data/lib/origami/acroform.rb +267 -268
- data/lib/origami/actions.rb +266 -278
- data/lib/origami/annotations.rb +659 -670
- data/lib/origami/array.rb +192 -196
- data/lib/origami/boolean.rb +66 -70
- data/lib/origami/catalog.rb +360 -363
- data/lib/origami/collections.rb +132 -133
- data/lib/origami/compound.rb +125 -129
- data/lib/origami/destinations.rb +226 -237
- data/lib/origami/dictionary.rb +155 -154
- data/lib/origami/encryption.rb +967 -923
- data/lib/origami/extensions/fdf.rb +270 -275
- data/lib/origami/extensions/ppklite.rb +323 -328
- data/lib/origami/filespec.rb +170 -173
- data/lib/origami/filters/ascii.rb +162 -167
- data/lib/origami/filters/ccitt/tables.rb +248 -252
- data/lib/origami/filters/ccitt.rb +309 -312
- data/lib/origami/filters/crypt.rb +31 -34
- data/lib/origami/filters/dct.rb +47 -50
- data/lib/origami/filters/flate.rb +57 -60
- data/lib/origami/filters/jbig2.rb +50 -53
- data/lib/origami/filters/jpx.rb +40 -43
- data/lib/origami/filters/lzw.rb +151 -155
- data/lib/origami/filters/predictors.rb +250 -255
- data/lib/origami/filters/runlength.rb +111 -115
- data/lib/origami/filters.rb +319 -325
- data/lib/origami/font.rb +173 -177
- data/lib/origami/functions.rb +62 -66
- data/lib/origami/graphics/colors.rb +203 -208
- data/lib/origami/graphics/instruction.rb +79 -81
- data/lib/origami/graphics/path.rb +141 -144
- data/lib/origami/graphics/patterns.rb +156 -160
- data/lib/origami/graphics/render.rb +51 -47
- data/lib/origami/graphics/state.rb +144 -142
- data/lib/origami/graphics/text.rb +185 -188
- data/lib/origami/graphics/xobject.rb +818 -804
- data/lib/origami/graphics.rb +25 -26
- data/lib/origami/header.rb +63 -65
- data/lib/origami/javascript.rb +718 -651
- data/lib/origami/linearization.rb +284 -285
- data/lib/origami/metadata.rb +156 -135
- data/lib/origami/name.rb +98 -100
- data/lib/origami/null.rb +49 -51
- data/lib/origami/numeric.rb +133 -135
- data/lib/origami/obfuscation.rb +180 -182
- data/lib/origami/object.rb +634 -631
- data/lib/origami/optionalcontent.rb +147 -149
- data/lib/origami/outline.rb +46 -48
- data/lib/origami/outputintents.rb +76 -77
- data/lib/origami/page.rb +637 -596
- data/lib/origami/parser.rb +214 -221
- data/lib/origami/parsers/fdf.rb +44 -45
- data/lib/origami/parsers/pdf/lazy.rb +147 -154
- data/lib/origami/parsers/pdf/linear.rb +104 -109
- data/lib/origami/parsers/pdf.rb +109 -107
- data/lib/origami/parsers/ppklite.rb +44 -46
- data/lib/origami/pdf.rb +886 -896
- data/lib/origami/reference.rb +116 -120
- data/lib/origami/signature.rb +617 -625
- data/lib/origami/stream.rb +560 -558
- data/lib/origami/string.rb +366 -368
- data/lib/origami/template/patterns.rb +50 -52
- data/lib/origami/template/widgets.rb +111 -114
- data/lib/origami/trailer.rb +153 -157
- data/lib/origami/tree.rb +55 -57
- data/lib/origami/version.rb +19 -19
- data/lib/origami/webcapture.rb +87 -90
- data/lib/origami/xfa/config.rb +409 -414
- data/lib/origami/xfa/connectionset.rb +113 -117
- data/lib/origami/xfa/datasets.rb +38 -42
- data/lib/origami/xfa/localeset.rb +33 -37
- data/lib/origami/xfa/package.rb +49 -52
- data/lib/origami/xfa/pdf.rb +54 -59
- data/lib/origami/xfa/signature.rb +33 -37
- data/lib/origami/xfa/sourceset.rb +34 -38
- data/lib/origami/xfa/stylesheet.rb +35 -39
- data/lib/origami/xfa/template.rb +1630 -1634
- data/lib/origami/xfa/xdc.rb +33 -37
- data/lib/origami/xfa/xfa.rb +132 -123
- data/lib/origami/xfa/xfdf.rb +34 -38
- data/lib/origami/xfa/xmpmeta.rb +34 -38
- data/lib/origami/xfa.rb +50 -53
- data/lib/origami/xreftable.rb +462 -462
- data/lib/origami.rb +37 -38
- data/test/test_actions.rb +22 -20
- data/test/test_annotations.rb +54 -52
- data/test/test_forms.rb +23 -21
- data/test/test_native_types.rb +82 -78
- data/test/test_object_tree.rb +25 -24
- data/test/test_pages.rb +43 -41
- data/test/test_pdf.rb +2 -0
- data/test/test_pdf_attachment.rb +23 -21
- data/test/test_pdf_create.rb +16 -15
- data/test/test_pdf_encrypt.rb +69 -66
- data/test/test_pdf_parse.rb +131 -129
- data/test/test_pdf_parse_lazy.rb +53 -53
- data/test/test_pdf_sign.rb +67 -67
- data/test/test_streams.rb +145 -143
- data/test/test_xrefs.rb +46 -45
- metadata +64 -8
data/lib/origami/3d.rb
CHANGED
@@ -1,364 +1,360 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# This file is part of Origami, PDF manipulation framework for Ruby
|
5
|
+
# Copyright (C) 2016 Guillaume Delugré.
|
6
|
+
#
|
7
|
+
# Origami is free software: you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
10
|
+
# (at your option) any later version.
|
11
|
+
#
|
12
|
+
# Origami is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
# GNU Lesser General Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
18
|
+
# along with Origami. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
#
|
20
20
|
|
21
21
|
module Origami
|
22
|
+
class Projection3D < Dictionary
|
23
|
+
include StandardObject
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
ORTHOGRAPHIC = :O
|
27
|
-
PERSPECTIVE = :P
|
25
|
+
ORTHOGRAPHIC = :O
|
26
|
+
PERSPECTIVE = :P
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
module Scaling
|
35
|
-
WIDTH = :W
|
36
|
-
HEIGHT = :H
|
37
|
-
MINIMUM = :Min
|
38
|
-
MAXIMUM = :Max
|
39
|
-
ABSOLUTE = :Absolute
|
40
|
-
end
|
41
|
-
|
42
|
-
field :Subtype, :Type => Name, :Default => ORTHOGRAPHIC
|
43
|
-
field :CS, :Type => Name, :Default => ClippingStyles::AUTOMATIC_NEARFAR
|
44
|
-
field :F, :Type => Number
|
45
|
-
field :N, :Type => Number
|
46
|
-
field :FOV, :Type => Number
|
47
|
-
field :PS, :Type => [ Number, Name ], :Default => Scaling::WIDTH
|
48
|
-
field :OS, :Type => Number, :Default => 1
|
49
|
-
field :OB, :Type => Name, :Version => "1.7", :Default => Scaling::ABSOLUTE
|
28
|
+
module ClippingStyles
|
29
|
+
EXPLICIT_NEARFAR = :XNF
|
30
|
+
AUTOMATIC_NEARFAR = :ANF
|
50
31
|
end
|
51
32
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
field :C, :Type => Object, :Default => [ 1, 1, 1 ]
|
59
|
-
field :EA, :Type => Boolean, :Default => false
|
33
|
+
module Scaling
|
34
|
+
WIDTH = :W
|
35
|
+
HEIGHT = :H
|
36
|
+
MINIMUM = :Min
|
37
|
+
MAXIMUM = :Max
|
38
|
+
ABSOLUTE = :Absolute
|
60
39
|
end
|
61
40
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
41
|
+
field :Subtype, Type: Name, Default: ORTHOGRAPHIC
|
42
|
+
field :CS, Type: Name, Default: ClippingStyles::AUTOMATIC_NEARFAR
|
43
|
+
field :F, Type: Number
|
44
|
+
field :N, Type: Number
|
45
|
+
field :FOV, Type: Number
|
46
|
+
field :PS, Type: [Number, Name], Default: Scaling::WIDTH
|
47
|
+
field :OS, Type: Number, Default: 1
|
48
|
+
field :OB, Type: Name, Version: "1.7", Default: Scaling::ABSOLUTE
|
49
|
+
end
|
50
|
+
|
51
|
+
class Background3D < Dictionary
|
52
|
+
include StandardObject
|
53
|
+
|
54
|
+
field :Type, Type: Name, Default: :'3DBG'
|
55
|
+
field :Subtype, Type: Name, Default: :SC
|
56
|
+
field :CS, Type: [Name, Array], Default: Graphics::Color::Space::DEVICE_RGB
|
57
|
+
field :C, Type: Object, Default: [1, 1, 1]
|
58
|
+
field :EA, Type: Boolean, Default: false
|
59
|
+
end
|
60
|
+
|
61
|
+
class RenderMode3D < Dictionary
|
62
|
+
include StandardObject
|
63
|
+
|
64
|
+
module Modes
|
65
|
+
SOLID = :Solid
|
66
|
+
SOLID_WIREFRAME = :SolidWireFrame
|
67
|
+
TRANSPARENT = :Transparent
|
68
|
+
TRANSPARENT_WIREFRAME = :TransparentWireFrame
|
69
|
+
BOUNDINGBOX = :BoundingBox
|
70
|
+
TRANSPARENT_BOUNDINGBOX = :TransparentBoundingBox
|
71
|
+
TRANSPARENT_BOUNDINGBOX_OUTLINE = :TransparentBoundingBoxOutline
|
72
|
+
WIREFRAME = :WireFrame
|
73
|
+
SHADED_WIREFRAME = :ShadedWireFrame
|
74
|
+
HIDDEN_WIREFRAME = :HiddenWireFrame
|
75
|
+
VERTICES = :Vertices
|
76
|
+
SHADED_VERTICES = :ShadedVertices
|
77
|
+
ILLUSTRATION = :Illustration
|
78
|
+
SOLID_OUTLINE = :SolidOutline
|
79
|
+
SHADED_ILLUSTRATION = :ShadedIllustration
|
89
80
|
end
|
90
81
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
82
|
+
field :Type, Type: Name, Default: :'3DRenderMode'
|
83
|
+
field :Subtype, Type: Name, Required: true, Version: "1.7"
|
84
|
+
field :AC, Type: Array, Default: [Graphics::Color::Space::DEVICE_RGB, 0, 0, 0]
|
85
|
+
field :BG, Type: [Name, Array], Default: :BG
|
86
|
+
field :O, Type: Number, Default: 0.5
|
87
|
+
field :CV, Type: Number, Default: 45
|
88
|
+
end
|
89
|
+
|
90
|
+
class LightingScheme3D < Dictionary
|
91
|
+
include StandardObject
|
92
|
+
|
93
|
+
module Styles
|
94
|
+
ARTWORK = :Artwork
|
95
|
+
NONE = :None
|
96
|
+
WHITE = :White
|
97
|
+
DAY = :Day
|
98
|
+
NIGHT = :Night
|
99
|
+
HARD = :Hard
|
100
|
+
PRIMARY = :Primary
|
101
|
+
BLUE = :Blue
|
102
|
+
RED = :Red
|
103
|
+
CUBE = :Cube
|
104
|
+
CAD = :CAD
|
105
|
+
HEADLAMP = :HeadLamp
|
111
106
|
end
|
112
107
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
108
|
+
field :Type, Type: Name, Default: :'3DLightingScheme'
|
109
|
+
field :Subtype, Type: Name, Version: "1.7", Required: true
|
110
|
+
end
|
111
|
+
|
112
|
+
class CrossSection3D < Dictionary
|
113
|
+
include StandardObject
|
114
|
+
|
115
|
+
field :Type, Type: Name, Default: :'3DCrossSection'
|
116
|
+
field :C, Type: Array, Default: [0, 0, 0]
|
117
|
+
field :O, Type: Array, Version: "1.7", Default: [Null.new, 0, 0], Required: true
|
118
|
+
field :PO, Type: Number, Default: 0.5
|
119
|
+
field :PC, Type: Array, Default: [Graphics::Color::Space::DEVICE_RGB, 1, 1, 1]
|
120
|
+
field :IV, Type: Boolean, Default: false
|
121
|
+
field :IC, Type: Array, Default: [Graphics::Color::Space::DEVICE_RGB, 0, 1, 0]
|
122
|
+
end
|
123
|
+
|
124
|
+
class Node3D < Dictionary
|
125
|
+
include StandardObject
|
126
|
+
|
127
|
+
field :Type, Type: Name, Default: :'3DNode'
|
128
|
+
field :N, Type: String, Version: "1.7", Required: true
|
129
|
+
field :O, Type: Number
|
130
|
+
field :V, Type: Boolean
|
131
|
+
field :M, Type: Array
|
132
|
+
end
|
133
|
+
|
134
|
+
class Measurement3D < Dictionary
|
135
|
+
include StandardObject
|
136
|
+
|
137
|
+
field :Type, Type: Name, Default: :'3DMeasure'
|
138
|
+
field :Subtype, Type: Name, Required: true
|
139
|
+
field :TRL, Type: String
|
140
|
+
end
|
141
|
+
|
142
|
+
class LinearDimensionMeasurement3D < Measurement3D
|
143
|
+
field :Subtype, Type: Name, Default: :L3D, Required: true
|
144
|
+
field :AP, Type: Array.of(Number, length: 3), Required: true
|
145
|
+
field :A1, Type: Array.of(Number, length: 3), Required: true
|
146
|
+
field :N1, Type: String
|
147
|
+
field :A2, Type: Array.of(Number, length: 3), Required: true
|
148
|
+
field :N2, Type: String
|
149
|
+
field :TP, Type: Array.of(Number, length: 3), Required: true
|
150
|
+
field :TY, Type: Array.of(Number, length: 3), Required: true
|
151
|
+
field :TS, Type: Number
|
152
|
+
field :C, Type: Array.of(Number, length: 3)
|
153
|
+
field :V, Type: Number, Required: true
|
154
|
+
field :U, Type: String, Required: true
|
155
|
+
field :P, Type: Integer, Default: 3
|
156
|
+
field :UT, Type: String
|
157
|
+
field :S, Type: Annotation::Projection
|
158
|
+
end
|
159
|
+
|
160
|
+
class PerpendicularDimensionMeasurement3D < Measurement3D
|
161
|
+
field :Subtype, Type: Name, Default: :PD3, Required: true
|
162
|
+
field :AP, Type: Array.of(Number, length: 3), Required: true
|
163
|
+
field :A1, Type: Array.of(Number, length: 3), Required: true
|
164
|
+
field :N1, Type: String
|
165
|
+
field :A2, Type: Array.of(Number, length: 3), Required: true
|
166
|
+
field :N2, Type: String
|
167
|
+
field :D1, Type: Array.of(Number, length: 3), Required: true
|
168
|
+
field :TP, Type: Array.of(Number, length: 3), Required: true
|
169
|
+
field :TY, Type: Array.of(Number, length: 3), Required: true
|
170
|
+
field :TS, Type: Number
|
171
|
+
field :C, Type: Array.of(Number, length: 3)
|
172
|
+
field :V, Type: Number, Required: true
|
173
|
+
field :U, Type: String, Required: true
|
174
|
+
field :P, Type: Integer, Default: 3
|
175
|
+
field :UT, Type: String
|
176
|
+
field :S, Type: Annotation::Projection
|
177
|
+
end
|
178
|
+
|
179
|
+
class AngularDimensionMeasurement3D < Measurement3D
|
180
|
+
field :Subtype, Type: Name, Default: :AD3, Required: true
|
181
|
+
field :AP, Type: Array.of(Number, length: 3), Required: true
|
182
|
+
field :A1, Type: Array.of(Number, length: 3), Required: true
|
183
|
+
field :D1, Type: Array.of(Number, length: 3), Required: true
|
184
|
+
field :N1, Type: String
|
185
|
+
field :A2, Type: Array.of(Number, length: 3), Required: true
|
186
|
+
field :D2, Type: Array.of(Number, length: 3), Required: true
|
187
|
+
field :N2, Type: String
|
188
|
+
field :TP, Type: Array.of(Number, length: 3), Required: true
|
189
|
+
field :TX, Type: Array.of(Number, length: 3), Required: true
|
190
|
+
field :TY, Type: Array.of(Number, length: 3), Required: true
|
191
|
+
field :TS, Type: Number
|
192
|
+
field :C, Type: Array.of(Number, length: 3)
|
193
|
+
field :V, Type: Number, Required: true
|
194
|
+
field :P, Type: Integer, Default: 3
|
195
|
+
field :UT, Type: String
|
196
|
+
field :DR, Type: Boolean, Default: true
|
197
|
+
field :S, Type: Annotation::Projection
|
198
|
+
end
|
199
|
+
|
200
|
+
class RadialMeasurement3D < Measurement3D
|
201
|
+
field :Subtype, Type: Name, Default: :RD3, Required: true
|
202
|
+
field :AP, Type: Array.of(Number, length: 3), Required: true
|
203
|
+
field :A1, Type: Array.of(Number, length: 3), Required: true
|
204
|
+
field :A2, Type: Array.of(Number, length: 3), Required: true
|
205
|
+
field :N2, Type: String
|
206
|
+
field :A3, Type: Array.of(Number, length: 3), Required: true
|
207
|
+
field :A4, Type: Array.of(Number, length: 3), Required: true
|
208
|
+
field :TP, Type: Array.of(Number, length: 3), Required: true
|
209
|
+
field :TX, Type: Array.of(Number, length: 3), Required: true
|
210
|
+
field :TY, Type: Array.of(Number, length: 3), Required: true
|
211
|
+
field :EL, Type: Number, Default: 60
|
212
|
+
field :TS, Type: Number
|
213
|
+
field :C, Type: Array.of(Number, length: 3)
|
214
|
+
field :V, Type: Number, Required: true
|
215
|
+
field :U, Type: String, Required: true
|
216
|
+
field :P, Type: Integer, Default: 3
|
217
|
+
field :UT, Type: String
|
218
|
+
field :SC, Type: Boolean, Default: false
|
219
|
+
field :R, Type: Boolean, Default: true
|
220
|
+
field :S, Type: Annotation::Projection
|
221
|
+
end
|
222
|
+
|
223
|
+
class CommentNote3D < Measurement3D
|
224
|
+
field :Subtype, Type: Name, Default: :'3DC', Required: true
|
225
|
+
field :A1, Type: Array.of(Number, length: 3), Required: true
|
226
|
+
field :N1, Type: String
|
227
|
+
field :TP, Type: Array.of(Number, length: 3), Required: true
|
228
|
+
field :TB, Type: Array.of(Integer, length: 2)
|
229
|
+
field :TS, Type: Number
|
230
|
+
field :C, Type: Array.of(Number, length: 3)
|
231
|
+
field :UT, Type: String
|
232
|
+
field :S, Type: Annotation::Projection
|
233
|
+
end
|
234
|
+
|
235
|
+
class View3D < Dictionary
|
236
|
+
include StandardObject
|
237
|
+
|
238
|
+
field :Type, Type: Name, Default: :'3DView'
|
239
|
+
field :XN, Type: String, Required: true
|
240
|
+
field :IN, Type: String
|
241
|
+
field :MS, Type: Name
|
242
|
+
field :C2W, Type: Array
|
243
|
+
field :U3DPath, Type: [String, Array.of(String)]
|
244
|
+
field :CO, Type: Number
|
245
|
+
field :P, Type: Projection3D
|
246
|
+
field :O, Type: Graphics::FormXObject
|
247
|
+
field :BG, Type: Background3D
|
248
|
+
field :RM, Type: RenderMode3D, Version: "1.7"
|
249
|
+
field :LS, Type: LightingScheme3D, Version: "1.7"
|
250
|
+
field :SA, Type: Array.of(CrossSection3D), Version: "1.7"
|
251
|
+
field :NA, Type: Array.of(Node3D), Version: "1.7"
|
252
|
+
field :NR, Type: Boolean, Version: "1.7", Default: false
|
253
|
+
end
|
254
|
+
|
255
|
+
class AnimationStyle3D < Dictionary
|
256
|
+
include StandardObject
|
257
|
+
|
258
|
+
module Styles
|
259
|
+
NONE = :None
|
260
|
+
LINEAR = :Linear
|
261
|
+
OSCILLATING = :Oscillating
|
123
262
|
end
|
124
263
|
|
125
|
-
|
126
|
-
|
264
|
+
field :Type, Type: Name, Default: :'3DAnimationStyle'
|
265
|
+
field :Subtype, Type: Name, Default: Styles::NONE
|
266
|
+
field :PC, Type: Integer, Default: 0
|
267
|
+
field :TM, Type: Number, Default: 1
|
268
|
+
end
|
127
269
|
|
128
|
-
|
129
|
-
|
130
|
-
field :O, :Type => Number
|
131
|
-
field :V, :Type => Boolean
|
132
|
-
field :M, :Type => Array
|
133
|
-
end
|
270
|
+
class U3DStream < Stream
|
271
|
+
include StandardObject
|
134
272
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
field :Type, :Type => Name, :Default => :"3DMeasure"
|
139
|
-
field :Subtype, :Type => Name, :Required => true
|
140
|
-
field :TRL, :Type => String
|
273
|
+
module Type
|
274
|
+
U3D = :U3D
|
275
|
+
PRC = :PRC
|
141
276
|
end
|
142
277
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
field :TP, :Type => Array.of(Number, length: 3), :Required => true
|
151
|
-
field :TY, :Type => Array.of(Number, length: 3), :Required => true
|
152
|
-
field :TS, :Type => Number
|
153
|
-
field :C, :Type => Array.of(Number, length: 3)
|
154
|
-
field :V, :Type => Number, :Required => true
|
155
|
-
field :U, :Type => String, :Required => true
|
156
|
-
field :P, :Type => Integer, :Default => 3
|
157
|
-
field :UT, :Type => String
|
158
|
-
field :S, :Type => Annotation::Projection
|
159
|
-
end
|
278
|
+
field :Type, Type: Name, Default: :'3D'
|
279
|
+
field :Subtype, Type: Name, Default: Type::U3D, Required: true, Version: "1.7", ExtensionLevel: 3
|
280
|
+
field :VA, Type: Array.of(View3D)
|
281
|
+
field :DV, Type: Object
|
282
|
+
field :Resources, Type: Dictionary
|
283
|
+
field :OnInstantiate, Type: Stream
|
284
|
+
field :AN, Type: AnimationStyle3D
|
160
285
|
|
161
|
-
|
162
|
-
|
163
|
-
field :AP, :Type => Array.of(Number, length: 3), :Required => true
|
164
|
-
field :A1, :Type => Array.of(Number, length: 3), :Required => true
|
165
|
-
field :N1, :Type => String
|
166
|
-
field :A2, :Type => Array.of(Number, length: 3), :Required => true
|
167
|
-
field :N2, :Type => String
|
168
|
-
field :D1, :Type => Array.of(Number, length: 3), :Required => true
|
169
|
-
field :TP, :Type => Array.of(Number, length: 3), :Required => true
|
170
|
-
field :TY, :Type => Array.of(Number, length: 3), :Required => true
|
171
|
-
field :TS, :Type => Number
|
172
|
-
field :C, :Type => Array.of(Number, length: 3)
|
173
|
-
field :V, :Type => Number, :Required => true
|
174
|
-
field :U, :Type => String, :Required => true
|
175
|
-
field :P, :Type => Integer, :Default => 3
|
176
|
-
field :UT, :Type => String
|
177
|
-
field :S, :Type => Annotation::Projection
|
286
|
+
def onInstantiate(action)
|
287
|
+
self[:OnInstantiate] = action
|
178
288
|
end
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
field :A4, :Type => Array.of(Number, length: 3), :Required => true
|
209
|
-
field :TP, :Type => Array.of(Number, length: 3), :Required => true
|
210
|
-
field :TX, :Type => Array.of(Number, length: 3), :Required => true
|
211
|
-
field :TY, :Type => Array.of(Number, length: 3), :Required => true
|
212
|
-
field :EL, :Type => Number, :Default => 60
|
213
|
-
field :TS, :Type => Number
|
214
|
-
field :C, :Type => Array.of(Number, length: 3)
|
215
|
-
field :V, :Type => Number, :Required => true
|
216
|
-
field :U, :Type => String, :Required => true
|
217
|
-
field :P, :Type => Integer, :Default => 3
|
218
|
-
field :UT, :Type => String
|
219
|
-
field :SC, :Type => Boolean, :Default => false
|
220
|
-
field :R, :Type => Boolean, :Default => true
|
221
|
-
field :S, :Type => Annotation::Projection
|
222
|
-
end
|
223
|
-
|
224
|
-
class CommentNote3D < Measurement3D
|
225
|
-
field :Subtype, :Type => Name, :Default => :"3DC", :Required => true
|
226
|
-
field :A1, :Type => Array.of(Number, length: 3), :Required => true
|
227
|
-
field :N1, :Type => String
|
228
|
-
field :TP, :Type => Array.of(Number, length: 3), :Required => true
|
229
|
-
field :TB, :Type => Array.of(Integer, length: 2)
|
230
|
-
field :TS, :Type => Number
|
231
|
-
field :C, :Type => Array.of(Number, length: 3)
|
232
|
-
field :UT, :Type => String
|
233
|
-
field :S, :Type => Annotation::Projection
|
234
|
-
end
|
235
|
-
|
236
|
-
class View3D < Dictionary
|
289
|
+
end
|
290
|
+
|
291
|
+
class Reference3D < Dictionary
|
292
|
+
include StandardObject
|
293
|
+
|
294
|
+
field :Type, Type: Name, Default: :'3DRef'
|
295
|
+
field :'3DD', Type: U3DStream
|
296
|
+
end
|
297
|
+
|
298
|
+
class Units3D < Dictionary
|
299
|
+
include StandardObject
|
300
|
+
|
301
|
+
field :TSm, Type: Number, Default: 1.0
|
302
|
+
field :TSn, Type: Number, Default: 1.0
|
303
|
+
field :TU, Type: String
|
304
|
+
field :USm, Type: Number, Default: 1.0
|
305
|
+
field :USn, Type: Number, Default: 1.0
|
306
|
+
field :UU, Type: String
|
307
|
+
field :DSm, Type: Number, Default: 1.0
|
308
|
+
field :DSn, Type: Number, Default: 1.0
|
309
|
+
field :DU, Type: String
|
310
|
+
end
|
311
|
+
|
312
|
+
class Annotation
|
313
|
+
#
|
314
|
+
# 3D Artwork annotation.
|
315
|
+
#
|
316
|
+
class Artwork3D < Annotation
|
317
|
+
class Activation < Dictionary
|
237
318
|
include StandardObject
|
238
319
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
field :P, :Type => Projection3D
|
247
|
-
field :O, :Type => Graphics::FormXObject
|
248
|
-
field :BG, :Type => Background3D
|
249
|
-
field :RM, :Type => RenderMode3D, :Version => "1.7"
|
250
|
-
field :LS, :Type => LightingScheme3D, :Version => "1.7"
|
251
|
-
field :SA, :Type => Array.of(CrossSection3D), :Version => "1.7"
|
252
|
-
field :NA, :Type => Array.of(Node3D), :Version => "1.7"
|
253
|
-
field :NR, :Type => Boolean, :Version => "1.7", :Default => false
|
254
|
-
end
|
255
|
-
|
256
|
-
class AnimationStyle3D < Dictionary
|
257
|
-
include StandardObject
|
258
|
-
|
259
|
-
module Styles
|
260
|
-
NONE = :None
|
261
|
-
LINEAR = :Linear
|
262
|
-
OSCILLATING = :Oscillating
|
320
|
+
module Events
|
321
|
+
PAGE_OPEN = :PO
|
322
|
+
PAGE_CLOSE = :PC
|
323
|
+
PAGE_VISIBLE = :PV
|
324
|
+
PAGE_INVISIBLE = :PI
|
325
|
+
USER_ACTIVATE = :XA
|
326
|
+
USER_DEACTIVATE = :XD
|
263
327
|
end
|
264
328
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
end
|
270
|
-
|
271
|
-
class U3DStream < Stream
|
272
|
-
include StandardObject
|
273
|
-
|
274
|
-
module Type
|
275
|
-
U3D = :U3D
|
276
|
-
PRC = :PRC
|
329
|
+
module State
|
330
|
+
UNINSTANCIATED = :U
|
331
|
+
INSTANCIATED = :I
|
332
|
+
LIVE = :L
|
277
333
|
end
|
278
334
|
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
field :DV, :Type => Object
|
283
|
-
field :Resources, :Type => Dictionary
|
284
|
-
field :OnInstantiate, :Type => Stream
|
285
|
-
field :AN, :Type => AnimationStyle3D
|
286
|
-
|
287
|
-
def onInstantiate(action)
|
288
|
-
self[:OnInstantiate] = action
|
335
|
+
module Style
|
336
|
+
EMBEDDED = :Embedded
|
337
|
+
WINDOWED = :Windowed
|
289
338
|
end
|
290
|
-
end
|
291
339
|
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
field
|
296
|
-
field
|
340
|
+
field :A, Type: Name, Default: Events::USER_ACTIVATE
|
341
|
+
field :AIS, Type: Name, Default: State::LIVE
|
342
|
+
field :D, Type: Name, Default: Events::PAGE_INVISIBLE
|
343
|
+
field :DIS, Type: Name, Default: State::UNINSTANCIATED
|
344
|
+
field :TB, Type: Boolean, Version: "1.7", Default: true
|
345
|
+
field :NP, Type: Boolean, Version: "1.7", Default: false
|
346
|
+
field :Style, Type: Name, Version: "1.7", ExtensionLevel: 3, Default: Style::EMBEDDED
|
347
|
+
field :Window, Type: RichMedia::Window, Version: "1.7", ExtensionLevel: 3
|
348
|
+
field :Transparent, Type: Boolean, Version: "1.7", ExtensionLevel: 3, Default: false
|
349
|
+
end
|
350
|
+
|
351
|
+
field :Subtype, Type: Name, Default: :'3D', Version: "1.6", Required: true
|
352
|
+
field :'3DD', Type: [Reference3D, U3DStream], Required: true
|
353
|
+
field :'3DV', Type: Object
|
354
|
+
field :'3DA', Type: Activation
|
355
|
+
field :'3DI', Type: Boolean, Default: true
|
356
|
+
field :'3DB', Type: Rectangle
|
357
|
+
field :'3DU', Type: Units3D, Version: "1.7", ExtensionLevel: 3
|
297
358
|
end
|
298
|
-
|
299
|
-
class Units3D < Dictionary
|
300
|
-
include StandardObject
|
301
|
-
|
302
|
-
field :TSm, :Type => Number, :Default => 1.0
|
303
|
-
field :TSn, :Type => Number, :Default => 1.0
|
304
|
-
field :TU, :Type => String
|
305
|
-
field :USm, :Type => Number, :Default => 1.0
|
306
|
-
field :USn, :Type => Number, :Default => 1.0
|
307
|
-
field :UU, :Type => String
|
308
|
-
field :DSm, :Type => Number, :Default => 1.0
|
309
|
-
field :DSn, :Type => Number, :Default => 1.0
|
310
|
-
field :DU, :Type => String
|
311
|
-
end
|
312
|
-
|
313
|
-
class Annotation
|
314
|
-
|
315
|
-
#
|
316
|
-
# 3D Artwork annotation.
|
317
|
-
#
|
318
|
-
class Artwork3D < Annotation
|
319
|
-
|
320
|
-
class Activation < Dictionary
|
321
|
-
include StandardObject
|
322
|
-
|
323
|
-
module Events
|
324
|
-
PAGE_OPEN = :PO
|
325
|
-
PAGE_CLOSE = :PC
|
326
|
-
PAGE_VISIBLE = :PV
|
327
|
-
PAGE_INVISIBLE = :PI
|
328
|
-
USER_ACTIVATE = :XA
|
329
|
-
USER_DEACTIVATE = :XD
|
330
|
-
end
|
331
|
-
|
332
|
-
module State
|
333
|
-
UNINSTANCIATED = :U
|
334
|
-
INSTANCIATED = :I
|
335
|
-
LIVE = :L
|
336
|
-
end
|
337
|
-
|
338
|
-
module Style
|
339
|
-
EMBEDDED = :Embedded
|
340
|
-
WINDOWED = :Windowed
|
341
|
-
end
|
342
|
-
|
343
|
-
field :A, :Type => Name, :Default => Events::USER_ACTIVATE
|
344
|
-
field :AIS, :Type => Name, :Default => State::LIVE
|
345
|
-
field :D, :Type => Name, :Default => Events::PAGE_INVISIBLE
|
346
|
-
field :DIS, :Type => Name, :Default => State::UNINSTANCIATED
|
347
|
-
field :TB, :Type => Boolean, :Version => "1.7", :Default => true
|
348
|
-
field :NP, :Type => Boolean, :Version => "1.7", :Default => false
|
349
|
-
field :Style, :Type => Name, :Version => "1.7", :ExtensionLevel => 3, :Default => Style::EMBEDDED
|
350
|
-
field :Window, :Type => RichMedia::Window, :Version => "1.7", :ExtensionLevel => 3
|
351
|
-
field :Transparent, :Type => Boolean, :Version => "1.7", :ExtensionLevel => 3, :Default => false
|
352
|
-
end
|
353
|
-
|
354
|
-
field :Subtype, :Type => Name, :Default => :"3D", :Version => "1.6", :Required => true
|
355
|
-
field :"3DD", :Type => [ Reference3D, U3DStream ], :Required => true
|
356
|
-
field :"3DV", :Type => Object
|
357
|
-
field :"3DA", :Type => Activation
|
358
|
-
field :"3DI", :Type => Boolean, :Default => true
|
359
|
-
field :"3DB", :Type => Rectangle
|
360
|
-
field :"3DU", :Type => Units3D, :Version => "1.7", :ExtensionLevel => 3
|
361
|
-
end
|
362
|
-
end
|
363
|
-
|
359
|
+
end
|
364
360
|
end
|