Skip to content

Commit

Permalink
VipsSeparatorDetector code updated. Class Separator moved from
Browse files Browse the repository at this point in the history
VipsSeparatorDetector and VipsSeparatorGraphicsDetector to separate
class.
  • Loading branch information
tpopela committed Apr 21, 2012
1 parent 1a58cb5 commit 1079325
Show file tree
Hide file tree
Showing 4 changed files with 380 additions and 52 deletions.
28 changes: 28 additions & 0 deletions src/org/fit/vips/Separator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.fit.vips;

/**
* Class that represents visual separator
*/
public class Separator {
public int startPoint;
public int endPoint;
public int weight = 10;
public boolean horizontal = true;

public Separator(int start, int end) {
this.startPoint = start;
this.endPoint = end;
}

public Separator(int start, int end, boolean horizontal) {
this.startPoint = start;
this.endPoint = end;
this.horizontal = horizontal;
}

public Separator(int start, int end, int weight) {
this.startPoint = start;
this.endPoint = end;
this.weight = weight;
}
}
9 changes: 0 additions & 9 deletions src/org/fit/vips/Vips.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;

import org.fit.cssbox.css.CSSNorm;
import org.fit.cssbox.css.DOMAnalyzer;
Expand Down Expand Up @@ -79,14 +78,6 @@ public static void main(String args[])

VisualStructure visualStructure = vipsParser.getVisualStrucure();

List<VisualStructure> list = vipsParser.getVisualBlocks();

for (VisualStructure vs : list)
{
System.err.println(vs.getBox().getContentWidth() + " - " + vs.getBox().getContentHeight());
System.err.println(vs.getBox().getText());
}

vipsSeparatorDetector.fillPool(visualStructure);
vipsSeparatorDetector.saveToImage("pool");
vipsSeparatorDetector.setVisualStructure(visualStructure);
Expand Down
Loading

0 comments on commit 1079325

Please sign in to comment.