blob: 1c61041cf4979aa127c8b25a410532c1a1048ae3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
package com.artifex.mupdf.fitz;
public class StructuredText
{
private long pointer;
protected native void finalize();
public void destroy() {
finalize();
pointer = 0;
}
private StructuredText(long p) {
pointer = p;
}
public native Rect[] search(String needle);
public native Rect[] highlight(Rect rect);
public native String copy(Rect rect);
public native TextBlock[] getBlocks();
public class TextBlock
{
public TextLine[] lines;
public Rect bbox;
}
public class TextLine
{
public TextSpan[] spans;
public Rect bbox;
}
public class TextSpan
{
public TextChar[] chars;
public Rect bbox;
}
public class TextChar
{
public int c;
public Rect bbox;
public boolean isWhitespace()
{
return Character.isWhitespace(c);
}
}
}
|