Skip to content

Commit

Permalink
Merge pull request #320 from RobLoach/drawroundedlines
Browse files Browse the repository at this point in the history
Fix compatibility with DrawRectangleRoundedLines
  • Loading branch information
RobLoach authored May 28, 2024
2 parents 3b8fe30 + dd3b8e3 commit 6a5286c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion include/Rectangle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,21 @@ class Rectangle : public ::Rectangle {
::DrawRectangleRounded(*this, roundness, segments, color);
}

void DrawRoundedLines(float roundness, int segments, ::Color color) const {
#if RAYLIB_VERSION_MAJOR == 5 && RAYLIB_VERSION_MINOR == 0
::DrawRectangleRoundedLines(*this, roundness, segments, 1.0f, color);
#else
::DrawRectangleRoundedLines(*this, roundness, segments, color);
#endif
}

void DrawRoundedLines(float roundness, int segments,
float lineThick, ::Color color) const {
::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color);
#if RAYLIB_VERSION_MAJOR == 5 && RAYLIB_VERSION_MINOR == 0
::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color);
#else
DrawRectangleRoundedLinesEx(*this, roundness, segments, lineThick, color);
#endif
}

/**
Expand Down

0 comments on commit 6a5286c

Please sign in to comment.