mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibGfx: Add draw_line_for_path() and remove AntiAliasPolicy
draw_line_for_path() is the same as the standard antialiased draw_line() but with a few few small hacks to improve the look of paths. AntiAliasPolicy is also removed as it's now unused.
This commit is contained in:
parent
f7a680f30a
commit
76de41c3b7
3 changed files with 27 additions and 22 deletions
|
@ -47,8 +47,8 @@ void fill_path(Painter& painter, Path const& path, Color color, Gfx::Painter::Wi
|
|||
using GridCoordinateType = Conditional<fill_path_mode == FillPathMode::PlaceOnIntGrid, int, float>;
|
||||
using PointType = Point<GridCoordinateType>;
|
||||
auto draw_line = [&](auto... args) {
|
||||
if constexpr (requires { painter.draw_aliased_line(args...); })
|
||||
painter.draw_aliased_line(args...);
|
||||
if constexpr (requires { painter.draw_line_for_path(args...); })
|
||||
painter.draw_line_for_path(args...);
|
||||
else
|
||||
painter.draw_line(args...);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue