From ede0fd3ddf51766f70984e471588b435ef1cb431 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 10 Apr 2020 18:28:26 +0200 Subject: [PATCH] Remove hardcoded 2^15 cairo-boundary, prefer window-area --- libs/canvas/poly_item.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/canvas/poly_item.cc b/libs/canvas/poly_item.cc index 16acf1ecf2..539506d251 100644 --- a/libs/canvas/poly_item.cc +++ b/libs/canvas/poly_item.cc @@ -67,7 +67,7 @@ PolyItem::compute_bounding_box () const } void -PolyItem::render_path (Rect const& /* area */, Cairo::RefPtr context) const +PolyItem::render_path (Rect const& area, Cairo::RefPtr context) const { if (_points.size () < 2) { return; @@ -99,8 +99,8 @@ PolyItem::render_path (Rect const& /* area */, Cairo::RefPtr con while (i != _points.end ()) { Duple c = item_to_window (Duple (i->x, i->y)); - if (c.x > 16383) { - if (interpolate_line (c0, c, 16383)) { + if (c.x > area.x1) { + if (interpolate_line (c0, c, area.x1)) { context->line_to (c0.x + pixel_adjust, c0.y + pixel_adjust); } break;