mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use the correct technique for getting the current y offset for checking if text is in the header/footer
This commit is contained in:
parent
b076795404
commit
69d311033e
@ -285,8 +285,8 @@ class PdfEngine(QPaintEngine):
|
||||
last_x, last_y = x, y
|
||||
|
||||
if not self.content_written_to_current_page:
|
||||
painter_top = self.painter().clipPath().boundingRect().y()
|
||||
ypositions = [y - painter_top for x, y in gi.positions]
|
||||
dy = self.graphics.current_state.transform.dy()
|
||||
ypositions = [y + dy for x, y in gi.positions]
|
||||
miny = min(ypositions or (0,))
|
||||
maxy = max(ypositions or (self.pixel_height,))
|
||||
page_top = self.header_height if self.has_headers else 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user