Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jhasse/jngl
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Nov 9, 2024
2 parents c99052b + 3a3133a commit cd1d605
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/jngl/shapes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ void drawLine(Vec2 start, Vec2 end);
/// \deprecated Use drawLine(Vec2, Vec2) instead
void drawLine(double xstart, double ystart, double xend, double yend);

/// Draws a line from \a start to \a end
void drawLine(Mat3 modelview, Vec2 start, Vec2 end);

/// Draws a line from (0, 0) to \a end
void drawLine(const Mat3& modelview, Vec2 end);

Expand Down
4 changes: 4 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,10 @@ void drawLine(const Vec2 start, const Vec2 end) {
pWindow->drawLine(jngl::modelview().translate(start), end - start);
}

void drawLine(Mat3 modelview, const Vec2 start, const Vec2 end) {
pWindow->drawLine(modelview.translate(start), end - start);
}

void drawLine(const Mat3& modelview, const Vec2 end) {
pWindow->drawLine(modelview, end);
}
Expand Down

0 comments on commit cd1d605

Please sign in to comment.