@@ -45,49 +45,154 @@ source product.
45
45
using iText . Kernel . Pdf ;
46
46
47
47
namespace iText . Kernel . Pdf . Annot {
48
+ /// <summary>This class represents 3D annotations by which 3D artwork shall be represented in a PDF document.</summary>
49
+ /// <remarks>
50
+ /// This class represents 3D annotations by which 3D artwork shall be represented in a PDF document.
51
+ /// See also ISO-32000-2 13.6.2 "3D annotations".
52
+ /// </remarks>
48
53
public class Pdf3DAnnotation : PdfAnnotation {
54
+ /// <summary>
55
+ /// Creates a
56
+ /// <see cref="Pdf3DAnnotation"/>
57
+ /// instance.
58
+ /// </summary>
59
+ /// <param name="rect">
60
+ /// the annotation rectangle, defining the location of the annotation on the page
61
+ /// in default user space units. See
62
+ /// <see cref="PdfAnnotation.SetRectangle(iText.Kernel.Pdf.PdfArray)"/>.
63
+ /// </param>
64
+ /// <param name="artwork">3D artwork which is represented by the annotation</param>
49
65
public Pdf3DAnnotation ( Rectangle rect , PdfObject artwork )
50
66
: base ( rect ) {
51
67
Put ( PdfName . _3DD , artwork ) ;
52
68
}
53
69
70
+ /// <summary>
71
+ /// Instantiates a new
72
+ /// <see cref="Pdf3DAnnotation"/>
73
+ /// instance based on
74
+ /// <see cref="iText.Kernel.Pdf.PdfDictionary"/>
75
+ /// instance, that represents existing annotation object in the document.
76
+ /// </summary>
77
+ /// <param name="pdfObject">
78
+ /// the
79
+ /// <see cref="iText.Kernel.Pdf.PdfDictionary"/>
80
+ /// representing annotation object
81
+ /// </param>
82
+ /// <seealso cref="PdfAnnotation.MakeAnnotation(iText.Kernel.Pdf.PdfObject)"/>
54
83
public Pdf3DAnnotation ( PdfDictionary pdfObject )
55
84
: base ( pdfObject ) {
56
85
}
57
86
87
+ /// <summary><inheritDoc/></summary>
58
88
public override PdfName GetSubtype ( ) {
59
89
return PdfName . _3D ;
60
90
}
61
91
92
+ /// <summary>Sets the default initial view of the 3D artwork that shall be used when the annotation is activated.
93
+ /// </summary>
94
+ /// <param name="initialView">
95
+ /// the default initial view of the 3D artwork that shall be used
96
+ /// when the annotation is activated
97
+ /// </param>
98
+ /// <returns>
99
+ /// this
100
+ /// <see cref="Pdf3DAnnotation"/>
101
+ /// instance
102
+ /// </returns>
62
103
public virtual iText . Kernel . Pdf . Annot . Pdf3DAnnotation SetDefaultInitialView ( PdfObject initialView ) {
63
104
return ( iText . Kernel . Pdf . Annot . Pdf3DAnnotation ) Put ( PdfName . _3DV , initialView ) ;
64
105
}
65
106
107
+ /// <summary>Gets the default initial view of the 3D artwork that shall be used when the annotation is activated.
108
+ /// </summary>
109
+ /// <returns>the default initial view of the 3D artwork that shall be used when the annotation is activated</returns>
66
110
public virtual PdfObject GetDefaultInitialView ( ) {
67
111
return GetPdfObject ( ) . Get ( PdfName . _3DV ) ;
68
112
}
69
113
114
+ /// <summary>
115
+ /// Sets the activation dictionary that defines the times at which the annotation shall be
116
+ /// activated and deactivated and the state of the 3D artwork instance at those times.
117
+ /// </summary>
118
+ /// <param name="activationDictionary">
119
+ /// dictionary that defines the times at which the annotation
120
+ /// shall be activated and deactivated and the state of the 3D artwork
121
+ /// instance at those times.
122
+ /// </param>
123
+ /// <returns>
124
+ /// this
125
+ /// <see cref="Pdf3DAnnotation"/>
126
+ /// instance
127
+ /// </returns>
70
128
public virtual iText . Kernel . Pdf . Annot . Pdf3DAnnotation SetActivationDictionary ( PdfDictionary activationDictionary
71
129
) {
72
130
return ( iText . Kernel . Pdf . Annot . Pdf3DAnnotation ) Put ( PdfName . _3DA , activationDictionary ) ;
73
131
}
74
132
133
+ /// <summary>
134
+ /// Gets the activation dictionary that defines the times at which the annotation shall be
135
+ /// activated and deactivated and the state of the 3D artwork instance at those times.
136
+ /// </summary>
137
+ /// <returns>
138
+ /// the activation dictionary that defines the times at which the annotation shall be
139
+ /// activated and deactivated and the state of the 3D artwork instance at those times.
140
+ /// </returns>
75
141
public virtual PdfDictionary GetActivationDictionary ( ) {
76
142
return GetPdfObject ( ) . GetAsDictionary ( PdfName . _3DA ) ;
77
143
}
78
144
145
+ /// <summary>Sets the primary use of the 3D annotation.</summary>
146
+ /// <remarks>
147
+ /// Sets the primary use of the 3D annotation.
148
+ /// <para />
149
+ /// If true, it is intended to be interactive; if false, it is intended to be manipulated programmatically,
150
+ /// as with an ECMAScript animation. Interactive PDF processors may present different user interface controls
151
+ /// for interactive 3D annotations (for example, to rotate, pan, or zoom the artwork) than for those
152
+ /// managed by a script or other mechanism.
153
+ /// <para />
154
+ /// Default value: true.
155
+ /// </remarks>
156
+ /// <param name="interactive">
157
+ /// if true, it is intended to be interactive; if false, it is intended to be
158
+ /// manipulated programmatically
159
+ /// </param>
160
+ /// <returns>
161
+ /// this
162
+ /// <see cref="Pdf3DAnnotation"/>
163
+ /// instance
164
+ /// </returns>
79
165
public virtual iText . Kernel . Pdf . Annot . Pdf3DAnnotation SetInteractive ( bool interactive ) {
80
166
return ( iText . Kernel . Pdf . Annot . Pdf3DAnnotation ) Put ( PdfName . _3DI , PdfBoolean . ValueOf ( interactive ) ) ;
81
167
}
82
168
169
+ /// <summary>Indicates whether the 3D annotation is intended to be interactive or not.</summary>
170
+ /// <returns>whether the 3D annotation is intended to be interactive or not</returns>
83
171
public virtual PdfBoolean IsInteractive ( ) {
84
172
return GetPdfObject ( ) . GetAsBoolean ( PdfName . _3DI ) ;
85
173
}
86
174
175
+ /// <summary>Sets the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn.</summary>
176
+ /// <remarks>
177
+ /// Sets the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn.
178
+ /// It shall be within the rectangle specified by the annotation’s Rect entry and shall be expressed
179
+ /// in the annotation’s target coordinate system.
180
+ /// <para />
181
+ /// Default value: the annotation’s Rect entry, expressed in the target coordinate system.
182
+ /// This value is [-w/2 -h/2 w/2 h/2], where w and h are the width and height, respectively, of Rect.
183
+ /// </remarks>
184
+ /// <param name="viewBox">the rectangular area in which the 3D artwork shall be drawn</param>
185
+ /// <returns>
186
+ /// this
187
+ /// <see cref="Pdf3DAnnotation"/>
188
+ /// instance
189
+ /// </returns>
87
190
public virtual iText . Kernel . Pdf . Annot . Pdf3DAnnotation SetViewBox ( Rectangle viewBox ) {
88
191
return ( iText . Kernel . Pdf . Annot . Pdf3DAnnotation ) Put ( PdfName . _3DB , new PdfArray ( viewBox ) ) ;
89
192
}
90
193
194
+ /// <summary>Gets the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn.</summary>
195
+ /// <returns>the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn.</returns>
91
196
public virtual Rectangle GetViewBox ( ) {
92
197
return GetPdfObject ( ) . GetAsRectangle ( PdfName . _3DB ) ;
93
198
}
0 commit comments