From c46702fc0a7a9e479d29846d2fecfb7c545649aa Mon Sep 17 00:00:00 2001 From: Greger Stolt Nilsen Date: Sun, 14 Apr 2024 21:04:49 +0200 Subject: [PATCH] Remove some unused unit parameters. The unit parameter maybe should only be used when initializing. --- include/pyro/graphics.h | 10 ++++------ include/pyro/shape.h | 2 +- src/graphics.cpp | 4 ++-- src/shape.cpp | 3 +-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/include/pyro/graphics.h b/include/pyro/graphics.h index 41f00d8..b3af8c2 100644 --- a/include/pyro/graphics.h +++ b/include/pyro/graphics.h @@ -131,19 +131,17 @@ namespace Pyro { this->_shape.vertex(v.x, v.y); }; - void vertex(float x, float y, Unit unit = Unit::CURRENT) + void vertex(float x, float y) { - // TODO: Use unit this->_shape.vertex(x, y); }; - void curvevertex(float x, float y, Unit unit = Unit::CURRENT) + void curvevertex(float x, float y) { - // TODO: Use unit this->_shape.curvevertex(x, y); }; - void beziervertex(float x2, float y2, float x3, float y3, float x4, float y4, Unit unit = Unit::CURRENT) + void beziervertex(float x2, float y2, float x3, float y3, float x4, float y4) { - this->_shape.beziervertex(x2, y2, x3, y3, x4, y4, unit); + this->_shape.beziervertex(x2, y2, x3, y3, x4, y4); } void endshape(int close); void endshape() diff --git a/include/pyro/shape.h b/include/pyro/shape.h index 599a52e..c736a16 100644 --- a/include/pyro/shape.h +++ b/include/pyro/shape.h @@ -45,7 +45,7 @@ namespace Pyro void vertex(Vector v) { this->vertex(v.x, v.y); }; void vertex(float x, float y); void curvevertex(float x, float y); - void beziervertex(float x2, float y2, float x3, float y3, float x4, float y4, Unit unit = Unit::PX); + void beziervertex(float x2, float y2, float x3, float y3, float x4, float y4); std::vector> getpoints() { return this->outpoints; }; }; }; diff --git a/src/graphics.cpp b/src/graphics.cpp index d3d30a6..0bf7c3c 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -386,12 +386,12 @@ namespace Pyro void Graphics::strokecap(int cap) { - // TODO: Use unit + // TODO: Implement stroke cap } void Graphics::strokejoin(int join) { - // TODO: Use unit + // TODO: Implement strokejoin } // Typography diff --git a/src/shape.cpp b/src/shape.cpp index 0a06070..b285242 100644 --- a/src/shape.cpp +++ b/src/shape.cpp @@ -168,9 +168,8 @@ namespace Pyro this->points.push_back({Pyro::Vector(x, y), PointType::CURVEVERTEX}); } - void Shape::beziervertex(float x2, float y2, float x3, float y3, float x4, float y4, Unit unit) + void Shape::beziervertex(float x2, float y2, float x3, float y3, float x4, float y4) { - // TODO: Use unit assert(this->points.size() > 0); this->points.push_back({Pyro::Vector(x2, y2), PointType::BEZIERVERTEX}); this->points.push_back({Pyro::Vector(x3, y3), PointType::BEZIERVERTEX});