This commit is contained in:
Kovid Goyal 2010-01-21 10:08:24 -07:00
parent 22035b8e07
commit d61af79c8c
2 changed files with 12 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

View File

@ -140,6 +140,18 @@ class Interval(object):
def __hash__(self): def __hash__(self):
return hash('(%f,%f)'%self.left, self.right) return hash('(%f,%f)'%self.left, self.right)
class Region(object):
def __init__(self):
self.columns = []
self.top = self.bottom = self.left = self.right = self.width = self.height = 0
def add_columns(self, columns):
if not self.columns:
for x in sorted(columns, cmp=lambda x,y: cmp(x.left, y.left)):
self.columns.append(x)
else:
pass
class Page(object): class Page(object):