1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
8 def __init__(self, cover):
15 def build(self, w, h):
16 raise NotImplementedError()
18 def apply(self, img, x, y, w=None, h=None):
19 my_img = self.build(w, h)
20 if my_img is not None:
23 (round(x), round(y - self.margin_top)),
24 my_img if self.transparency else None