Skip to content

Commit 2259822

Browse files
ars18wrwiText-CI
authored andcommitted
Cover Pdf3DAnnotation with javadocs
DEVSIX-5333 Autoported commit. Original commit hash: [6b4a54806]
1 parent 265a3f7 commit 2259822

File tree

2 files changed

+106
-1
lines changed

2 files changed

+106
-1
lines changed

itext/itext.kernel/itext/kernel/pdf/annot/Pdf3DAnnotation.cs

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,49 +45,154 @@ source product.
4545
using iText.Kernel.Pdf;
4646

4747
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>
4853
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>
4965
public Pdf3DAnnotation(Rectangle rect, PdfObject artwork)
5066
: base(rect) {
5167
Put(PdfName._3DD, artwork);
5268
}
5369

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)"/>
5483
public Pdf3DAnnotation(PdfDictionary pdfObject)
5584
: base(pdfObject) {
5685
}
5786

87+
/// <summary><inheritDoc/></summary>
5888
public override PdfName GetSubtype() {
5989
return PdfName._3D;
6090
}
6191

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>
62103
public virtual iText.Kernel.Pdf.Annot.Pdf3DAnnotation SetDefaultInitialView(PdfObject initialView) {
63104
return (iText.Kernel.Pdf.Annot.Pdf3DAnnotation)Put(PdfName._3DV, initialView);
64105
}
65106

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>
66110
public virtual PdfObject GetDefaultInitialView() {
67111
return GetPdfObject().Get(PdfName._3DV);
68112
}
69113

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>
70128
public virtual iText.Kernel.Pdf.Annot.Pdf3DAnnotation SetActivationDictionary(PdfDictionary activationDictionary
71129
) {
72130
return (iText.Kernel.Pdf.Annot.Pdf3DAnnotation)Put(PdfName._3DA, activationDictionary);
73131
}
74132

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>
75141
public virtual PdfDictionary GetActivationDictionary() {
76142
return GetPdfObject().GetAsDictionary(PdfName._3DA);
77143
}
78144

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>
79165
public virtual iText.Kernel.Pdf.Annot.Pdf3DAnnotation SetInteractive(bool interactive) {
80166
return (iText.Kernel.Pdf.Annot.Pdf3DAnnotation)Put(PdfName._3DI, PdfBoolean.ValueOf(interactive));
81167
}
82168

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>
83171
public virtual PdfBoolean IsInteractive() {
84172
return GetPdfObject().GetAsBoolean(PdfName._3DI);
85173
}
86174

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>
87190
public virtual iText.Kernel.Pdf.Annot.Pdf3DAnnotation SetViewBox(Rectangle viewBox) {
88191
return (iText.Kernel.Pdf.Annot.Pdf3DAnnotation)Put(PdfName._3DB, new PdfArray(viewBox));
89192
}
90193

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>
91196
public virtual Rectangle GetViewBox() {
92197
return GetPdfObject().GetAsRectangle(PdfName._3DB);
93198
}

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4bb78bd93e5d8ecba7de02ca99f484e6c6c6954a
1+
6b4a548067d754ff7b82375a1cc12495a83db152

0 commit comments

Comments
 (0)