PDFLineJoin.java
1.68 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidParameterException
*/
package com.adobe.internal.pdftoolkit.pdf.graphics;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidParameterException;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public enum PDFLineJoin {
MITER_JOIN(0),
ROUND_JOIN(1),
BEVEL_JOIN(2);
private final int lineJoin;
private PDFLineJoin(int lineJoin) {
this.lineJoin = lineJoin;
}
public String toString() {
String lineJoinStr = null;
switch (this.lineJoin) {
case 0: {
lineJoinStr = "miter join";
break;
}
case 1: {
lineJoinStr = "round join";
break;
}
case 2: {
lineJoinStr = "bevel join";
}
}
return lineJoinStr;
}
int getValue() {
return this.lineJoin;
}
public static final PDFLineJoin getInstance(int lineJoinValue) throws PDFInvalidParameterException {
PDFLineJoin lineJoin = null;
switch (lineJoinValue) {
case 0: {
lineJoin = MITER_JOIN;
break;
}
case 1: {
lineJoin = ROUND_JOIN;
break;
}
case 2: {
lineJoin = BEVEL_JOIN;
break;
}
default: {
throw new PDFInvalidParameterException("illegal line join value");
}
}
return lineJoin;
}
}