summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/java/example/TraceDevice.java37
1 files changed, 24 insertions, 13 deletions
diff --git a/platform/java/example/TraceDevice.java b/platform/java/example/TraceDevice.java
index 3e71974a..9bb9c71e 100644
--- a/platform/java/example/TraceDevice.java
+++ b/platform/java/example/TraceDevice.java
@@ -48,32 +48,35 @@ public class TraceDevice extends Device implements PathWalker, TextWalker
text.walk(this);
}
- public void fillPath(Path path, boolean evenOdd, Matrix ctm, ColorSpace cs, float color[], float alpha) {
+ public void close() {
+ }
+
+ public void fillPath(Path path, boolean evenOdd, Matrix ctm, ColorSpace cs, float color[], float alpha, int cp) {
System.out.println("fillPath " + evenOdd + " " + ctm + " " + traceColor(cs, color, alpha));
tracePath(path);
}
- public void strokePath(Path path, StrokeState stroke, Matrix ctm, ColorSpace cs, float color[], float alpha) {
+ public void strokePath(Path path, StrokeState stroke, Matrix ctm, ColorSpace cs, float color[], float alpha, int cp) {
System.out.println("strokePath " + traceStroke(stroke) + " " + ctm + " " + traceColor(cs, color, alpha));
tracePath(path);
}
- public void clipPath(Path path, Rect rect, boolean evenOdd, Matrix ctm) {
+ public void clipPath(Path path, boolean evenOdd, Matrix ctm) {
System.out.println("clipPath " + evenOdd + " " + ctm);
tracePath(path);
}
- public void clipStrokePath(Path path, Rect rect, StrokeState stroke, Matrix ctm) {
+ public void clipStrokePath(Path path, StrokeState stroke, Matrix ctm) {
System.out.println("clipStrokePath " + traceStroke(stroke) + " " + ctm);
tracePath(path);
}
- public void fillText(Text text, Matrix ctm, ColorSpace cs, float color[], float alpha) {
+ public void fillText(Text text, Matrix ctm, ColorSpace cs, float color[], float alpha, int cp) {
System.out.println("fillText " + ctm + " " + traceColor(cs, color, alpha));
traceText(text);
}
- public void strokeText(Text text, StrokeState stroke, Matrix ctm, ColorSpace cs, float color[], float alpha) {
+ public void strokeText(Text text, StrokeState stroke, Matrix ctm, ColorSpace cs, float color[], float alpha, int cp) {
System.out.println("strokeText " + ctm + " " + traceStroke(stroke) + " " + traceColor(cs, color, alpha));
traceText(text);
}
@@ -93,27 +96,27 @@ public class TraceDevice extends Device implements PathWalker, TextWalker
traceText(text);
}
- public void fillShade(Shade shd, Matrix ctm, float alpha) {
+ public void fillShade(Shade shd, Matrix ctm, float alpha, int cp) {
System.out.println("fillShade " + ctm + " " + alpha);
}
- public void fillImage(Image img, Matrix ctm, float alpha) {
+ public void fillImage(Image img, Matrix ctm, float alpha, int cp) {
System.out.println("fillImage " + ctm + " " + alpha);
}
- public void fillImageMask(Image img, Matrix ctm, ColorSpace cs, float color[], float alpha) {
+ public void fillImageMask(Image img, Matrix ctm, ColorSpace cs, float color[], float alpha, int cp) {
System.out.println("fillImageMask " + ctm + " " + traceColor(cs, color, alpha));
}
- public void clipImageMask(Image img, Rect rect, Matrix ctm) {
- System.out.println("clipImageMask " + ctm + " " + rect);
+ public void clipImageMask(Image img, Matrix ctm) {
+ System.out.println("clipImageMask " + ctm);
}
public void popClip() {
System.out.println("popClip");
}
- public void beginMask(Rect rect, boolean luminosity, ColorSpace cs, float bc[]) {
+ public void beginMask(Rect rect, boolean luminosity, ColorSpace cs, float bc[], int cp) {
System.out.println("beginMask r=" + rect +
" l=" + luminosity +
" " + traceColor(cs, bc, 1));
@@ -123,7 +126,7 @@ public class TraceDevice extends Device implements PathWalker, TextWalker
System.out.println("endMask");
}
- public void beginGroup(Rect rect, boolean isolated, boolean knockout, int blendmode, float alpha) {
+ public void beginGroup(Rect rect, ColorSpace cs, boolean isolated, boolean knockout, int blendmode, float alpha) {
System.out.println("beginGroup r=" + rect +
" i=" + isolated +
" k=" + knockout +
@@ -144,6 +147,14 @@ public class TraceDevice extends Device implements PathWalker, TextWalker
System.out.println("endTile");
}
+ public void beginLayer(String name) {
+ System.out.println("beginLayer");
+ }
+
+ public void endLayer() {
+ System.out.println("endLayer");
+ }
+
public static void main(String[] args) {
Document doc = Document.openDocument("pdfref17.pdf");
Page page = doc.loadPage(1144);