From 6c0154fe258c26c3db0cee4a22c73b37d439fb82 Mon Sep 17 00:00:00 2001 From: Johannes Wolf <519002+johannes-wolf@users.noreply.github.com> Date: Sat, 9 Sep 2023 00:10:09 +0200 Subject: [PATCH] cmd: Fix missing ellipse z coordinate (#159) --- src/cmd.typ | 2 +- tests/circle/ref.png | Bin 134734 -> 148636 bytes tests/circle/test.typ | 8 ++++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cmd.typ b/src/cmd.typ index 0a63fc1a..88c79ad8 100644 --- a/src/cmd.typ +++ b/src/cmd.typ @@ -92,7 +92,7 @@ ("cubic", (x, top, z), (right, y, z), (x + m * rx, top, z), (right, y + m * ry, z)), ("cubic", (right, y, z), (x, bottom, z), - (right, y - m * ry), (x + m * rx, bottom, z)), + (right, y - m * ry, z), (x + m * rx, bottom, z)), ("cubic", (x, bottom, z), (left, y, z), (x - m * rx, bottom, z), (left, y - m * ry, z)), ("cubic", (left, y, z), (x, top, z), diff --git a/tests/circle/ref.png b/tests/circle/ref.png index f29c3af2a3963d91c635192171849aeafb05ffbe..7d15c9de3b4c8aa3575bdba02bc17285d269182f 100644 GIT binary patch delta 12516 zcma)D3wTpiwmzZK%A-`Kg^EHWG7R`43L+q-!9l({!h(ba0QnarxCv^*dTL+_1R*MaMf_p3W^(-Yq&~U768d67H|{nbaHV zUrAhL=c10TqhDBTH4u^5^G`4Ndj4!>a=Ka_m;P~5V#@keCC4`%Hw{-NF0ZIjPUnnQPCVe;ofhrtzPdo^ z?piGSNOkE_Q$|VG(nylF;q<89^OyJP?Cq_(`u0d&UqdMOn$ni=O$S}Qn~c2p3|-j) zXD6GR@B8nrZUfDlhzgQAYc$qPcN=@M zTHm{JLaQ&y^1zP-seQT9^hHA3W|`+-4?2$|Di!#bM9*IK+B~lifdZ*|{Bly)(=$VE zn=P+OCjH52tRqw7XepI@N)?@2Wy&tG^c-80!1X2Aev1^pv@d z=-rRUc$>m(4`*FXYzcleA>XxSpKG(!%YF4-Jw3x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n|%0MtV=r1!2(A4PyQa9cLQ(U zjjV{5UVoOeak<~rTSZThpFUJcf;Mf4x;!g2QF=`-nP{pzhNQ%*~C7^jR ziG6X-Ez-{c7+brf>~W2cUXVbFE*$rxAh)oA z;PnU)=iVf|iUI!BZhc$!cdG0WRHc(GFw%6%TknLNy^l-mN3Xb-sZTG8>Ag=7hTIr@ z#my~*SMYnlZG*c;Q;iP+qz5QgxG@DC1B+`ssBtbOxRU5#ar^>w-r#Z;&QahDF|m^9 z5Ly?GPFqS@Lkc>OUQKThtidhHanHdGK$I{rQA96F*-@n2&V>uNL!j0`j6?f&$*%{+ z0d62g$AKjUloMEv;NFp=NU7mk661vXi2=~s6r8sO>t{!+D&s{_gd9Mpb*;>_c7RjI zeG>eQL06XbH*W&Q{=gS1lWj=PiAIsa{T3qu_icb^;@t@tj(Ih=1HEd>OuC5U{5&xv zaCrdG+?!yTP3O}HY>a@}g5B|pZU@}IZEM5XH7Hu>5!jXBc(IOWpvlOC=lwU)von|m zz?rMW2SlNZ@x)**42l%*ZQ>Kuwl?TI(xGyW-g?{dHcei{PjGg>F=7m0ueyemvVc{}RzqeE=B_vFn?sXVZK7 za`D8Y^df#%x|(g2UfV3|bdHhx{+5K7_vJ3(67%4fWz*|@o{r@uo7v^_D5q_mVSbzb8* zS!PN|t|6`*ZcLaSZTh8KpNF}B4!C!Bta;dl;m0r2t*VS$Rhc5$x7jl7WD|cR&zSUVH)B&? R)CQm`22WQ%mvv4FO#lP~5mEpE diff --git a/tests/circle/test.typ b/tests/circle/test.typ index a6105533..f10d81cb 100644 --- a/tests/circle/test.typ +++ b/tests/circle/test.typ @@ -21,3 +21,11 @@ } } })) + +#box(stroke: 2pt + red, canvas(length: .5cm, { + import draw: * + + for z in range(-2, 2) { + circle((0,0,z)) + } +}))