ladybird/Libraries/LibGfx/AntiAliasingPainter.cpp
Pavel Shliak 8a07131229 LibGfx: Clean up #include directives
We actually include what we use where we use it.
This change aims to improve the speed of incremental builds.
2024-11-20 21:13:23 +01:00

33 lines
951 B
C++

/*
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
* Copyright (c) 2022, Ben Maxwell <macdue@dueutil.tech>
* Copyright (c) 2022, Torsten Engelmann <engelTorsten@gmx.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#if defined(AK_COMPILER_GCC)
# pragma GCC optimize("O3")
#endif
#include <LibGfx/AntiAliasingPainter.h>
namespace Gfx {
void AntiAliasingPainter::stroke_path(DeprecatedPath const& path, Color color, float thickness)
{
if (thickness <= 0)
return;
// FIXME: Cache this? Probably at a higher level such as in LibWeb?
fill_path(path.stroke_to_fill(thickness), color);
}
void AntiAliasingPainter::stroke_path(DeprecatedPath const& path, Gfx::PaintStyle const& paint_style, float thickness, float opacity)
{
if (thickness <= 0)
return;
// FIXME: Cache this? Probably at a higher level such as in LibWeb?
fill_path(path.stroke_to_fill(thickness), paint_style, opacity);
}
}