Explicit circle quality parameter for gfx::painter::circle
This commit is contained in:
parent
ae8fa3579b
commit
ed41bc6583
2 changed files with 2 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ namespace psemek::gfx
|
|||
// 2D
|
||||
void triangle(geom::point<float, 2> const & p0, geom::point<float, 2> const & p1, geom::point<float, 2> const & p2, color const & c);
|
||||
void rect(geom::box<float, 2> const & box, color const & c);
|
||||
void circle(geom::point<float, 2> const & center, float radius, color const & c);
|
||||
void circle(geom::point<float, 2> const & center, float radius, color const & c, int quality = 24);
|
||||
void line(geom::point<float, 2> const & p0, geom::point<float, 2> const & p1, float width, color const & c, bool smooth = true);
|
||||
|
||||
// 2D text
|
||||
|
|
|
|||
|
|
@ -213,12 +213,10 @@ namespace psemek::gfx
|
|||
impl().indices.push_back(base + 2);
|
||||
}
|
||||
|
||||
void painter::circle(geom::point<float, 2> const & p, float r, color const & c)
|
||||
void painter::circle(geom::point<float, 2> 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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue