mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
LibGfx: initialize winding number to 1 for NonZero winding rules
Since we first check the winding number and only then update it, fills for "Rectangle-like" (made up of 2 parallel segments) paths would draw nothing when filled by NonZero winding rules. (Fix by alimpfard)
This commit is contained in:
parent
d96354f58e
commit
b7c3f046f7
1 changed files with 1 additions and 1 deletions
|
@ -1696,7 +1696,7 @@ void Painter::fill_path(Path& path, Color color, WindingRule winding_rule)
|
|||
#endif
|
||||
|
||||
if (active_list.size() > 1) {
|
||||
auto winding_number { 0 };
|
||||
auto winding_number { winding_rule == WindingRule::Nonzero ? 1 : 0 };
|
||||
for (size_t i = 1; i < active_list.size(); ++i) {
|
||||
auto& previous = active_list[i - 1];
|
||||
auto& current = active_list[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue