gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gzz/vob LinebreakableChain.java HChain.java


From: Benja Fallenstein
Subject: [Gzz-commits] gzz/gzz/vob LinebreakableChain.java HChain.java
Date: Sat, 21 Sep 2002 12:29:19 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/09/21 12:29:19

Modified files:
        gzz/vob        : LinebreakableChain.java 
Added files:
        gzz/vob        : HChain.java 

Log message:
        Extract interface from LinebreakableChain

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/HChain.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/LinebreakableChain.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gzz/gzz/vob/LinebreakableChain.java
diff -c gzz/gzz/vob/LinebreakableChain.java:1.3 
gzz/gzz/vob/LinebreakableChain.java:1.4
*** gzz/gzz/vob/LinebreakableChain.java:1.3     Thu Aug 15 17:05:29 2002
--- gzz/gzz/vob/LinebreakableChain.java Sat Sep 21 12:29:19 2002
***************
*** 23,36 ****
  package gzz.vob;
  import java.util.*;
  
! /** A chain with support for linebreaking operations.
!  * This chain knows about where lines can be broken, at what cost, and
!  * the amount of glue (as in TeX) on a given line.
!  * @see Linebreaker, AbstractLinebreaker, SimpleLinebreaker
   */
! 
! public class LinebreakableChain {
! String rcsid = "$Id: LinebreakableChain.java,v 1.3 2002/08/15 21:05:29 benja 
Exp $";
  
      public static final int GLUE_LENGTH = 0;
      public static final int GLUE_STRETCH = 1;
--- 23,32 ----
  package gzz.vob;
  import java.util.*;
  
! /** Default impl of <code>HChain</code>.
   */
! public class LinebreakableChain implements HChain {
! String rcsid = "$Id: LinebreakableChain.java,v 1.4 2002/09/21 16:29:19 benja 
Exp $";
  
      public static final int GLUE_LENGTH = 0;
      public static final int GLUE_STRETCH = 1;
***************
*** 67,87 ****
          glues[nboxes*3 + GLUE_SHRINK] += shr;
      }
  
-     /** Return the length of, i.e. the number of HBoxes in, this vob chain. */
      public int length() {
        return nboxes;
      }
  
-     /** Return the <code>n</code>th box in this chain. */
      public HBox getBox(int n) {
        return boxes[n];
      }
  
-     /** Return one of the values of the glue 
-      * before the <code>n</code>th box in this chain. 
-      *  @param property <code>GLUE_LENGTH</code>, <code>GLUE_STRETCH</code>,
-      *                  or <code>GLUE_SHRINK</code>.
-      */
      public int getGlue(int n, int property) {
        if(property < 0 || property > 2)
            throw new IllegalArgumentException("illegal property: "+property);
--- 63,76 ----
***************
*** 110,116 ****
  
      /** Ensure that at least <code>n</code> boxes fit into the arrays.
       *  Checks whether <code>n</code> is larger than the number of boxes
!      *  that currently fit into the arrays, and if so, calls 
       *  <code>allocCopy</code> to increase the arrays' size.
       *  @param accurate If the arrays don't suffice, whether to create
       *                arrays exactly of size <code>n</code>. Setting this
--- 99,105 ----
  
      /** Ensure that at least <code>n</code> boxes fit into the arrays.
       *  Checks whether <code>n</code> is larger than the number of boxes
!      *  that currently fit into the arrays, and if so, calls
       *  <code>allocCopy</code> to increase the arrays' size.
       *  @param accurate If the arrays don't suffice, whether to create
       *                arrays exactly of size <code>n</code>. Setting this
***************
*** 129,139 ****
  
  
  
-     /** Get the height of a line given the index of the first and the
-      *  index after the last box in that line. The height of the line is
-      *  simply the maximum of the heights of the individual boxes at
-      *  the given scale.
-      */
      public float getHeight(int start, int end, float scale) {
        float h = 0;
        for(int i=start; i<end; i++) {
--- 118,123 ----
***************
*** 143,153 ****
        return h;
      }
  
-     /** Get the depth of a line given the index of the first and the
-      *  index after the last box in that line. The depth of the line is
-      *  simply the maximum of the heights of the individual boxes at
-      *  the given scale.
-      */
      public float getDepth(int start, int end, float scale) {
        float d = 0;
        for(int i=start; i<end; i++) {
--- 127,132 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]