Skip to content

Commit

Permalink
Update shapes_splines_drawing.c
Browse files Browse the repository at this point in the history
  • Loading branch information
raysan5 committed Nov 7, 2023
1 parent f01d3db commit 4b87cc4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/shapes/shapes_splines_drawing.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,21 @@ 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);
}
}

// Draw spline key-points
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
Expand Down

0 comments on commit 4b87cc4

Please sign in to comment.