Curve: anti-aliasing.
use cairo for anti-aliasing, and ignore explicit Catmull-Rom points for that fall on the same x-cordinate.
This commit is contained in:
parent
d9b7c8b864
commit
c03b658531
@ -383,9 +383,12 @@ Curve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||
/* draw line between samples */
|
||||
window_space = item_to_window (Duple (samples[left].x, samples[left].y));
|
||||
context->move_to (window_space.x, window_space.y);
|
||||
Coord last_x = round(window_space.x);
|
||||
for (uint32_t idx = left + 1; idx < right; ++idx) {
|
||||
window_space = item_to_window (Duple (samples[idx].x, samples[idx].y));
|
||||
context->line_to (window_space.x, window_space.y);
|
||||
if (last_x == round(window_space.x)) continue;
|
||||
last_x = round(window_space.x);
|
||||
context->line_to (last_x - .5 , window_space.y);
|
||||
}
|
||||
|
||||
switch (curve_fill) {
|
||||
|
Loading…
Reference in New Issue
Block a user