mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
LibPDF: Ensure all subpaths are closed before filling paths
This lets us correctly draw figure 3.4 in pdf_reference_1-7.pdf.
This commit is contained in:
parent
ccf35a973f
commit
6088374ad2
1 changed files with 2 additions and 0 deletions
|
@ -298,6 +298,7 @@ RENDERER_HANDLER(path_close_and_stroke)
|
||||||
RENDERER_HANDLER(path_fill_nonzero)
|
RENDERER_HANDLER(path_fill_nonzero)
|
||||||
{
|
{
|
||||||
begin_path_paint();
|
begin_path_paint();
|
||||||
|
m_current_path.close_all_subpaths();
|
||||||
m_anti_aliasing_painter.fill_path(m_current_path, state().paint_color, Gfx::Painter::WindingRule::Nonzero);
|
m_anti_aliasing_painter.fill_path(m_current_path, state().paint_color, Gfx::Painter::WindingRule::Nonzero);
|
||||||
end_path_paint();
|
end_path_paint();
|
||||||
return {};
|
return {};
|
||||||
|
@ -311,6 +312,7 @@ RENDERER_HANDLER(path_fill_nonzero_deprecated)
|
||||||
RENDERER_HANDLER(path_fill_evenodd)
|
RENDERER_HANDLER(path_fill_evenodd)
|
||||||
{
|
{
|
||||||
begin_path_paint();
|
begin_path_paint();
|
||||||
|
m_current_path.close_all_subpaths();
|
||||||
m_anti_aliasing_painter.fill_path(m_current_path, state().paint_color, Gfx::Painter::WindingRule::EvenOdd);
|
m_anti_aliasing_painter.fill_path(m_current_path, state().paint_color, Gfx::Painter::WindingRule::EvenOdd);
|
||||||
end_path_paint();
|
end_path_paint();
|
||||||
return {};
|
return {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue