chiark / gitweb /
cope with the way the chat log scrolls too
[ypp-sc-tools.main.git] / pctb / structure.c
index 49385a2fb8b89e822562ea7408118aeafc892a82..8fabe1887b9063b12715843046afe9ef72556110 100644 (file)
@@ -161,7 +161,7 @@ static void debug_rect(const char *what, int whati, Rect rr) {
          );                                            \
   }while(0)
 
-void find_structure(CanonImage *im) {
+void find_structure(CanonImage *im, int *max_relevant_y_r) {
   cim= im;
   
   Rect whole = { {0,0}, {cim->w-1,cim->h-1} };
@@ -252,6 +252,8 @@ void find_structure(CanonImage *im) {
 
   SET_ONCE(columns, colno);
   SET_ONCE(text_h, comminty - 1);
+  if (max_relevant_y_r)
+    SET_ONCE(*max_relevant_y_r, mainr.br.y + 10);
 }                  
 
 CanonImage *alloc_canon_image(int w, int h) {
@@ -376,7 +378,7 @@ void analyse(FILE *tsv_output) {
   int page, tryrect, colno;
 
   for (page=0; page<npages; page++) {
-    find_structure(page_images[page]);
+    find_structure(page_images[page], 0);
 
     if (!rd)
       rd= ocr_init(text_h);