keiron      01/06/18 01:10:46

  Modified:    src/org/apache/fop/pdf PDFColor.java PDFFunction.java
                        PDFNumber.java PDFPattern.java PDFShading.java
                        PDFXObject.java
  Log:
  changed PDFNumber to use static methods
  
  Revision  Changes    Path
  1.9       +22 -69    xml-fop/src/org/apache/fop/pdf/PDFColor.java
  
  Index: PDFColor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFColor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PDFColor.java     2001/02/05 06:22:48     1.8
  +++ PDFColor.java     2001/06/18 08:10:22     1.9
  @@ -1,52 +1,7 @@
  -/*-- $Id: PDFColor.java,v 1.8 2001/02/05 06:22:48 kellyc Exp $ -- 
  -
  - ============================================================================
  -                                              The Apache Software License, Version 
1.1
  - ============================================================================
  - 
  -      Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
  - 
  - Redistribution and use in source and binary forms, with or without modifica-
  - tion, are permitted provided that the following conditions are met:
  - 
  - 1. Redistributions of       source code must        retain the above copyright     
 notice,
  -      this list of conditions and the following disclaimer.
  - 
  - 2. Redistributions in binary form must reproduce the above copyright notice,
  -      this list of conditions and the following disclaimer in the documentation
  -      and/or other materials provided with the distribution.
  - 
  - 3. The end-user documentation included with the redistribution, if any, must
  -      include  the following  acknowledgment:        "This product includes  
software
  -      developed      by the  Apache Software Foundation      
(http://www.apache.org/)."
  -      Alternately, this      acknowledgment may      appear in the software itself, 
 if
  -      and wherever such third-party acknowledgments normally appear.
  - 
  - 4. The names "Fop" and  "Apache Software Foundation"  must not be used to
  -      endorse  or promote  products derived  from this       software without       
 prior
  -      written permission. For written permission, please contact
  -      [EMAIL PROTECTED]
  - 
  - 5. Products  derived from this software may not  be called "Apache", nor may
  -      "Apache" appear        in their name,  without prior written permission  of 
the
  -      Apache Software Foundation.
  - 
  - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  - FITNESS  FOR A PARTICULAR   PURPOSE ARE  DISCLAIMED.        IN NO  EVENT SHALL     
 THE
  - APACHE SOFTWARE     FOUNDATION      OR ITS CONTRIBUTORS     BE LIABLE FOR   ANY 
DIRECT,
  - INDIRECT, INCIDENTAL, SPECIAL,      EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT       OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)       HOWEVER CAUSED AND ON
  - ANY THEORY OF LIABILITY,  WHETHER  IN CONTRACT,     STRICT LIABILITY,  OR TORT
  - (INCLUDING  NEGLIGENCE OR   OTHERWISE) ARISING IN   ANY WAY OUT OF THE      USE OF
  - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  - 
  - This software       consists of voluntary contributions made  by many individuals
  - on  behalf of the Apache Software   Foundation and was      originally created by
  - James Tauber <[EMAIL PROTECTED]>. For more  information on the Apache 
  - Software Foundation, please see <http://www.apache.org/>.
  - 
  +/* $Id: PDFColor.java,v 1.9 2001/06/18 08:10:22 keiron Exp $
  + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * For details on use and redistribution please refer to the
  + * LICENSE file included with these sources.
    */
   package org.apache.fop.pdf;
   
  @@ -70,8 +25,6 @@
        protected double yellow = -1.0;
        protected double black  = -1.0;
        
  -     private PDFNumber pdfNumber = new PDFNumber();
  -     
        public PDFColor(org.apache.fop.datatypes.ColorType theColor)
        {
                this.colorSpace = new ColorSpace(ColorSpace.DEVICE_RGB);
  @@ -233,22 +186,22 @@
                        if(fillNotStroke)
                        { //fill
                                if(same) {
  -                                     p.append(pdfNumber.doubleOut(this.red) + " 
g\n");
  +                                     p.append(PDFNumber.doubleOut(this.red) + " 
g\n");
                                } else {
  -                                     p.append(pdfNumber.doubleOut(this.red)+" "
  -                                             +pdfNumber.doubleOut(this.green)+" "
  -                                             +pdfNumber.doubleOut(this.blue)+" "
  +                                     p.append(PDFNumber.doubleOut(this.red)+" "
  +                                             +PDFNumber.doubleOut(this.green)+" "
  +                                             +PDFNumber.doubleOut(this.blue)+" "
                                                +" rg \n");
                                }
                        } 
                        else
                        {//stroke/border
                                if(same) {
  -                                     p.append(pdfNumber.doubleOut(this.red) + " 
G\n");
  +                                     p.append(PDFNumber.doubleOut(this.red) + " 
G\n");
                                } else {
  -                                     p.append(pdfNumber.doubleOut(this.red)+" "
  -                                             +pdfNumber.doubleOut(this.green)+" "
  -                                             +pdfNumber.doubleOut(this.blue)+" "
  +                                     p.append(PDFNumber.doubleOut(this.red)+" "
  +                                             +PDFNumber.doubleOut(this.green)+" "
  +                                             +PDFNumber.doubleOut(this.blue)+" "
                                                +" RG \n");
                                }
                        }
  @@ -258,17 +211,17 @@
                        
                        if(fillNotStroke)
                        { //fill
  -                             p.append(pdfNumber.doubleOut(this.cyan) + " "
  -                                     + pdfNumber.doubleOut(this.magenta) + " "
  -                                     + pdfNumber.doubleOut(this.yellow) + " "
  -                                     + pdfNumber.doubleOut(this.black) + " k \n");
  +                             p.append(PDFNumber.doubleOut(this.cyan) + " "
  +                                     + PDFNumber.doubleOut(this.magenta) + " "
  +                                     + PDFNumber.doubleOut(this.yellow) + " "
  +                                     + PDFNumber.doubleOut(this.black) + " k \n");
                        }
                        else
                        { //fill
  -                             p.append(pdfNumber.doubleOut(this.cyan) + " "
  -                                     + pdfNumber.doubleOut(this.magenta) + " "
  -                                     + pdfNumber.doubleOut(this.yellow) + " "
  -                                     + pdfNumber.doubleOut(this.black) + " K \n");
  +                             p.append(PDFNumber.doubleOut(this.cyan) + " "
  +                                     + PDFNumber.doubleOut(this.magenta) + " "
  +                                     + PDFNumber.doubleOut(this.yellow) + " "
  +                                     + PDFNumber.doubleOut(this.black) + " K \n");
                        }
                        
                }//end of if CMYK
  @@ -277,11 +230,11 @@
                
                        if(fillNotStroke)
                        {
  -                             p.append(pdfNumber.doubleOut(this.black)        + " g 
\n");
  +                             p.append(PDFNumber.doubleOut(this.black)        + " g 
\n");
                        }
                        else
                        {
  -                             p.append(pdfNumber.doubleOut(this.black)        + " G 
\n");
  +                             p.append(PDFNumber.doubleOut(this.black)        + " G 
\n");
                        }
                
                }
  
  
  
  1.6       +21 -67    xml-fop/src/org/apache/fop/pdf/PDFFunction.java
  
  Index: PDFFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFFunction.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PDFFunction.java  2000/12/18 02:28:32     1.5
  +++ PDFFunction.java  2001/06/18 08:10:24     1.6
  @@ -1,52 +1,7 @@
  -/*-- $Id: PDFFunction.java,v 1.5 2000/12/18 02:28:32 kellyc Exp $ -- 
  -
  - ============================================================================
  -                                              The Apache Software License, Version 
1.1
  - ============================================================================
  - 
  -      Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
  - 
  - Redistribution and use in source and binary forms, with or without modifica-
  - tion, are permitted provided that the following conditions are met:
  - 
  - 1. Redistributions of       source code must        retain the above copyright  
notice,
  -      this list of conditions and the following disclaimer.
  - 
  - 2. Redistributions in binary form must reproduce the above copyright notice,
  -      this list of conditions and the following disclaimer in the documentation
  -      and/or other materials provided with the distribution.
  - 
  - 3. The end-user documentation included with the redistribution, if any, must
  -      include  the following  acknowledgment:        "This product includes  
software
  -      developed      by the  Apache Software Foundation      
(http://www.apache.org/)."
  -      Alternately, this  acknowledgment may  appear in the software itself,  if
  -      and wherever such third-party acknowledgments normally appear.
  - 
  - 4. The names "Fop" and  "Apache Software Foundation"  must not be used to
  -      endorse  or promote  products derived  from this       software without       
 prior
  -      written permission. For written permission, please contact
  -      [EMAIL PROTECTED]
  - 
  - 5. Products  derived from this software may not  be called "Apache", nor may
  -      "Apache" appear        in their name,  without prior written permission  of 
the
  -      Apache Software Foundation.
  - 
  - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  - FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED. IN NO  EVENT SHALL  THE
  - APACHE SOFTWARE     FOUNDATION      OR ITS CONTRIBUTORS     BE LIABLE FOR   ANY 
DIRECT,
  - INDIRECT, INCIDENTAL, SPECIAL,      EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  - ANY THEORY OF LIABILITY,  WHETHER  IN CONTRACT,     STRICT LIABILITY,  OR TORT
  - (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN    ANY WAY OUT OF THE  USE OF
  - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  - 
  - This software  consists of voluntary contributions made  by many individuals
  - on  behalf of the Apache Software   Foundation and was  originally created by
  - James Tauber <[EMAIL PROTECTED]>. For more  information on the Apache 
  - Software Foundation, please see <http://www.apache.org/>.
  - 
  +/* $Id: PDFFunction.java,v 1.6 2001/06/18 08:10:24 keiron Exp $
  + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * For details on use and redistribution please refer to the
  + * LICENSE file included with these sources.
    */
   
   package org.apache.fop.pdf;
  @@ -142,7 +97,6 @@
      
        /* *************************TYPE 4************************** */
        //See 'data' above.
  -     private PDFNumber pdfNumber = new PDFNumber();
        
        /**
         * create an complete Function object of Type 0, A Sampled function.
  @@ -391,7 +345,7 @@
                                vectorSize = this.domain.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                                (Double)this.domain.elementAt(tempInt))
                                                +" ");
                                }
  @@ -410,7 +364,7 @@
                                vectorSize = this.size.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.size.elementAt(tempInt)) +" ");
                                }
                                p.append("] \n");
  @@ -422,7 +376,7 @@
                                vectorSize = this.encode.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.encode.elementAt(tempInt)) +" ");
                                }
                                p.append("] \n");
  @@ -455,7 +409,7 @@
                                vectorSize = this.range.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.range.elementAt(tempInt)) +" ");
                                }
                                
  @@ -469,7 +423,7 @@
                                vectorSize = this.decode.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.decode.elementAt(tempInt)) +" ");
                                }
                                
  @@ -522,7 +476,7 @@
                                vectorSize = this.domain.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.domain.elementAt(tempInt)) +" ");
                                }
                                
  @@ -541,7 +495,7 @@
                                vectorSize = this.range.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.range.elementAt(tempInt)) +" ");
                                }
                                
  @@ -557,7 +511,7 @@
                                vectorSize = this.cZero.size();
                                for(tempInt = 0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.cZero.elementAt(tempInt))+" ");
                                }
                                p.append("] \n");                               
  @@ -570,7 +524,7 @@
                                vectorSize = this.cOne.size();
                                for(tempInt = 0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.cOne.elementAt(tempInt))+" ");
                                }
                                p.append("] \n");
  @@ -578,7 +532,7 @@
                        
                        //N: The interpolation Exponent
                        p.append("/N "
  -                             +pdfNumber.doubleOut(
  +                             +PDFNumber.doubleOut(
                                        new Double(this.interpolationExponentN))
                                +" \n");
                        
  @@ -594,7 +548,7 @@
                                vectorSize = this.domain.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.domain.elementAt(tempInt)) +" ");
                                }
                                p.append("] \n");
  @@ -611,7 +565,7 @@
                                vectorSize = this.range.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.range.elementAt(tempInt)) +" ");
                                }
                                
  @@ -639,7 +593,7 @@
                                vectorSize = this.encode.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.encode.elementAt(tempInt)) +" ");
                                }
                                                                
  @@ -666,7 +620,7 @@
                                vectorSize= this.bounds.size();
                                for(tempInt = 0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.bounds.elementAt(tempInt))+" ");
                                }
                        
  @@ -681,7 +635,7 @@
                                        // of the whole. e.g. if there are 4, then [ 
0.25 0.25 0.25 ]
                                        
                                        String functionsFraction = 
  -                                             pdfNumber.doubleOut(new Double(
  +                                             PDFNumber.doubleOut(new Double(
                                                        1.0 / 
((double)numberOfFunctions)));
        
                                        for(tempInt =0;tempInt+1 < numberOfFunctions; 
tempInt++)
  @@ -708,7 +662,7 @@
                                vectorSize = this.domain.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.domain.elementAt(tempInt)) +" ");
                                }
                                
  @@ -726,7 +680,7 @@
                                vectorSize = this.range.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.range.elementAt(tempInt)) +" ");
                                }
                                
  
  
  
  1.4       +10 -58    xml-fop/src/org/apache/fop/pdf/PDFNumber.java
  
  Index: PDFNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFNumber.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PDFNumber.java    2001/02/23 04:37:01     1.3
  +++ PDFNumber.java    2001/06/18 08:10:27     1.4
  @@ -1,67 +1,18 @@
  -/*-- $Id: PDFNumber.java,v 1.3 2001/02/23 04:37:01 keiron Exp $ -- 
  -
  - ============================================================================
  -                                The Apache Software License, Version 1.1
  - ============================================================================
  - 
  -     Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
  - 
  - Redistribution and use in source and binary forms, with or without modifica-
  - tion, are permitted provided that the following conditions are met:
  - 
  - 1. Redistributions of       source code must  retain the above copyright  notice,
  -     this list of conditions and the following disclaimer.
  - 
  - 2. Redistributions in binary form must reproduce the above copyright notice,
  -     this list of conditions and the following disclaimer in the documentation
  -     and/or other materials provided with the distribution.
  - 
  - 3. The end-user documentation included with the redistribution, if any, must
  -     include  the following  acknowledgment:  "This product includes  software
  -     developed  by the  Apache Software Foundation  (http://www.apache.org/)."
  -     Alternately, this  acknowledgment may  appear in the software itself,  if
  -     and wherever such third-party acknowledgments normally appear.
  - 
  - 4. The names "FOP" and  "Apache Software Foundation"  must not be used to
  -     endorse  or promote  products derived  from this  software without      prior
  -     written permission. For written permission, please contact
  -     [EMAIL PROTECTED]
  - 
  - 5. Products  derived from this software may not  be called "Apache", nor may
  -     "Apache" appear  in their name,  without prior written permission  of the
  -     Apache Software Foundation.
  - 
  - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  - FITNESS  FOR A PARTICULAR   PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  - APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
  - INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT       OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)       HOWEVER CAUSED AND ON
  - ANY  THEORY OF LIABILITY,   WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
  - (INCLUDING  NEGLIGENCE OR   OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
  - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  - 
  - This software       consists of voluntary contributions made  by many individuals
  - on  behalf of the Apache Software   Foundation and was      originally created by
  - James Tauber <[EMAIL PROTECTED]>. For more  information on the Apache 
  - Software Foundation, please see <http://www.apache.org/>.
  - 
  +/* $Id: PDFNumber.java,v 1.4 2001/06/18 08:10:27 keiron Exp $
  + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * For details on use and redistribution please refer to the
  + * LICENSE file included with these sources.
    */
   
   package org.apache.fop.pdf;
   
   public class PDFNumber {
  -
        
  -     public PDFNumber()
  +     private PDFNumber()
        {
  -             
  -             //How can I allow people to use the method, without allowing 
construction?
  -             
        }
        
  -     public String doubleOut(Double doubleDown)
  +     public static String doubleOut(Double doubleDown)
        {
                StringBuffer p = new StringBuffer();
                if(doubleDown.doubleValue() < 0) {
  @@ -99,7 +50,7 @@
                return(p.toString());
        }
        
  -     public String doubleOut(double doubleDown)
  +     public static String doubleOut(double doubleDown)
        {
                
                StringBuffer p = new StringBuffer();
  @@ -139,7 +90,7 @@
                return(p.toString());
        }
   
  -     public String doubleOut(double doubleDown, int dec)
  +     public static String doubleOut(double doubleDown, int dec)
        {
                
                StringBuffer p = new StringBuffer();
  @@ -178,4 +129,5 @@
                }
                return(p.toString());
        }
  -} 
  +}
  + 
  
  
  
  1.7       +9 -56     xml-fop/src/org/apache/fop/pdf/PDFPattern.java
  
  Index: PDFPattern.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFPattern.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PDFPattern.java   2000/12/18 02:28:34     1.6
  +++ PDFPattern.java   2001/06/18 08:10:29     1.7
  @@ -1,52 +1,7 @@
  -/*-- $Id: PDFPattern.java,v 1.6 2000/12/18 02:28:34 kellyc Exp $ --
  -
  - ============================================================================
  -                                              The Apache Software License, Version 
1.1
  - ============================================================================
  -
  -      Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
  -
  - Redistribution and use in source and binary forms, with or without modifica-
  - tion, are permitted provided that the following conditions are met:
  -
  - 1. Redistributions of       source code must        retain the above copyright  
notice,
  -      this list of conditions and the following disclaimer.
  -
  - 2. Redistributions in binary form must reproduce the above copyright notice,
  -      this list of conditions and the following disclaimer in the documentation
  -      and/or other materials provided with the distribution.
  -
  - 3. The end-user documentation included with the redistribution, if any, must
  -      include  the following  acknowledgment:        "This product includes  
software
  -      developed      by the  Apache Software Foundation      
(http://www.apache.org/)."
  -      Alternately, this  acknowledgment may  appear in the software itself,  if
  -      and wherever such third-party acknowledgments normally appear.
  -
  - 4. The names "Fop" and  "Apache Software Foundation"  must not be used to
  -      endorse  or promote  products derived  from this       software without       
 prior
  -      written permission. For written permission, please contact
  -      [EMAIL PROTECTED]
  -
  - 5. Products  derived from this software may not  be called "Apache", nor may
  -      "Apache" appear        in their name,  without prior written permission  of 
the
  -      Apache Software Foundation.
  -
  - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  - FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED. IN NO  EVENT SHALL  THE
  - APACHE SOFTWARE     FOUNDATION      OR ITS CONTRIBUTORS     BE LIABLE FOR   ANY 
DIRECT,
  - INDIRECT, INCIDENTAL, SPECIAL,      EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  - ANY THEORY OF LIABILITY,  WHETHER  IN CONTRACT,     STRICT LIABILITY,  OR TORT
  - (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN    ANY WAY OUT OF THE  USE OF
  - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  -
  - This software  consists of voluntary contributions made  by many individuals
  - on  behalf of the Apache Software   Foundation and was  originally created by
  - James Tauber <[EMAIL PROTECTED]>. For more  information on the Apache
  - Software Foundation, please see <http://www.apache.org/>.
  -
  +/* $Id: PDFPattern.java,v 1.7 2001/06/18 08:10:29 keiron Exp $
  + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * For details on use and redistribution please refer to the
  + * LICENSE file included with these sources.
    */
   
   package org.apache.fop.pdf;
  @@ -68,8 +23,6 @@
    * All PDF Functions have a FunctionType (0,2,3, or 4), a Domain, and a Range.
    */
   public class PDFPattern extends PDFPathPaint {
  -     private PDFNumber pdfNumber = new PDFNumber();
  -     
        /**
         * The resources associated with this pattern
         */
  @@ -269,13 +222,13 @@
                                for (tempInt =0; tempInt < vectorSize; tempInt++)
                                {
                                        p.append(
  -                                     
pdfNumber.doubleOut((Double)this.bBox.elementAt(tempInt)));                            
 
  +                                     
PDFNumber.doubleOut((Double)this.bBox.elementAt(tempInt)));                            
 
                                        p.append(" ");
                                }
                                p.append("] \n");
                        }
  -                     p.append("/XStep "+pdfNumber.doubleOut(new 
Double(this.xStep))+" \n");
  -                     p.append("/YStep "+pdfNumber.doubleOut(new 
Double(this.yStep))+" \n");
  +                     p.append("/XStep "+PDFNumber.doubleOut(new 
Double(this.xStep))+" \n");
  +                     p.append("/YStep "+PDFNumber.doubleOut(new 
Double(this.yStep))+" \n");
                        
                        if(this.matrix != null)
                        {
  @@ -283,7 +236,7 @@
                                p.append("/Matrix [ ");
                                for (tempInt =0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                                
(Double)this.matrix.elementAt(tempInt)));
                                        p.append(" ");
                                }
  @@ -337,7 +290,7 @@
                                p.append("/Matrix [ ");
                                for (tempInt =0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.matrix.elementAt(tempInt)));
                                        p.append(" ");
                                }
  
  
  
  1.6       +10 -58    xml-fop/src/org/apache/fop/pdf/PDFShading.java
  
  Index: PDFShading.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFShading.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PDFShading.java   2000/12/18 02:28:34     1.5
  +++ PDFShading.java   2001/06/18 08:10:30     1.6
  @@ -1,52 +1,7 @@
  -/*-- $Id: PDFShading.java,v 1.5 2000/12/18 02:28:34 kellyc Exp $ -- 
  -
  - ============================================================================
  -                                              The Apache Software License, Version 
1.1
  - ============================================================================
  - 
  -      Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
  - 
  - Redistribution and use in source and binary forms, with or without modifica-
  - tion, are permitted provided that the following conditions are met:
  - 
  - 1. Redistributions of       source code must        retain the above copyright  
notice,
  -      this list of conditions and the following disclaimer.
  - 
  - 2. Redistributions in binary form must reproduce the above copyright notice,
  -      this list of conditions and the following disclaimer in the documentation
  -      and/or other materials provided with the distribution.
  - 
  - 3. The end-user documentation included with the redistribution, if any, must
  -      include  the following  acknowledgment:        "This product includes  
software
  -      developed      by the  Apache Software Foundation      
(http://www.apache.org/)."
  -      Alternately, this  acknowledgment may  appear in the software itself,  if
  -      and wherever such third-party acknowledgments normally appear.
  - 
  - 4. The names "Fop" and  "Apache Software Foundation"  must not be used to
  -      endorse  or promote  products derived  from this       software without       
 prior
  -      written permission. For written permission, please contact
  -      [EMAIL PROTECTED]
  - 
  - 5. Products  derived from this software may not  be called "Apache", nor may
  -      "Apache" appear        in their name,  without prior written permission  of 
the
  -      Apache Software Foundation.
  - 
  - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  - FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED. IN NO  EVENT SHALL  THE
  - APACHE SOFTWARE     FOUNDATION      OR ITS CONTRIBUTORS     BE LIABLE FOR   ANY 
DIRECT,
  - INDIRECT, INCIDENTAL, SPECIAL,      EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  - ANY THEORY OF LIABILITY,  WHETHER  IN CONTRACT,     STRICT LIABILITY,  OR TORT
  - (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN    ANY WAY OUT OF THE  USE OF
  - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  - 
  - This software  consists of voluntary contributions made  by many individuals
  - on  behalf of the Apache Software   Foundation and was  originally created by
  - James Tauber <[EMAIL PROTECTED]>. For more  information on the Apache 
  - Software Foundation, please see <http://www.apache.org/>.
  - 
  +/* $Id: PDFShading.java,v 1.6 2001/06/18 08:10:30 keiron Exp $
  + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * For details on use and redistribution please refer to the
  + * LICENSE file included with these sources.
    */
   
   package org.apache.fop.pdf;
  @@ -54,7 +9,6 @@
   //Java... 
   import java.util.Vector;
   
  -
   //FOP
   import org.apache.fop.datatypes.ColorSpace;
   
  @@ -160,8 +114,6 @@
         */
        protected int verticesPerRow = 0;
        
  -     private PDFNumber pdfNumber = new PDFNumber();
  -     
        /**
         * Constructor for type function based shading
         * 
  @@ -367,7 +319,7 @@
                        vectorSize = this.background.size();
                        for(tempInt=0; tempInt < vectorSize; tempInt++)
                        {
  -                             p.append(pdfNumber.doubleOut(
  +                             p.append(PDFNumber.doubleOut(
                                (Double)this.background.elementAt(tempInt)) +" ");
                        }
                        p.append("] \n");
  @@ -379,7 +331,7 @@
                        vectorSize = this.bBox.size();
                        for(tempInt=0; tempInt < vectorSize; tempInt++)
                        {
  -                             p.append(pdfNumber.doubleOut(
  +                             p.append(PDFNumber.doubleOut(
                                (Double)this.bBox.elementAt(tempInt)) +" ");
                        }
                        p.append("] \n");
  @@ -399,7 +351,7 @@
                                vectorSize = this.domain.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.domain.elementAt(tempInt)) +" ");
                                }
                                p.append("] \n");
  @@ -415,7 +367,7 @@
                                vectorSize = this.matrix.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.matrix.elementAt(tempInt)) +" ");
                                }
                                p.append("] \n");
  @@ -437,7 +389,7 @@
                                vectorSize = this.coords.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.coords.elementAt(tempInt)) +" ");
                                }
                                p.append("] \n");
  @@ -450,7 +402,7 @@
                                vectorSize = this.domain.size();
                                for(tempInt=0; tempInt < vectorSize; tempInt++)
                                {
  -                                     p.append(pdfNumber.doubleOut(
  +                                     p.append(PDFNumber.doubleOut(
                                        (Double)this.domain.elementAt(tempInt)) +" ");
                                }
                                p.append("] \n");
  
  
  
  1.12      +6 -50     xml-fop/src/org/apache/fop/pdf/PDFXObject.java
  
  Index: PDFXObject.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFXObject.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- PDFXObject.java   2001/01/19 16:03:16     1.11
  +++ PDFXObject.java   2001/06/18 08:10:33     1.12
  @@ -1,53 +1,9 @@
  -/*-- $Id: PDFXObject.java,v 1.11 2001/01/19 16:03:16 kellyc Exp $ -- 
  -
  - ============================================================================
  -                   The Apache Software License, Version 1.1
  - ============================================================================
  - 
  -    Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
  - 
  - Redistribution and use in source and binary forms, with or without modifica-
  - tion, are permitted provided that the following conditions are met:
  - 
  - 1. Redistributions of  source code must  retain the above copyright  notice,
  -    this list of conditions and the following disclaimer.
  - 
  - 2. Redistributions in binary form must reproduce the above copyright notice,
  -    this list of conditions and the following disclaimer in the documentation
  -    and/or other materials provided with the distribution.
  - 
  - 3. The end-user documentation included with the redistribution, if any, must
  -    include  the following  acknowledgment:  "This product includes  software
  -    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
  -    Alternately, this  acknowledgment may  appear in the software itself,  if
  -    and wherever such third-party acknowledgments normally appear.
  - 
  - 4. The names "Fop" and  "Apache Software Foundation"  must not be used to
  -    endorse  or promote  products derived  from this  software without  prior
  -    written permission. For written permission, please contact
  -    [EMAIL PROTECTED]
  - 
  - 5. Products  derived from this software may not  be called "Apache", nor may
  -    "Apache" appear  in their name,  without prior written permission  of the
  -    Apache Software Foundation.
  - 
  - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  - FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
  - APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
  - INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
  - DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
  - OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
  - ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
  - (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
  - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  - 
  - This software  consists of voluntary contributions made  by many individuals
  - on  behalf of the Apache Software  Foundation and was  originally created by
  - James Tauber <[EMAIL PROTECTED]>. For more  information on the Apache 
  - Software Foundation, please see <http://www.apache.org/>.
  - 
  +/* $Id: PDFXObject.java,v 1.12 2001/06/18 08:10:33 keiron Exp $
  + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * For details on use and redistribution please refer to the
  + * LICENSE file included with these sources.
    */
  +
   /* modified by JKT to integrate with 0.12.0 */
   /* modified by Eric SCHAEFFER to integrate with 0.13.0 */
   
  @@ -126,7 +82,7 @@
                if (fopimage.isTransparent()) {
                        PDFColor transp = fopimage.getTransparentColor();
                        p = p + "/Mask [" + transp.red255() + " " + transp.red255() + 
" " + transp.green255() + " " + transp.green255() + " " + transp.blue255() + " " + 
transp.blue255() + "]\n";
  -             }
  +    }
                p = p + dictEntries;
                p = p + ">>\n";
   
  
  
  

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

Reply via email to