mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
LibGfx: Make Painter::fill_path() take Path by const reference
Taking a mutable reference here made the API look very strange.
This commit is contained in:
parent
8c863ad959
commit
32b9d80ee5
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
Nonzero,
|
||||
EvenOdd,
|
||||
};
|
||||
void fill_path(Path&, Color, WindingRule rule = WindingRule::Nonzero);
|
||||
void fill_path(Path const&, Color, WindingRule rule = WindingRule::Nonzero);
|
||||
|
||||
const Font& font() const { return *state().font; }
|
||||
void set_font(const Font& font) { state().font = &font; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue