forked from reingart/pyfpdf
-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Description
When rendering a rect with round corners some graphics issues are visible. See attached pdf at the end.
-
if the border is thicker the inner and outer circles of the corners are not positioned correctly.
-
if there is a background color a small line is visible for each corner.
sample code to generade pdf:
from fpdf import FPDF
if __name__ == "__main__":
pdf = FPDF()
pdf.add_page()
pdf.set_draw_color(0, 0, 0)
pdf.set_fill_color(255, 255, 255)
pdf.set_line_width(6)
pdf.rect(50, 40, 120, 70, style='DF', round_corners=True, corner_radius=12)
pdf.set_fill_color(230, 120, 125)
pdf.set_line_width(1)
pdf.rect(50, 160, 120, 70, style='DF', round_corners=True, corner_radius=12)
pdf.output("round_corners.pdf")