[BUG] Aliasing and filling defects
Describe the bug The anti-alias algorithm seems to be wrapping in the horizontal direction. As a consequence, the images below show artifacts.
Additionally, the antialias pixels do not cover the circles uniformly. They are even absent at some angles.
Finally, there are additional lines on the filled circle to the right.
To Reproduce The following two examples come from 0f2d3d8:
use plotters::prelude::*;
let drawing_area = BitMapBackend::new("shape_style_filled.png", (400, 200)).into_drawing_area();
let original_style = ShapeStyle {
color: GREEN.mix(0.8),
filled: false,
stroke_width: 2,
};
let filled_style = original_style.filled();
drawing_area.draw(&Circle::new((100, 100), 120, original_style));
drawing_area.draw(&Circle::new((300, 100), 120, filled_style));

use plotters::prelude::*;
let drawing_area = BitMapBackend::new("shape_style_stroke_width.png", (400, 200)).into_drawing_area();
let original_style = ShapeStyle {
color: GREEN.mix(0.8),
filled: false,
stroke_width: 2,
};
let new_style = original_style.stroke_width(5);
drawing_area.draw(&Circle::new((100, 100), 120, original_style));
drawing_area.draw(&Circle::new((300, 100), 120, new_style));

Version Information Using Plotters from the GitHub master
The examples above use the BitMapBackend. The SVGBackend seems unaffected.
See also #128
Hi @facorread , I think I prefer to postpone fixing this issue until we are publishing next major release.
One reason is - due to current integer backend coordinate constraint, the default rasterization code must consider anti-aliasing, and this is going to change when we move on to a backend that supports float point backend coordinates - and this will make the anti-aliasing algorithm easier to implement.
So I just fixed the part that is easy enough to fix - but for the ring filling one, I'd like to revist this later.
Please let me know if you have any thoughts.
Thanks, Hao