Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draw dashed line #2337

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
lint
  • Loading branch information
oddbookworm committed Jul 24, 2023
commit 5e4cd0bb6c8e572cef0fb62da6f1f1146b77378e
3 changes: 1 addition & 2 deletions src_c/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ dashed_line(PyObject *self, PyObject *args, PyObject *kwargs)
int dy = endy - starty;
double total_line_length = sqrt(dx * dx + dy * dy);
int number_segments = (int)total_line_length / length;
if (!(number_segments % 2))
{
if (!(number_segments % 2)) {
number_segments++;
}
double xstep = (double)dx / number_segments;
Expand Down