heuer / segno

Python QR Code and Micro QR Code encoder
https://pypi.org/project/segno/
BSD 3-Clause "New" or "Revised" License
606 stars 52 forks source link

Export to TEX (pgf graphics) #99

Open Claudio-Scarena opened 3 years ago

Claudio-Scarena commented 3 years ago

When creating a QR-Tag in TEX-Format without a border, the resulting image has nonetheless a border left and border right of the QR-Code. Though these borders are transparent, they disturb the proper placement within a tikzpicture-environment (e. g. anchor=north west). The root cause of this issue is the command '\pgfpathlineto', which indeed draws a black line from X0/Y on the left to X1/Y on the right. But, and this is the problem, '\pgfpathlineto' also adds a transparent cap to the left of the beginning and a transparent cap to the right of the end of the line. The caps have a width of half the path line width. The resulting image dimensions have the width too large for one module. I propose to draw filled rectangles instead of paths.

with best regards