Skip to content

Commit 48f2739

Browse files
authored
Merge pull request #266 from dynamsoft-docs/v4.0
sync v4.0 to preview
2 parents 47404f3 + c212a64 commit 48f2739

65 files changed

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

0 commit comments

Comments
 (0)