4 ms·
How can you possibly see that? Short answer : I'm writing a drawing software and I've become pixel sensitive. Technical answer : you are creating 1 pixel wide
by Rexxar 10y ago
How can you possibly see that?
Short answer : I'm writing a drawing software and I've become pixel sensitive.
Technical answer : you are creating 1 pixel wide horizontal/vertical line with integer coordinates. Sadly in SVG this mean you writing your line between two pixel lines. So you don't write 1 black pixel but two semi-transparent black pixels. On white background the result is two RGB(127,127,127) pixels.
When two line overlaps you write semi-transparent black pixel twice and you end with two RGB(191,191,191) pixels.
You can hide this behaviour by shifting everything by 0.5 or using a retina display.
- artursapek 10y agoI noticed this too. I guess not everyone sees this kind of stuff? http://i.imgur.com/wfY6e5Z.png http://i.imgur.com/wfY6e5Z.png
- Freak_NL 10y ago> […] or using a retina display. Any HiDPI display will work, not just Apple's. Shifting by 0.5 in both directions is a quick win though.
- saidajigumi 10y ago> using a retina display. ^^^ SO IMPORTANT. I returned to working with SVG seriously for a project last year, and was bitten by pixel-alignment rendering behavior along these lines. This was frustrating, as it was completely hidden during initial development by the fact that I was working on a retina-class display. On low-dpi, the rendering artifacts were quite noticeable. Compounding matters, the specifics varied by the SVG renderer (web browser) in use which also made it harder to identify the worst problem cases. Fortunately, it was noticed by an internal, design-sensitive user first!