You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by bc...@apache.org on 2004/10/20 19:51:11 UTC

cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr ExternalGraphicLayoutManager.java

bckfnn      2004/10/20 10:51:11

  Modified:    src/java/org/apache/fop/layoutmgr
                        ExternalGraphicLayoutManager.java
  Log:
  Fourth phase of performance improvement.
  - Get rid of calls to FObj.getPropertyList() and its friends.
    Replace them with the property getters on the FO nodes.
  
  PR: 31699
  
  Revision  Changes    Path
  1.11      +7 -8      xml-fop/src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java
  
  Index: ExternalGraphicLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ExternalGraphicLayoutManager.java	20 Oct 2004 13:37:48 -0000	1.10
  +++ ExternalGraphicLayoutManager.java	20 Oct 2004 17:51:11 -0000	1.11
  @@ -73,21 +73,20 @@
           url = ImageFactory.getURL(fobj.getSrc());
   
           // assume lr-tb for now and just use the .optimum value of the range
  -        Length ipd = fobj.getPropertyList().get(PR_INLINE_PROGRESSION_DIMENSION).
  -                                    getLengthRange().getOptimum().getLength();
  +        Length ipd = fobj.getInlineProgressionDimension().getOptimum().getLength();
           if (!ipd.isAuto()) {
               viewWidth = ipd.getValue();
           } else {
  -            ipd = fobj.getPropertyList().get(PR_WIDTH).getLength();
  +            ipd = fobj.getWidth();
               if (!ipd.isAuto()) {
                   viewWidth = ipd.getValue();
               }
           }
  -        Length bpd = fobj.getPropertyList().get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength();
  +        Length bpd = fobj.getBlockProgressionDimension().getOptimum().getLength();
           if (!bpd.isAuto()) {
               viewHeight = bpd.getValue();
           } else {
  -            bpd = fobj.getPropertyList().get(PR_HEIGHT).getLength();
  +            bpd = fobj.getHeight();
               if (!bpd.isAuto()) {
                   viewHeight = bpd.getValue();
               }
  @@ -98,7 +97,7 @@
   
           int cwidth = -1;
           int cheight = -1;
  -        Length ch = fobj.getPropertyList().get(PR_CONTENT_HEIGHT).getLength();
  +        Length ch = fobj.getContentHeight();
           if (!ch.isAuto()) {
               /*if (ch.scaleToFit()) {
                   if (viewHeight != -1) {
  @@ -107,7 +106,7 @@
               } else {*/
               cheight = ch.getValue();
           }
  -        Length cw = fobj.getPropertyList().get(PR_CONTENT_WIDTH).getLength();
  +        Length cw = fobj.getContentWidth();
           if (!cw.isAuto()) {
               /*if (cw.scaleToFit()) {
                   if (viewWidth != -1) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org