mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 18:37:58 +03: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
Notes:
sideshowbarker
2024-07-18 20:20:13 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/b7c3f046f71 Pull-request: https://github.com/SerenityOS/serenity/pull/6330 Reviewed-by: https://github.com/awesomekling
@ -1696,7 +1696,7 @@ void Painter::fill_path(Path& path, Color color, WindingRule winding_rule)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (active_list.size() > 1) {
|
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) {
|
for (size_t i = 1; i < active_list.size(); ++i) {
|
||||||
auto& previous = active_list[i - 1];
|
auto& previous = active_list[i - 1];
|
||||||
auto& current = active_list[i];
|
auto& current = active_list[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user