Skip to content

Commit

Permalink
Remove some unused unit parameters.
Browse files Browse the repository at this point in the history
The unit parameter maybe should only be used when initializing.
  • Loading branch information
gregersn committed Apr 14, 2024
1 parent ffd1f66 commit c46702f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
10 changes: 4 additions & 6 deletions include/pyro/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion include/pyro/shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::vector<Pyro::Vector>> getpoints() { return this->outpoints; };
};
};
Expand Down
4 changes: 2 additions & 2 deletions src/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down

0 comments on commit c46702f

Please sign in to comment.