[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/vob LinebreakableChain.java Linebreakin...
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] gzz/gzz/vob LinebreakableChain.java Linebreakin... |
Date: |
Sat, 21 Sep 2002 12:53:34 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Benja Fallenstein <address@hidden> 02/09/21 12:53:34
Modified files:
gzz/vob : LinebreakableChain.java LinebreakingUtil.java
Log message:
hups
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/LinebreakableChain.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/LinebreakingUtil.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gzz/gzz/vob/LinebreakableChain.java
diff -c gzz/gzz/vob/LinebreakableChain.java:1.4
gzz/gzz/vob/LinebreakableChain.java:1.5
*** gzz/gzz/vob/LinebreakableChain.java:1.4 Sat Sep 21 12:29:19 2002
--- gzz/gzz/vob/LinebreakableChain.java Sat Sep 21 12:53:34 2002
***************
*** 26,32 ****
/** 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;
--- 26,32 ----
/** Default impl of <code>HChain</code>.
*/
public class LinebreakableChain implements HChain {
! String rcsid = "$Id: LinebreakableChain.java,v 1.5 2002/09/21 16:53:34 benja
Exp $";
public static final int GLUE_LENGTH = 0;
public static final int GLUE_STRETCH = 1;
***************
*** 46,53 ****
* XXX Should glues also be virtual and have scale?
* fonts scale non-uniformly, so should glue?
*/
! protected int[] glues;
!
public void addBox(HBox box) {
ensureBoxes(nboxes+1, false);
--- 46,52 ----
* XXX Should glues also be virtual and have scale?
* fonts scale non-uniformly, so should glue?
*/
! protected float[] glues;
public void addBox(HBox box) {
ensureBoxes(nboxes+1, false);
***************
*** 57,63 ****
box.setPrev(boxes[ind-1]);
}
! public void addGlue(int len, int str, int shr) {
glues[nboxes*3 + GLUE_LENGTH] += len;
glues[nboxes*3 + GLUE_STRETCH] += str;
glues[nboxes*3 + GLUE_SHRINK] += shr;
--- 56,62 ----
box.setPrev(boxes[ind-1]);
}
! public void addGlue(float len, float str, float shr) {
glues[nboxes*3 + GLUE_LENGTH] += len;
glues[nboxes*3 + GLUE_STRETCH] += str;
glues[nboxes*3 + GLUE_SHRINK] += shr;
***************
*** 71,77 ****
return boxes[n];
}
! public int getGlue(int n, int property) {
if(property < 0 || property > 2)
throw new IllegalArgumentException("illegal property: "+property);
return glues[(n * 3) + property];
--- 70,76 ----
return boxes[n];
}
! public float getGlue(int n, int property) {
if(property < 0 || property > 2)
throw new IllegalArgumentException("illegal property: "+property);
return glues[(n * 3) + property];
***************
*** 88,94 ****
*/
void allocCopy(int n) {
HBox[] nboxes = new HBox[n];
! int[] nglues = new int[3*(n+1)];
if(boxes != null) {
System.arraycopy(boxes, 0, nboxes, 0, boxes.length);
System.arraycopy(glues, 0, nglues, 0, glues.length);
--- 87,93 ----
*/
void allocCopy(int n) {
HBox[] nboxes = new HBox[n];
! float[] nglues = new float[3*(n+1)];
if(boxes != null) {
System.arraycopy(boxes, 0, nboxes, 0, boxes.length);
System.arraycopy(glues, 0, nglues, 0, glues.length);
Index: gzz/gzz/vob/LinebreakingUtil.java
diff -c gzz/gzz/vob/LinebreakingUtil.java:1.4
gzz/gzz/vob/LinebreakingUtil.java:1.5
*** gzz/gzz/vob/LinebreakingUtil.java:1.4 Sat Sep 21 09:04:56 2002
--- gzz/gzz/vob/LinebreakingUtil.java Sat Sep 21 12:53:34 2002
***************
*** 27,33 ****
*/
public class LinebreakingUtil {
! String rcsid = "$Id: LinebreakingUtil.java,v 1.4 2002/09/21 13:04:56 benja
Exp $";
public static final int GLUE_LENGTH = 0;
public static final int GLUE_STRETCH = 1;
--- 27,33 ----
*/
public class LinebreakingUtil {
! String rcsid = "$Id: LinebreakingUtil.java,v 1.5 2002/09/21 16:53:34 benja
Exp $";
public static final int GLUE_LENGTH = 0;
public static final int GLUE_STRETCH = 1;
***************
*** 46,52 ****
int str = 0; // Stretch
int shr = 0; // Shrink
! int[] glues = ch.glues;
for(int i=start; i<end; i++) {
wid += ch.boxes[i].getWidth(scale);
if(i > start /* || i == 0 */ ) { // XXX Think out and test
--- 46,52 ----
int str = 0; // Stretch
int shr = 0; // Shrink
! float[] glues = ch.glues;
for(int i=start; i<end; i++) {
wid += ch.boxes[i].getWidth(scale);
if(i > start /* || i == 0 */ ) { // XXX Think out and test
***************
*** 99,105 ****
double over = 0;
HBox[] boxes = ch.boxes;
! int[] glues = ch.glues;
for(int i=start; i<end; i++) {
int curwid = (int)boxes[i].getWidth(scale);
int curhei = (int)boxes[i].getHeight(scale);
--- 99,105 ----
double over = 0;
HBox[] boxes = ch.boxes;
! float[] glues = ch.glues;
for(int i=start; i<end; i++) {
int curwid = (int)boxes[i].getWidth(scale);
int curhei = (int)boxes[i].getHeight(scale);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gzz/vob LinebreakableChain.java Linebreakin...,
Benja Fallenstein <=