X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=blobdiff_plain;f=pctb%2Fstructure.c;h=8fabe1887b9063b12715843046afe9ef72556110;hp=49385a2fb8b89e822562ea7408118aeafc892a82;hb=a2a2f9d982ee233f3d89fb7137f532c9eec3b97c;hpb=ae5d4e36af4f4a5567e1231958179d3a50eb4466 diff --git a/pctb/structure.c b/pctb/structure.c index 49385a2..8fabe18 100644 --- a/pctb/structure.c +++ b/pctb/structure.c @@ -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