FopImage fopimg = new TempImage(width, height, result, null);
AffineTransform at = getTransform();
gen.saveGraphicsState();
+ gen.concatMatrix(at);
Shape imclip = getClip();
writeClip(imclip);
- gen.concatMatrix(at);
PSImageUtils.renderBitmapImage(fopimg,
x, y, width, height, gen);
gen.restoreGraphicsState();
boolean newTransform = gen.getCurrentState().checkTransform(trans)
&& !trans.isIdentity();
- Shape imclip = getClip();
- writeClip(imclip);
if (newTransform) {
gen.concatMatrix(trans);
}
+ Shape imclip = getClip();
+ writeClip(imclip);
establishColor(getColor());
applyPaint(getPaint(), false);
preparePainting();
try {
gen.writeln("newpath");
- PathIterator iter = s.getPathIterator(getTransform());
+ PathIterator iter = s.getPathIterator(IDENTITY_TRANSFORM);
processPathIterator(iter);
// clip area
gen.writeln("clip");
preparePainting();
try {
gen.saveGraphicsState();
+
+ AffineTransform trans = getTransform();
+ boolean newTransform = gen.getCurrentState().checkTransform(trans)
+ && !trans.isIdentity();
+
+ if (newTransform) {
+ gen.concatMatrix(trans);
+ }
Shape imclip = getClip();
writeClip(imclip);
+
establishColor(getColor());
applyPaint(getPaint(), true);
gen.writeln("newpath");
- PathIterator iter = s.getPathIterator(getTransform());
+ PathIterator iter = s.getPathIterator(IDENTITY_TRANSFORM);
processPathIterator(iter);
doDrawing(true, false,
iter.getWindingRule() == PathIterator.WIND_EVEN_ODD);
* Commits a painting operation.
* @param fill filling
* @param stroke stroking
- * @param nonzero ???
+ * @param nonzero true if the non-zero winding rule should be used when filling
* @exception IOException In case of an I/O problem
*/
protected void doDrawing(boolean fill, boolean stroke, boolean nonzero)
if (fill) {
if (stroke) {
if (!nonzero) {
- gen.writeln("stroke");
+ gen.writeln("gsave fill grestore stroke");
} else {
- gen.writeln("stroke");
+ gen.writeln("gsave eofill grestore stroke");
}
} else {
if (!nonzero) {
gen.writeln("fill");
} else {
- gen.writeln("fill");
+ gen.writeln("eofill");
}
}
} else {
double[] matrix = new double[6];
at.getMatrix(matrix);
currentStream.write("q\n");
- Shape imclip = getClip();
- writeClip(imclip);
if (!at.isIdentity()) {
concatMatrix(matrix);
}
+ Shape imclip = getClip();
+ writeClip(imclip);
currentStream.write("" + width + " 0 0 "
+ (-height) + " "
double[] matrix = new double[6];
at.getMatrix(matrix);
currentStream.write("q\n");
- Shape imclip = getClip();
- writeClip(imclip);
if (!at.isIdentity()) {
concatMatrix(matrix);
}
+ Shape imclip = getClip();
+ writeClip(imclip);
currentStream.write("" + width + " 0 0 " + (-height) + " " + x
+ " " + (y + height) + " cm\n" + "/Im"
+ imageInfo.getXNumber() + " Do\nQ\n");
if (newClip || newTransform) {
currentStream.write("q\n");
graphicsState.push();
- if (newClip) {
- writeClip(imclip);
- }
if (newTransform) {
concatMatrix(tranvals);
}
+ if (newClip) {
+ writeClip(imclip);
+ }
}
if (c.getAlpha() != 255) {
currentStream.write("q\n");
- Shape imclip = getClip();
- writeClip(imclip);
Color c = getColor();
applyColor(c, true);
applyPaint(getPaint(), true);
currentStream.write("/" + gstate.getName() + " gs\n");
}
- currentStream.write("BT\n");
-
Map kerning = null;
boolean kerningAvailable = false;
trans.getMatrix(vals);
concatMatrix(vals);
+ Shape imclip = getClip();
+ writeClip(imclip);
+ currentStream.write("BT\n");
+
currentStream.write("1 0 0 -1 0 0 Tm [" + startText);
int l = s.length();
if (newClip || newTransform) {
currentStream.write("q\n");
graphicsState.push();
- if (newClip) {
- writeClip(imclip);
- }
if (newTransform) {
concatMatrix(tranvals);
}
+ if (newClip) {
+ writeClip(imclip);
+ }
}
if (c.getAlpha() != 255) {