From db1d945ce771d0efff89c65052aa9277a6928738 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 11 Jul 2022 18:36:27 +1000 Subject: [PATCH] Changed second rectangle parameter to distance from bottom --- src/PIL/PSDraw.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/PIL/PSDraw.py b/src/PIL/PSDraw.py index 7d652020a6a..dd643c15cc5 100644 --- a/src/PIL/PSDraw.py +++ b/src/PIL/PSDraw.py @@ -86,14 +86,8 @@ def rectangle(self, box): """ Draws a rectangle. - :param box: A 4-tuple of integers whose order and function is currently - undocumented. - - Hint: the tuple is passed into this format string: - - .. code-block:: python - - %d %d M 0 %d %d Vr\n + :param box: A tuple of four integers, specifying left, bottom, width and + height. """ self.fp.write(b"%d %d M 0 %d %d Vr\n" % box) @@ -188,9 +182,9 @@ def image(self, box, im, dpi=None): /Vl { moveto lineto stroke } bind def /Vc { newpath 0 360 arc closepath } bind def /Vr { exch dup 0 rlineto - exch dup neg 0 exch rlineto + exch dup 0 exch rlineto exch neg 0 rlineto - 0 exch rlineto + 0 exch neg rlineto 100 div setgray fill 0 setgray } bind def /Tm matrix def /Ve { Tm currentmatrix pop