"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "track.cc" between
ocrad-0.24.tar.gz and ocrad-0.25.tar.gz

About: GNU Ocrad is an OCR (Optical Character Recognition) program.

track.cc  (ocrad-0.24):track.cc  (ocrad-0.25)
/* GNU Ocrad - Optical Character Recognition program /* GNU Ocrad - Optical Character Recognition program
Copyright (C) 2003-2014 Antonio Diaz Diaz. Copyright (C) 2003-2015 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or the Free Software Foundation, either version 2 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
skipping to change at line 278 skipping to change at line 278
int Track::vcenter( const int col ) const int Track::vcenter( const int col ) const
{ {
for( unsigned i = 0; i < data.size(); ++i ) for( unsigned i = 0; i < data.size(); ++i )
{ {
const Vrhomboid & vr = data[i]; const Vrhomboid & vr = data[i];
if( col <= vr.right() || i + 1 >= data.size() ) return vr.vcenter( col ); if( col <= vr.right() || i + 1 >= data.size() ) return vr.vcenter( col );
} }
return 0; return 0;
} }
/*
bool Track::includes( const Rectangle & r ) const bool Track::includes( const Rectangle & r ) const
{ {
for( unsigned i = 0; i < data.size(); ++i ) for( unsigned i = 0; i < data.size(); ++i )
if( data[i].includes( r ) ) return true; if( data[i].includes( r ) ) return true;
if( data.empty() ) return false; if( data.empty() ) return false;
if( r.right() > data.back().right() ) if( r.right() > data.back().right() )
{ {
Vrhomboid tmp = data.back(); Vrhomboid tmp = data.back();
tmp.extend_right( r.right() ); tmp.extend_right( r.right() );
return tmp.includes( r ); return tmp.includes( r );
skipping to change at line 316 skipping to change at line 317
tmp.extend_right( col ); tmp.extend_right( col );
return tmp.includes( row, col ); return tmp.includes( row, col );
} }
if( col < data.front().left() ) if( col < data.front().left() )
{ {
Vrhomboid tmp = data.front(); Vrhomboid tmp = data.front();
tmp.extend_left( col ); tmp.extend_left( col );
return tmp.includes( row, col ); return tmp.includes( row, col );
} }
return false; return false;
} }*/
 End of changes. 3 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS