+ def draw_orth_lines(
+ self,
+ lines: tuple[tuple[bool, float], ...],
+ rgb_color: tuple[float, float, float] = (0.0, 0.0, 0.0),
+ line_width: float = 2.0,
+ ) -> None:
+ 'Draw horizontal or vertical lines.'
+ min_x, min_y, max_x, max_y = self._pypdf.mediabox
+ full_lines = []
+ for is_horizontal, position in lines:
+ if is_horizontal:
+ x0, x1 = min_x, max_x
+ y0 = y1 = position
+ else:
+ y0, y1 = min_y, max_y
+ x0 = x1 = position
+ full_lines += [(x0, y0, x1, y1)]
+ self.draw_lines(full_lines, rgb_color, line_width)
+