diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-17 13:41:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-17 13:41:03 +0200 |
commit | 32b9d80ee598e0a40ca700acb49bbe442d82e379 (patch) | |
tree | 814c66c3d291ba040fab873838a634b00ba0ab7e /Userland/Libraries/LibGfx/Painter.cpp | |
parent | 8c863ad9590da806b5367a27a346182a072d10da (diff) | |
download | serenity-32b9d80ee598e0a40ca700acb49bbe442d82e379.zip |
LibGfx: Make Painter::fill_path() take Path by const reference
Taking a mutable reference here made the API look very strange.
Diffstat (limited to 'Userland/Libraries/LibGfx/Painter.cpp')
-rw-r--r-- | Userland/Libraries/LibGfx/Painter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index 719b52277b..da50c27bb9 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -2005,11 +2005,11 @@ void Painter::stroke_path(const Path& path, Color color, int thickness) from.set_x(previous_to.value().x()); } -void Painter::fill_path(Path& path, Color color, WindingRule winding_rule) +void Painter::fill_path(Path const& path, Color color, WindingRule winding_rule) { VERIFY(scale() == 1); // FIXME: Add scaling support. - const auto& segments = path.split_lines(); + auto const& segments = path.split_lines(); if (segments.size() == 0) return; |