[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/org/nongnu/libvob/lava Demo.java SimpleB...
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] libvob/org/nongnu/libvob/lava Demo.java SimpleB... |
Date: |
Sun, 06 Apr 2003 10:18:28 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Benja Fallenstein <address@hidden> 03/04/06 10:18:28
Modified files:
org/nongnu/libvob/lava: Demo.java SimpleBreaker.java
Log message:
refactor
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/lava/Demo.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/lava/SimpleBreaker.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: libvob/org/nongnu/libvob/lava/Demo.java
diff -u libvob/org/nongnu/libvob/lava/Demo.java:1.4
libvob/org/nongnu/libvob/lava/Demo.java:1.5
--- libvob/org/nongnu/libvob/lava/Demo.java:1.4 Sun Apr 6 08:30:30 2003
+++ libvob/org/nongnu/libvob/lava/Demo.java Sun Apr 6 10:18:28 2003
@@ -42,15 +42,16 @@
RenderTraversal t = g.transform(new RenderTraversal(), w+1);
g.add(new Colorize(new LineVob(s, t), Color.red));
- Sequence seq = new SimpleBreaker(new Box(Vob.X),
- new Box(Vob.Y),
+ Sequence seq = new SimpleBreaker(new Box(Vob.Y),
300, Vob.X);
ScalableFont font = new ScalableFont("serif", 0, 12);
String string = "A little experiment 'ad hominem.' "
+ "(What 'ad hominem' means? I wouldn't know. "
+ "I just use it to sound impressive. This is "
- + "really about linebreaking :-) )";
+ + "really about linebreaking :-) ) -- UPDATE: "
+ + "it means using an attack against a person "
+ + "as an 'argument' against what the person said.";
for(int i=0; i<string.length(); i++) {
if((i+1) % 30 == 0)
Index: libvob/org/nongnu/libvob/lava/SimpleBreaker.java
diff -u libvob/org/nongnu/libvob/lava/SimpleBreaker.java:1.1
libvob/org/nongnu/libvob/lava/SimpleBreaker.java:1.2
--- libvob/org/nongnu/libvob/lava/SimpleBreaker.java:1.1 Sat Apr 5
13:51:19 2003
+++ libvob/org/nongnu/libvob/lava/SimpleBreaker.java Sun Apr 6 10:18:28 2003
@@ -31,21 +31,31 @@
public class SimpleBreaker extends AbstractMonoVob
implements Sequence {
- protected Sequence lineType;
+ /** The sequence lines are put into. */
protected Sequence lineHolder;
+
+ /** The width of each line. */
protected float lineWidth;
+
+ /** The axis along which to do breaking:
+ * X is for left-to-right line, Y for
+ * top-to-bottom lines.
+ */
protected Axis axis;
- protected Sequence line;
+
+ /** The current line. */
+ protected Box line;
+
+ /** The width of the vobs currently put into the current line. */
protected float currentWidth;
- public SimpleBreaker(Sequence lineType,
- Sequence lineHolder,
+
+ public SimpleBreaker(Sequence lineHolder,
float lineWidth,
Axis axis) {
super(lineHolder);
- this.lineType = lineType;
this.lineHolder = lineHolder;
this.lineWidth = lineWidth;
this.axis = axis;
@@ -55,13 +65,12 @@
protected void newline() {
if(line != null) lineHolder.add(line);
- line = lineType.cloneEmpty();
+ line = new Box(axis);
currentWidth = 0;
}
public Sequence cloneEmpty() {
- return new SimpleBreaker(lineType,
- lineHolder.cloneEmpty(),
+ return new SimpleBreaker(lineHolder.cloneEmpty(),
lineWidth, axis);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] libvob/org/nongnu/libvob/lava Demo.java SimpleB...,
Benja Fallenstein <=