//(c):Benja Fallenstein and Tuomas Lukka package gzz.vob; /** 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 interface HChain { int GLUE_LENGTH = 0; int GLUE_STRETCH = 1; int GLUE_SHRINK = 2; /** Return the length of, i.e. the number of HBoxes in, this vob chain. */ int length(); /** Return the nth box in this chain. */ HBox getBox(int n); /** Return one of the values of the glue * before the nth box in this chain. * @param property GLUE_LENGTH, GLUE_STRETCH, * or GLUE_SHRINK. */ float getGlue(int n, int property); void addBox(HBox box); void addGlue(float length, float stretch, float shrink); /** 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. */ float getHeight(int start, int end, float scale); /** 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. */ float getDepth(int start, int end, float scale); }