Skip to content

Commit

Permalink
Command 'curve': Better rounding of coordinates to avoid holes in dra…
Browse files Browse the repository at this point in the history
…wn curve.
  • Loading branch information
dtschump committed Jan 9, 2024
1 parent 33c7441 commit da2afe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gmic_stdlib.gmic
Original file line number Diff line number Diff line change
Expand Up @@ -22027,7 +22027,7 @@ curve : check ${"is_image_arg $1"}" && ${2=0}>=0 && isnum(${3=45}) && inrange(${
!x || ndP>1?(
T = x?dP/ndP:unitnorm(J[#-1,1] - P);
N = lerp([ -T[1],T[0] ],U,$4)*thickness;
C = round(P - N); D = round(P + N);
C = floor(P - N); D = floor(P + N);
x?(
polygon(#"$>",3,A[0],A[1],B[0],B[1],C[0],C[1],${6--1});
polygon(#"$>",3,D[0],D[1],B[0],B[1],C[0],C[1],${6--1});
Expand Down

0 comments on commit da2afe1

Please sign in to comment.