jeremias    2003/07/04 12:59:16

  Modified:    src/java/org/apache/fop/fo FOUserAgent.java
  Log:
  Make resolution configurable
  
  Revision  Changes    Path
  1.4       +10 -1     xml-fop/src/java/org/apache/fop/fo/FOUserAgent.java
  
  Index: FOUserAgent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOUserAgent.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FOUserAgent.java  25 Apr 2003 07:06:42 -0000      1.3
  +++ FOUserAgent.java  4 Jul 2003 19:59:16 -0000       1.4
  @@ -94,6 +94,7 @@
       private Map handlers = new java.util.HashMap();
       private String baseURL;
       private PDFEncryptionParams pdfEncryptionParams;
  +    private float px2mm = 0.35277777777777777778f; //72dpi (=25.4/dpi)
   
       /**
        * Sets the logger.
  @@ -168,7 +169,15 @@
        * @return float conversion factor
        */
       public float getPixelUnitToMillimeter() {
  -        return 0.35277777777777777778f;
  +        return this.px2mm;
  +    }
  +
  +    /**
  +     * Sets the resolution in dpi.
  +     * @param dpi resolution in dpi
  +     */
  +    public void setResolution(int dpi) {
  +        this.px2mm = (float)(25.4 / dpi);
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to