Fix white lines, generate images for border printing
This commit is contained in:
parent
088181085e
commit
b0eabd1297
3 changed files with 49 additions and 27 deletions
|
|
@ -14,7 +14,7 @@ import util
|
|||
|
||||
|
||||
CUT_GUIDE_WIDTH_INCHES = 0.006
|
||||
LENGTH_CUT_GUIDE_INCHES = 0.06
|
||||
LENGTH_CUT_GUIDE_INCHES = 0.04
|
||||
|
||||
|
||||
def gather_images(directory: Path) -> List[Path]:
|
||||
|
|
@ -43,7 +43,7 @@ def create_sheet(input_cards: List[InputCardImage], sheet_filepath: Path, layout
|
|||
color = 'black'
|
||||
guide_thickness = layout.in_to_px(CUT_GUIDE_WIDTH_INCHES)
|
||||
|
||||
for x_index in range(layout.cards_per_column):
|
||||
for x_index in range(layout.cards_per_row):
|
||||
left_x = layout.card_area_left_xs[x_index]
|
||||
right_x = layout.card_area_right_xs[x_index]
|
||||
min_y = layout.min_padding
|
||||
|
|
@ -51,7 +51,7 @@ def create_sheet(input_cards: List[InputCardImage], sheet_filepath: Path, layout
|
|||
draw.line([(left_x, min_y), (left_x, max_y)], fill=color, width=guide_thickness)
|
||||
draw.line([(right_x, min_y), (right_x, max_y)], fill=color, width=guide_thickness)
|
||||
|
||||
for y_index in range(layout.cards_per_row):
|
||||
for y_index in range(layout.cards_per_column):
|
||||
top_y = layout.card_area_top_ys[y_index]
|
||||
bottom_y = layout.card_area_bottom_ys[y_index]
|
||||
min_x = layout.min_padding
|
||||
|
|
@ -107,7 +107,7 @@ def main():
|
|||
|
||||
all_input_cards = [InputCardImage(p) for p in all_input_cards_paths]
|
||||
|
||||
layout = sheet_layout.letter_portrait_3x3_sheet_layout()
|
||||
layout = sheet_layout.letter_portrait_3x3_sheet_layout_120milborder()
|
||||
sheets_dir = BASE_DIR / 'sheets'
|
||||
sheets_dir.mkdir(parents=True, exist_ok=True)
|
||||
total_sheet_number = math.ceil(len(all_input_cards) / layout.cards_per_sheet)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue