Skip to content

Commit 7ae0c6e

Browse files
authored
Merge pull request #267 from dynamsoft-docs/preview
4.0
2 parents b187c4d + 646a4b4 commit 7ae0c6e

82 files changed

Lines changed: 9406 additions & 50 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ collections:
4444
v2.1:
4545
output: true
4646
permalink: /:path-:collection:output_ext
47+
v3.2.1:
48+
output: true
49+
permalink: /:path-:collection:output_ext
4750

4851
defaults:
4952
- scope:

_data/full_tree.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ tree_file_list:
1212
- sidelist-apis-v1.0.0.html
1313
- sidelist-apis-v1.1.html
1414
- sidelist-apis-v2.1.html
15+
- sidelist-apis-v3.2.1.html
1516

_data/product_version.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
useGroupedVersion: true
22

33
version_info_list:
4-
- value: latest version (3.2.1)
4+
- value: latest version (4.0)
5+
- value: 3.2.1
56
- value: 2.1
67
- value: 1.1
78

_includes/sidelist-apis-v3.2.1.html

Lines changed: 178 additions & 0 deletions
Large diffs are not rendered by default.

_includes/sidelist-apis.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<li><a href="{{ site.api }}class/annotation/index.html" class="otherLinkColour">Annotation</a>
3030
<ul>
3131
<li><a href="{{ site.api }}class/annotation/rectangle.html" class="otherLinkColour">Rectangle</a></li>
32+
<li><a href="{{ site.api }}class/annotation/redaction.html" class="otherLinkColour">Redaction</a></li>
3233
<li><a href="{{ site.api }}class/annotation/ellipse.html" class="otherLinkColour">Ellipse</a></li>
3334
<li><a href="{{ site.api }}class/annotation/polygon.html" class="otherLinkColour">Polygon</a></li>
3435
<li><a href="{{ site.api }}class/annotation/polyline.html" class="otherLinkColour">Polyline</a></li>
@@ -75,6 +76,7 @@
7576
<li><a href="{{ site.api }}interface/annotationinterface/index.html" class="otherLinkColour">Annotation Interfaces</a>
7677
<ul>
7778
<li><a href="{{ site.api }}interface/annotationinterface/rectannotationoptions.html" class="otherLinkColour">RectAnnotationOptions</a></li>
79+
<li><a href="{{ site.api }}interface/annotationinterface/redactionannotationoptions.html" class="otherLinkColour">RedactionAnnotationOptions</a></li>
7880
<li><a href="{{ site.api }}interface/annotationinterface/ellipseannotationoptions.html" class="otherLinkColour">EllipseAnnotationOptions</a></li>
7981
<li><a href="{{ site.api }}interface/annotationinterface/polygonannotationoptions.html" class="otherLinkColour">PolygonAnnotationOptions</a></li>
8082
<li><a href="{{ site.api }}interface/annotationinterface/polylineannotationoptions.html" class="otherLinkColour">PolylineAnnotationOptions</a></li>
@@ -90,6 +92,7 @@
9092
<li><a href="{{ site.api }}interface/annotationinterface/point.html" class="otherLinkColour">Point</a></li>
9193
<li><a href="{{ site.api }}interface/annotationinterface/textcontent.html" class="otherLinkColour">TextContent</a></li>
9294
<li><a href="{{ site.api }}interface/annotationinterface/rectanglestyle.html" class="otherLinkColour">RectangleStyle</a></li>
95+
<li><a href="{{ site.api }}interface/annotationinterface/redactionstyle.html" class="otherLinkColour">RedactionStyle</a></li>
9396
<li><a href="{{ site.api }}interface/annotationinterface/ellipsestyle.html" class="otherLinkColour">EllipseStyle</a></li>
9497
<li><a href="{{ site.api }}interface/annotationinterface/polygonstyle.html" class="otherLinkColour">PolygonStyle</a></li>
9598
<li><a href="{{ site.api }}interface/annotationinterface/polylinestyle.html" class="otherLinkColour">PolylineStyle</a></li>
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
---
2+
layout: default-layout
3+
needAutoGenerateSidebar: true
4+
needGenerateH3Content: true
5+
noTitleIndex: true
6+
title: Dynamsoft Document Viewer API Reference - Ellipse Class
7+
keywords: Documentation, Dynamsoft Document Viewer, API Reference, Ellipse Class
8+
breadcrumbText: Ellipse Class
9+
description: Dynamsoft Document Viewer Documentation API Reference Ellipse Class Page
10+
11+
---
12+
13+
# Ellipse Class
14+
15+
16+
## API Index
17+
18+
| API Name | Description |
19+
| --------------------------------------- | ------------------------------------------------------------------------------------------- |
20+
| [`uid`](#uid) | Return the uid of the annotation. |
21+
| [`pageUid`](#pageuid) | Return the uid of the page where the annotation is located. |
22+
| [`source`](#source) | Return the source of the annotation. |
23+
| [`type`](#type) | Return the type of the annotation |
24+
| [`creationDate`](#creationdate) | Return the creation date of the annotation. |
25+
| [`flattened`](#flattened) | Flattens the annotation onto the image layer, or inspect if the annotation is flattened. |
26+
| [`modificationDate`](#modificationdate) | Return the modification date of the annotation. |
27+
| [`getOptions()`](#getoptions) | Get the annotation options. |
28+
| [`updateOptions()`](#updateoptions) | Update the annotation options. |
29+
30+
## uid
31+
32+
Return the uid of the annotation.
33+
34+
**Syntax**
35+
36+
```typescript
37+
readonly uid: string;
38+
```
39+
40+
{% comment %}
41+
**Remark**
42+
43+
- It will return `''`, if the annotation is deleted.
44+
{% endcomment %}
45+
46+
## pageUid
47+
48+
Return the uid of the page where the annotation is located.
49+
50+
**Syntax**
51+
52+
```typescript
53+
readonly pageUid: string;
54+
```
55+
56+
**Remark**
57+
58+
- It will return `''`, if the annotation is deleted.
59+
60+
{% comment %}
61+
## aabb
62+
63+
Return Axis-aligned bounding box of the annotation.
64+
65+
**Syntax**
66+
67+
```typescript
68+
readonly aabb: Rect;
69+
```
70+
71+
**Remark**
72+
73+
![AABB-Ellipse](/assets/imgs/aabbellipse.png)
74+
75+
{% endcomment %}
76+
77+
## source
78+
79+
Return the source of the annotation. Possible values:
80+
81+
* user: the annotation is created by the user's action
82+
* file: the annotation is created from a PDF file
83+
* api: the annotation is created with code
84+
85+
**Remark**
86+
87+
It will return `''`, if the annotation is deleted.
88+
89+
## type
90+
91+
Return the type of the annotation: `ellipse`.
92+
93+
All annotation types:
94+
95+
```ts
96+
"rectangle" | "ellipse" | "line" | "polygon" | "polyline" | "ink" | "textBox" | "textTypewriter" | "stamp" | "highlight" | "underline" | "strikeout" | "incomplete" | "unknown"
97+
```
98+
99+
## creationDate
100+
101+
Return the creation date of the annotation.
102+
103+
**Syntax**
104+
105+
```typescript
106+
readonly creationDate: string;
107+
```
108+
109+
**Remark**
110+
111+
- The string would be `D:YYYYMMDDHHmmSSOHH'mm'`, like `D:20230101085959-08'00'`.
112+
113+
{% comment %}
114+
- It will return `''`, if the annotation is deleted.
115+
{% endcomment %}
116+
117+
## flattened
118+
119+
Flattens the annotation onto the image layer, or inspect if the annotation is flattened.
120+
121+
**Syntax**
122+
123+
```typescript
124+
flattened: boolean; //Default value is `false`.
125+
```
126+
127+
**Remark**
128+
129+
Flattened annotations move below all unflattened annotations on the page, and are stacked amongst themselves accordingly.
130+
131+
Flattened annotations become part of the page layer upon file export and cease to be annotations.
132+
133+
## modificationDate
134+
135+
Return the modification date of the annotation.
136+
137+
**Syntax**
138+
139+
```typescript
140+
readonly modificationDate: string;
141+
```
142+
143+
**Remark**
144+
145+
- The string would be `D:YYYYMMDDHHmmSSOHH'mm'`, like `D:20230101085959-08'00'`.
146+
- It will return `''`, if the annotation is deleted.
147+
- If the annotation is created but not be modified after adding, it equals to [`creationDate`](#creationdate).
148+
149+
## getOptions()
150+
151+
Get the annotation options.
152+
153+
**Syntax**
154+
155+
```typescript
156+
getOptions(): EllipseAnnotationOptions;
157+
```
158+
159+
**Return value**
160+
161+
The object of ellipse annotation options. Please refer to [`EllipseAnnotationOptions`]({{ site.api }}interface/annotationinterface/ellipseannotationoptions.html).
162+
163+
**Code Snippet**
164+
165+
```typescript
166+
// Given that editViewer is an existing instance of EditViewer and a document is currently open.
167+
const pageUid = editViewer.indexToUid(0);
168+
const ellipse = Dynamsoft.DDV.annotationManager.createAnnotation(pageUid, "ellipse"); // Create a default Ellipse annotation instance.
169+
const ellipseOptions = ellipse.getOptions();
170+
```
171+
172+
## updateOptions()
173+
174+
Update the annotation options.
175+
176+
**Syntax**
177+
178+
```typescript
179+
updateOptions(ellipseAnnotationOptions: EllipseAnnotationOptions): boolean;
180+
```
181+
182+
**Parameters**
183+
184+
`ellipseAnnotationOptions`: The new ellipse annotation options. Please refer to [`EllipseAnnotationOptions`]({{ site.api }}interface/annotationinterface/ellipseannotationoptions.html).
185+
186+
**Return value**
187+
188+
`true`: Successfully.
189+
190+
`false`: Failed.
191+
192+
**Code Snippet**
193+
194+
```typescript
195+
// Given that editViewer is an existing instance of EditViewer and a document is currently open.
196+
const pageUid = editViewer.indexToUid(0);
197+
const ellipse = Dynamsoft.DDV.annotationManager.createAnnotation(pageUid, "ellipse"); // Create a default Ellipse annotation instance.
198+
const ellipseOptions = {
199+
background: "red",
200+
};
201+
ellipse.updateOptions(ellipseOptions); // Update the background of the ellipse to red.
202+
```
203+
204+
**Warning**
205+
206+
Error Code | Error Message | API Return Value
207+
--------|-----------------------------------------------------|----------------------
208+
-80100 | *XXX(API)*: *XXX(ParameterName)* is invalid. | `false`
209+
-80102 | *XXX(API)*: *XXX(ParameterName)* is missing. | `false`

0 commit comments

Comments
 (0)