From 27383aa5e8fe4ecaa1d7d3ab158c9246156109ea Mon Sep 17 00:00:00 2001 From: Collin Anderson Date: Mon, 26 May 2025 11:40:18 -0400 Subject: [PATCH] reportlab: add some types for canvas (#14152) --- stubs/reportlab/reportlab/pdfgen/canvas.pyi | 22 ++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/stubs/reportlab/reportlab/pdfgen/canvas.pyi b/stubs/reportlab/reportlab/pdfgen/canvas.pyi index 4f3d5891a..fa04e692a 100644 --- a/stubs/reportlab/reportlab/pdfgen/canvas.pyi +++ b/stubs/reportlab/reportlab/pdfgen/canvas.pyi @@ -177,16 +177,20 @@ class Canvas(_PDFColorSetter): fontSize: float = 3, ) -> None: ... def grid(self, xlist, ylist) -> None: ... - def bezier(self, x1, y1, x2, y2, x3, y3, x4, y4) -> None: ... - def arc(self, x1, y1, x2, y2, startAng: int = 0, extent: int = 90) -> None: ... - def rect(self, x, y, width, height, stroke: int = 1, fill: int = 0) -> None: ... - def ellipse(self, x1, y1, x2, y2, stroke: int = 1, fill: int = 0) -> None: ... - def wedge(self, x1, y1, x2, y2, startAng, extent, stroke: int = 1, fill: int = 0) -> None: ... - def circle(self, x_cen, y_cen, r, stroke: int = 1, fill: int = 0) -> None: ... - def roundRect(self, x, y, width, height, radius, stroke: int = 1, fill: int = 0) -> None: ... + def bezier(self, x1: float, y1: float, x2: float, y2: float, x3: float, y3: float, x4: float, y4: float) -> None: ... + def arc(self, x1: float, y1: float, x2: float, y2: float, startAng: float = 0, extent: float = 90) -> None: ... + def rect(self, x: float, y: float, width: float, height: float, stroke: float = 1, fill: float = 0) -> None: ... + def ellipse(self, x1: float, y1: float, x2: float, y2: float, stroke: float = 1, fill: float = 0) -> None: ... + def wedge( + self, x1: float, y1: float, x2: float, y2: float, startAng: float, extent: float, stroke: float = 1, fill: float = 0 + ) -> None: ... + def circle(self, x_cen: float, y_cen: float, r: float, stroke: float = 1, fill: float = 0) -> None: ... + def roundRect( + self, x: float, y: float, width: float, height: float, radius: float, stroke: float = 1, fill: float = 0 + ) -> None: ... def shade(self, shading) -> None: ... - def linearGradient(self, x0, y0, x1, y1, colors, positions=None, extend: bool = True) -> None: ... - def radialGradient(self, x, y, radius, colors, positions=None, extend: bool = True) -> None: ... + def linearGradient(self, x0: float, y0: float, x1: float, y1: float, colors, positions=None, extend: bool = True) -> None: ... + def radialGradient(self, x: float, y: float, radius: float, colors, positions=None, extend: bool = True) -> None: ... def drawString( self, x: float,