< prev index next >

src/java.desktop/share/classes/sun/print/PSPrinterJob.java

Print this page

        

*** 114,131 **** public class PSPrinterJob extends RasterPrinterJob { /* Class Constants */ /** ! * Passed to the <code>setFillMode</code> * method this value forces fills to be * done using the even-odd fill rule. */ protected static final int FILL_EVEN_ODD = 1; /** ! * Passed to the <code>setFillMode</code> * method this value forces fills to be * done using the non-zero winding rule. */ protected static final int FILL_WINDING = 2; --- 114,131 ---- public class PSPrinterJob extends RasterPrinterJob { /* Class Constants */ /** ! * Passed to the {@code setFillMode} * method this value forces fills to be * done using the even-odd fill rule. */ protected static final int FILL_EVEN_ODD = 1; /** ! * Passed to the {@code setFillMode} * method this value forces fills to be * done using the non-zero winding rule. */ protected static final int FILL_WINDING = 2;
*** 292,309 **** File spoolFile; /** * This string holds the PostScript operator to * be used to fill a path. It can be changed ! * by the <code>setFillMode</code> method. */ private String mFillOpStr = WINDING_FILL_STR; /** * This string holds the PostScript operator to * be used to clip to a path. It can be changed ! * by the <code>setFillMode</code> method. */ private String mClipOpStr = WINDING_CLIP_STR; /** * A stack that represents the PostScript gstate stack. --- 292,309 ---- File spoolFile; /** * This string holds the PostScript operator to * be used to fill a path. It can be changed ! * by the {@code setFillMode} method. */ private String mFillOpStr = WINDING_FILL_STR; /** * This string holds the PostScript operator to * be used to clip to a path. It can be changed ! * by the {@code setFillMode} method. */ private String mClipOpStr = WINDING_CLIP_STR; /** * A stack that represents the PostScript gstate stack.
*** 874,891 **** mPSStream.println(SHOWPAGE); } /** * Convert the 24 bit BGR image buffer represented by ! * <code>image</code> to PostScript. The image is drawn at ! * <code>(destX, destY)</code> in device coordinates. * The image is scaled into a square of size ! * specified by <code>destWidth</code> and ! * <code>destHeight</code>. The portion of the * source image copied into that square is specified ! * by <code>srcX</code>, <code>srcY</code>, ! * <code>srcWidth</code>, and srcHeight. */ protected void drawImageBGR(byte[] bgrData, float destX, float destY, float destWidth, float destHeight, float srcX, float srcY, --- 874,891 ---- mPSStream.println(SHOWPAGE); } /** * Convert the 24 bit BGR image buffer represented by ! * {@code image} to PostScript. The image is drawn at ! * {@code (destX, destY)} in device coordinates. * The image is scaled into a square of size ! * specified by {@code destWidth} and ! * {@code destHeight}. The portion of the * source image copied into that square is specified ! * by {@code srcX}, {@code srcY}, ! * {@code srcWidth}, and srcHeight. */ protected void drawImageBGR(byte[] bgrData, float destX, float destY, float destWidth, float destHeight, float srcX, float srcY,
*** 1024,1041 **** mPSStream.println(IMAGE_RESTORE); } /** * Examine the metrics captured by the ! * <code>PeekGraphics</code> instance and * if capable of directly converting this * print job to the printer's control language * or the native OS's graphics primitives, then ! * return a <code>PSPathGraphics</code> to perform * that conversion. If there is not an object * capable of the conversion then return ! * <code>null</code>. Returning <code>null</code> * causes the print job to be rasterized. */ protected Graphics2D createPathGraphics(PeekGraphics peekGraphics, PrinterJob printerJob, --- 1024,1041 ---- mPSStream.println(IMAGE_RESTORE); } /** * Examine the metrics captured by the ! * {@code PeekGraphics} instance and * if capable of directly converting this * print job to the printer's control language * or the native OS's graphics primitives, then ! * return a {@code PSPathGraphics} to perform * that conversion. If there is not an object * capable of the conversion then return ! * {@code null}. Returning {@code null} * causes the print job to be rasterized. */ protected Graphics2D createPathGraphics(PeekGraphics peekGraphics, PrinterJob printerJob,
*** 1347,1358 **** return didText; } /** * Set the current path rule to be either ! * <code>FILL_EVEN_ODD</code> (using the ! * even-odd file rule) or <code>FILL_WINDING</code> * (using the non-zero winding rule.) */ protected void setFillMode(int fillRule) { switch (fillRule) { --- 1347,1358 ---- return didText; } /** * Set the current path rule to be either ! * {@code FILL_EVEN_ODD} (using the ! * even-odd file rule) or {@code FILL_WINDING} * (using the non-zero winding rule.) */ protected void setFillMode(int fillRule) { switch (fillRule) {
*** 1373,1383 **** } /** * Set the printer's current color to be that ! * defined by <code>color</code> */ protected void setColor(Color color) { mLastColor = color; } --- 1373,1383 ---- } /** * Set the printer's current color to be that ! * defined by {@code color} */ protected void setColor(Color color) { mLastColor = color; }
*** 1416,1426 **** } /** * Generate PostScript to move the current pen ! * position to <code>(x, y)</code>. */ protected void moveTo(float x, float y) { mPSStream.println(trunc(x) + " " + trunc(y) + MOVETO_STR); --- 1416,1426 ---- } /** * Generate PostScript to move the current pen ! * position to {@code (x, y)}. */ protected void moveTo(float x, float y) { mPSStream.println(trunc(x) + " " + trunc(y) + MOVETO_STR);
*** 1435,1445 **** mPenX = x; mPenY = y; } /** * Generate PostScript to draw a line from the ! * current pen position to <code>(x, y)</code>. */ protected void lineTo(float x, float y) { mPSStream.println(trunc(x) + " " + trunc(y) + LINETO_STR); --- 1435,1445 ---- mPenX = x; mPenY = y; } /** * Generate PostScript to draw a line from the ! * current pen position to {@code (x, y)}. */ protected void lineTo(float x, float y) { mPSStream.println(trunc(x) + " " + trunc(y) + LINETO_STR);
*** 1859,1869 **** psFontIndex + " " + SetFontName); } } /** ! * Given a Java2D <code>PathIterator</code> instance, * this method translates that into a PostScript path.. */ void convertToPSPath(PathIterator pathIter) { float[] segment = new float[6]; --- 1859,1869 ---- psFontIndex + " " + SetFontName); } } /** ! * Given a Java2D {@code PathIterator} instance, * this method translates that into a PostScript path.. */ void convertToPSPath(PathIterator pathIter) { float[] segment = new float[6];
*** 1924,1934 **** pathIter.next(); } } /* ! * Fill the path defined by <code>pathIter</code> * with the specified color. * The path is provided in current user space. */ protected void deviceFill(PathIterator pathIter, Color color, AffineTransform tx, Shape clip) { --- 1924,1934 ---- pathIter.next(); } } /* ! * Fill the path defined by {@code pathIter} * with the specified color. * The path is provided in current user space. */ protected void deviceFill(PathIterator pathIter, Color color, AffineTransform tx, Shape clip) {
< prev index next >