287288289290291292293294295296297
ctx = null; builder = null; try { gen.commentln("%FOPBeginSVG"); gen.saveGraphicsState(); /* * Clip to the svg area. * Note: To have the svg overlay (under) a text area then use * an fo:block-container */
6263646566676869707172
float sx = fwidth / (float)imw; float sy = fheight / (float)imh; gen.commentln("%FOPBeginGraphics2D"); gen.saveGraphicsState(); // Clip to the image area. gen.writeln("newpath"); gen.defineRect(fx, fy, fwidth, fheight); gen.writeln("clip");
118119120121122123124125126127128
//Color and Font state g2d.establishColor(g2d.getColor()); establishCurrentFont(); PSGenerator gen = getPSGenerator(); gen.saveGraphicsState(); //Clip Shape imclip = g2d.getClip(); g2d.writeClip(imclip);
286287288289290291292293294295296
121122123124125126127128129130131
//Draw using Java2D when no native fonts are available textRun.getLayout().draw(g2d); return; } gen.saveGraphicsState(); gen.concatMatrix(g2d.getTransform()); Shape imclip = g2d.getClip(); clip(ps, imclip); gen.writeln("BT"); //beginTextObject()
119120121122123124125126127128129
303304305306307308309310311312313
* @throws IOException if an I/O error occurs */ protected void beginTextObject() throws IOException { if (!inTextMode) { PSGenerator generator = getGenerator(); generator.saveGraphicsState(); generator.writeln("BT"); inTextMode = true; } }