wallento / wavedrompy

WaveDrom compatible python command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ticks Not Rendered Correctly

MutantPlatypus opened this issue · comments

I was trying to create a test step where the SVGs from wavedrom and wavedrompy are rasterized and compared and noticed a difference: the tick marks come out very slightly wrong. It's almost like the alpha for edges and the alpha for the fill of data regions are not the same between wavedrom and wavedrompy, or alphas are same and drawing order is different. When rasterized, the differences are only in the RGB channels, though The alpha channels match.

The differences in the below images have been enhanced (via PIL.ImageOps.autocontrast)

issue_14.json differences:
issue_14_noAlphaDiff
Original overlayed on difference:
issue_14_differenceAndOriginalComposed

tutorial_1.json differences:
tutorial_1_noAlphaDiff
Original overlayed on differences:
tutorial_1_differenceAndOriginalComposed

I'll generate the rest of these images and push them to the scratch branch of my fork tomorrow evening.

Hm, I think this can become tricky to fix, thanks for reporting and working on that!

Easier than I thought, I just made wrong assumptions before. Fixed in 0c49dfb, please confirm if it works, thanks!

Yes, that fixed it. All of the upstream tests now pass a raster comparison test with cairosvg. Its a super aggressive test. Nice work! I'll toss over a pull request with that test soon.