diff options
| author | Ray <[email protected]> | 2023-11-07 19:58:45 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2023-11-07 19:58:45 +0100 |
| commit | 4b87cc455db6a996419f6859092d5448c9b87010 (patch) | |
| tree | 9a5bbff9d44ef8412a8de08a82a80151df027756 | |
| parent | f01d3db7398037ce4a60da4d4ea9582b07834f96 (diff) | |
| download | raylib-4b87cc455db6a996419f6859092d5448c9b87010.tar.gz raylib-4b87cc455db6a996419f6859092d5448c9b87010.zip | |
Update shapes_splines_drawing.c
| -rw-r--r-- | examples/shapes/shapes_splines_drawing.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/shapes/shapes_splines_drawing.c b/examples/shapes/shapes_splines_drawing.c index 711aad21..58fcaf69 100644 --- a/examples/shapes/shapes_splines_drawing.c +++ b/examples/shapes/shapes_splines_drawing.c @@ -176,6 +176,11 @@ int main(void) else if (focusedControlPoint == &control[i].end) DrawCircleV(control[i].end, 6, GREEN); DrawLineEx(points[i], control[i].start, 1.0, LIGHTGRAY); DrawLineEx(points[i + 1], control[i].end, 1.0, LIGHTGRAY); + + // Draw spline control lines + DrawLineV(points[i], control[i].start, LIGHTGRAY); + DrawLineV(control[i].start, control[i].end, LIGHTGRAY); + DrawLineV(control[i].end, points[i + 1], LIGHTGRAY); } } @@ -183,7 +188,9 @@ int main(void) for (int i = 0; i < pointCount; i++) { DrawCircleV(points[i], (focusedPoint == i)? 8.0f : 5.0f, (focusedPoint == i)? BLUE: RED); - if ((splineType != 0) && (i < pointCount - 1)) DrawLineV(points[i], points[i + 1], LIGHTGRAY); + if ((splineType != SPLINE_LINEAR) && + (splineType != SPLINE_BEZIER) && + (i < pointCount - 1)) DrawLineV(points[i], points[i + 1], LIGHTGRAY); } // TODO: Draw help |
