diff --git a/libs/gfx/include/psemek/gfx/painter.hpp b/libs/gfx/include/psemek/gfx/painter.hpp index de697234..e8d352eb 100644 --- a/libs/gfx/include/psemek/gfx/painter.hpp +++ b/libs/gfx/include/psemek/gfx/painter.hpp @@ -54,7 +54,7 @@ namespace psemek::gfx // 2D void triangle(geom::point const & p0, geom::point const & p1, geom::point const & p2, color const & c); void rect(geom::box const & box, color const & c); - void circle(geom::point const & center, float radius, color const & c); + void circle(geom::point const & center, float radius, color const & c, int quality = 24); void line(geom::point const & p0, geom::point const & p1, float width, color const & c, bool smooth = true); // 2D text diff --git a/libs/gfx/source/painter.cpp b/libs/gfx/source/painter.cpp index 08cc33a7..3229ad7f 100644 --- a/libs/gfx/source/painter.cpp +++ b/libs/gfx/source/painter.cpp @@ -213,12 +213,10 @@ namespace psemek::gfx impl().indices.push_back(base + 2); } - void painter::circle(geom::point const & p, float r, color const & c) + void painter::circle(geom::point const & p, float r, color const & c, int quality) { std::uint32_t const base = impl().vertices.size(); - int const quality = 24; - impl().vertices.push_back({{p[0], p[1], 0.f}, c}); for (int i = 0; i < quality; ++i) {