diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-10 18:28:26 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-10 18:28:26 +0200 |
commit | ede0fd3ddf51766f70984e471588b435ef1cb431 (patch) | |
tree | 41af7804d3d7dfb2e13f27db3bbc1df6a4bc6145 /libs/canvas/poly_item.cc | |
parent | 2177462b73c9ab85fce0d91b63a1e082a33da7aa (diff) |
Remove hardcoded 2^15 cairo-boundary, prefer window-area
Diffstat (limited to 'libs/canvas/poly_item.cc')
-rw-r--r-- | libs/canvas/poly_item.cc | 6 |
1 files 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<Cairo::Context> context) const +PolyItem::render_path (Rect const& area, Cairo::RefPtr<Cairo::Context> context) const { if (_points.size () < 2) { return; @@ -99,8 +99,8 @@ PolyItem::render_path (Rect const& /* area */, Cairo::RefPtr<Cairo::Context> 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; |