aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-09-08 19:22:57 +0200
committerSven Gothel <[email protected]>2013-09-08 19:22:57 +0200
commit541701f5803c5005864efcb09a0c4aacecb470f9 (patch)
treeeb210deb12710c4cc696c0326194fc1616f3c5fd /src
parent2a595c3d163d375a3fabc8c8b754492c0f2926d5 (diff)
TiledPrintingAWTBase/doc: Add description of how-to add a 'print-to-file' printer driver on OSX
Diffstat (limited to 'src')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java46
1 files changed, 33 insertions, 13 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java
index 50625d48c..ec216a95e 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java
@@ -55,6 +55,38 @@ import com.jogamp.common.util.locks.LockFactory;
import com.jogamp.common.util.locks.RecursiveLock;
import com.jogamp.opengl.test.junit.util.UITestCase;
+/**
+ * Base unit test class implementing {@link Printable}.
+ *
+ * <h5>Scaling of Frame and GL content</h5>
+ * <p>
+ * We fit the frame into the imageable area with for 72 dpi,
+ * assuming that is the default AWT painting density.
+ * </p>
+ * <p>
+ * The frame borders are considered.
+ * </p>
+ * <p>
+ * The frame's scale factor is used for the graphics print matrix
+ * of the overall print-job, hence no frame resize is required.
+ * </p>
+ * <p>
+ * The GL scale factor 'scaleGLMatXY', 72dpi/glDPI, is passed to the GL object
+ * which locally scales the print matrix and renders the scene with 1/scaleGLMatXY pixels.
+ * </p>
+ * <h5>Virtual printer driver</h5>
+ * <p>
+ * Note, on OSX you might need to setup a dummy printer, i.e. <i>print to file</i>.<br>
+ * As root:
+ * <pre>
+ cupsctl FileDevice=Yes
+ killall -HUP cupsd
+ mkdir /data/lp
+ chown USER /data/lp
+ chmod ugo+rwx /data/lp
+ lpadmin -p lprint -E -v file:/data/lp/out.ps -P /Library/Printers/PPDs/Contents/Resources/HP\ LaserJet\ 4\ Plus.gz
+ * </pre>
+ */
public abstract class TiledPrintingAWTBase extends UITestCase implements Printable {
public static final double MM_PER_INCH = 25.4;
@@ -121,19 +153,7 @@ public abstract class TiledPrintingAWTBase extends UITestCase implements Printab
System.err.println("PF: Page orientation "+pf.getOrientation());
/**
- * We fit the frame into the imageable area with for 72 dpi,
- * assuming that is the default AWT painting density.
- * <p>
- * The frame borders are considered.
- * </p>
- * <p>
- * The frame's scale factor is used for the graphics print matrix
- * of the overall print-job, hence no frame resize is required.
- * </p>
- * <p>
- * The GL scale factor 'scaleGLMatXY', 72dpi/glDPI, is passed to the GL object
- * which locally scales the print matrix and renders the scene with 1/scaleGLMatXY pixels.
- * </p>
+ * See: 'Scaling of Frame and GL content' in Class description!
*/
final Insets frameInsets = frame.getInsets();
final int frameWidth = frame.getWidth();