Skip to content

Stabilising module / line widths at various resolutions #198

Discussion options

You must be logged in to vote

Your solution is re-scaling the symbols based on the resolution in order to maintain the number of device pixel per barcode module, which is good.

However, you are positioning the symbols at coordinates in userspace that do not correspond to the devicespace grid. Therefore the plotting of the symbol begins at various different offsets of the device pixels and this results in pixel grazing because PostScript will light any pixel that is touched by the path. Pixel-grazing is described by way of example here: https://stackoverflow.com/a/36204327/2568535

You can snap the starting point coordinate to the grid by transforming it into devicespace, rounding, and then transforming the result back …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anauta00
Comment options

Answer selected by anauta00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants