IteratingOutlineConsumer.java
2.36 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.fontengine.font;
import com.adobe.fontengine.font.Matrix;
import com.adobe.fontengine.font.OutlineConsumer;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
class IteratingOutlineConsumer
implements OutlineConsumer {
List elements = new ArrayList();
IteratingOutlineConsumer() {
}
public void curveto(double x2, double y2, double x3, double y3, double x4, double y4) {
this.elements.add(new Element(x2, y2, x3, y3, x4, y4));
}
public void curveto(double x2, double y2, double x3, double y3) {
this.elements.add(new Element(x2, y2, x3, y3));
}
public void endchar() {
}
public void lineto(double x, double y) {
this.elements.add(new Element(ElementType.line, x, y));
}
public void moveto(double x, double y) {
this.elements.add(new Element(ElementType.move, x, y));
}
public void setMatrix(Matrix newMatrix) {
}
Iterator iterator() {
return this.elements.iterator();
}
static final class ElementType {
private String type;
static final ElementType move = new ElementType("move");
static final ElementType quad = new ElementType("quadratic");
static final ElementType cube = new ElementType("cubic");
static final ElementType line = new ElementType("line");
private ElementType(String type) {
this.type = type;
}
public String toString() {
return this.type;
}
}
static final class Element {
ElementType type;
double x1;
double y1;
double x2;
double y2;
double x3;
double y3;
Element(ElementType type, double x1, double y1) {
this.type = type;
this.x1 = x1;
this.y1 = y1;
}
Element(double x1, double y1, double x2, double y2) {
this.type = ElementType.quad;
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
}
Element(double x1, double y1, double x2, double y2, double x3, double y3) {
this.type = ElementType.cube;
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
this.x3 = x3;
this.y3 = y3;
}
}
}