diff --git a/src/raylib.h b/src/raylib.h index fbca31863..857df2217 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1423,6 +1423,7 @@ RLAPI void ImageDrawPixelV(Image *dst, Vector2 position, Color color); RLAPI void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image RLAPI void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version) RLAPI void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color color); // Draw a line defining thickness within an image +RLAPI void ImageDrawLineStrip(Image *dst, const Vector2 *points, int pointCount, Color color); // Draw a lines sequence within an image RLAPI void ImageDrawTriangle(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle within an image RLAPI void ImageDrawTriangleGradient(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors within an image RLAPI void ImageDrawTriangleLines(Image *dst, Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline within an image diff --git a/src/rtextures.c b/src/rtextures.c index 84e4406bc..103309a19 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -3609,6 +3609,15 @@ void ImageDrawLineEx(Image *dst, Vector2 start, Vector2 end, int thick, Color co } } +// Draw a lines sequence within an image +void ImageDrawLineStrip(Image *dst, const Vector2 *points, int pointCount, Color color) +{ + for (int i = 0; i < pointCount - 1; i++) + { + ImageDrawLineV(dst, points[i], points[i + 1], color); + } +} + // Draw circle within an image void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color) {