C: box "box"
line from C to 3cm heading 00 from C chop;
line from C to 3cm heading 10 from C chop;
line from C to 3cm heading 20 from C chop;
line from C to 3cm heading 30 from C chop;
line from C to 3cm heading 40 from C chop;
line from C to 3cm heading 50 from C chop;
line from C to 3cm heading 60 from C chop;
line from C to 3cm heading 70 from C chop;
line from C to 3cm heading 80 from C chop;
line from C to 3cm heading 90 from C chop;
line from C to 3cm heading 100 from C chop;
line from C to 3cm heading 110 from C chop;
line from C to 3cm heading 120 from C chop;
line from C to 3cm heading 130 from C chop;
line from C to 3cm heading 140 from C chop;
line from C to 3cm heading 150 from C chop;
line from C to 3cm heading 160 from C chop;
line from C to 3cm heading 170 from C chop;
line from C to 3cm heading 180 from C chop;
line from C to 3cm heading 190 from C chop;
line from C to 3cm heading 200 from C chop;
line from C to 3cm heading 210 from C chop;
line from C to 3cm heading 220 from C chop;
line from C to 3cm heading 230 from C chop;
line from C to 3cm heading 240 from C chop;
line from C to 3cm heading 250 from C chop;
line from C to 3cm heading 260 from C chop;
line from C to 3cm heading 270 from C chop;
line from C to 3cm heading 280 from C chop;
line from C to 3cm heading 290 from C chop;
line from C to 3cm heading 300 from C chop;
line from C to 3cm heading 310 from C chop;
line from C to 3cm heading 320 from C chop;
line from C to 3cm heading 330 from C chop;
line from C to 3cm heading 340 from C chop;
line from C to 3cm heading 350 from C chop;
autochop02.pikchrMATCH
C pikchr
Rust pikchr
Source
C: box "box" radius 10px
line from C to 3cm heading 00 from C chop;
line from C to 3cm heading 10 from C chop;
line from C to 3cm heading 20 from C chop;
line from C to 3cm heading 30 from C chop;
line from C to 3cm heading 40 from C chop;
line from C to 3cm heading 50 from C chop;
line from C to 3cm heading 60 from C chop;
line from C to 3cm heading 70 from C chop;
line from C to 3cm heading 80 from C chop;
line from C to 3cm heading 90 from C chop;
line from C to 3cm heading 100 from C chop;
line from C to 3cm heading 110 from C chop;
line from C to 3cm heading 120 from C chop;
line from C to 3cm heading 130 from C chop;
line from C to 3cm heading 140 from C chop;
line from C to 3cm heading 150 from C chop;
line from C to 3cm heading 160 from C chop;
line from C to 3cm heading 170 from C chop;
line from C to 3cm heading 180 from C chop;
line from C to 3cm heading 190 from C chop;
line from C to 3cm heading 200 from C chop;
line from C to 3cm heading 210 from C chop;
line from C to 3cm heading 220 from C chop;
line from C to 3cm heading 230 from C chop;
line from C to 3cm heading 240 from C chop;
line from C to 3cm heading 250 from C chop;
line from C to 3cm heading 260 from C chop;
line from C to 3cm heading 270 from C chop;
line from C to 3cm heading 280 from C chop;
line from C to 3cm heading 290 from C chop;
line from C to 3cm heading 300 from C chop;
line from C to 3cm heading 310 from C chop;
line from C to 3cm heading 320 from C chop;
line from C to 3cm heading 330 from C chop;
line from C to 3cm heading 340 from C chop;
line from C to 3cm heading 350 from C chop;
autochop03.pikchrMATCH
C pikchr
Rust pikchr
Source
C: circle "circle"
line from C to 3cm heading 00 from C chop;
line from C to 3cm heading 10 from C chop;
line from C to 3cm heading 20 from C chop;
line from C to 3cm heading 30 from C chop;
line from C to 3cm heading 40 from C chop;
line from C to 3cm heading 50 from C chop;
line from C to 3cm heading 60 from C chop;
line from C to 3cm heading 70 from C chop;
line from C to 3cm heading 80 from C chop;
line from C to 3cm heading 90 from C chop;
line from C to 3cm heading 100 from C chop;
line from C to 3cm heading 110 from C chop;
line from C to 3cm heading 120 from C chop;
line from C to 3cm heading 130 from C chop;
line from C to 3cm heading 140 from C chop;
line from C to 3cm heading 150 from C chop;
line from C to 3cm heading 160 from C chop;
line from C to 3cm heading 170 from C chop;
line from C to 3cm heading 180 from C chop;
line from C to 3cm heading 190 from C chop;
line from C to 3cm heading 200 from C chop;
line from C to 3cm heading 210 from C chop;
line from C to 3cm heading 220 from C chop;
line from C to 3cm heading 230 from C chop;
line from C to 3cm heading 240 from C chop;
line from C to 3cm heading 250 from C chop;
line from C to 3cm heading 260 from C chop;
line from C to 3cm heading 270 from C chop;
line from C to 3cm heading 280 from C chop;
line from C to 3cm heading 290 from C chop;
line from C to 3cm heading 300 from C chop;
line from C to 3cm heading 310 from C chop;
line from C to 3cm heading 320 from C chop;
line from C to 3cm heading 330 from C chop;
line from C to 3cm heading 340 from C chop;
line from C to 3cm heading 350 from C chop;
autochop04.pikchrMATCH
C pikchr
Rust pikchr
Source
C: ellipse "ellipse"
line from C to 3cm heading 00 from C chop;
line from C to 3cm heading 10 from C chop;
line from C to 3cm heading 20 from C chop;
line from C to 3cm heading 30 from C chop;
line from C to 3cm heading 40 from C chop;
line from C to 3cm heading 50 from C chop;
line from C to 3cm heading 60 from C chop;
line from C to 3cm heading 70 from C chop;
line from C to 3cm heading 80 from C chop;
line from C to 3cm heading 90 from C chop;
line from C to 3cm heading 100 from C chop;
line from C to 3cm heading 110 from C chop;
line from C to 3cm heading 120 from C chop;
line from C to 3cm heading 130 from C chop;
line from C to 3cm heading 140 from C chop;
line from C to 3cm heading 150 from C chop;
line from C to 3cm heading 160 from C chop;
line from C to 3cm heading 170 from C chop;
line from C to 3cm heading 180 from C chop;
line from C to 3cm heading 190 from C chop;
line from C to 3cm heading 200 from C chop;
line from C to 3cm heading 210 from C chop;
line from C to 3cm heading 220 from C chop;
line from C to 3cm heading 230 from C chop;
line from C to 3cm heading 240 from C chop;
line from C to 3cm heading 250 from C chop;
line from C to 3cm heading 260 from C chop;
line from C to 3cm heading 270 from C chop;
line from C to 3cm heading 280 from C chop;
line from C to 3cm heading 290 from C chop;
line from C to 3cm heading 300 from C chop;
line from C to 3cm heading 310 from C chop;
line from C to 3cm heading 320 from C chop;
line from C to 3cm heading 330 from C chop;
line from C to 3cm heading 340 from C chop;
line from C to 3cm heading 350 from C chop;
autochop05.pikchrMATCH
C pikchr
Rust pikchr
Source
C: oval "oval"
line from C to 3cm heading 00 from C chop;
line from C to 3cm heading 10 from C chop;
line from C to 3cm heading 20 from C chop;
line from C to 3cm heading 30 from C chop;
line from C to 3cm heading 40 from C chop;
line from C to 3cm heading 50 from C chop;
line from C to 3cm heading 60 from C chop;
line from C to 3cm heading 70 from C chop;
line from C to 3cm heading 80 from C chop;
line from C to 3cm heading 90 from C chop;
line from C to 3cm heading 100 from C chop;
line from C to 3cm heading 110 from C chop;
line from C to 3cm heading 120 from C chop;
line from C to 3cm heading 130 from C chop;
line from C to 3cm heading 140 from C chop;
line from C to 3cm heading 150 from C chop;
line from C to 3cm heading 160 from C chop;
line from C to 3cm heading 170 from C chop;
line from C to 3cm heading 180 from C chop;
line from C to 3cm heading 190 from C chop;
line from C to 3cm heading 200 from C chop;
line from C to 3cm heading 210 from C chop;
line from C to 3cm heading 220 from C chop;
line from C to 3cm heading 230 from C chop;
line from C to 3cm heading 240 from C chop;
line from C to 3cm heading 250 from C chop;
line from C to 3cm heading 260 from C chop;
line from C to 3cm heading 270 from C chop;
line from C to 3cm heading 280 from C chop;
line from C to 3cm heading 290 from C chop;
line from C to 3cm heading 300 from C chop;
line from C to 3cm heading 310 from C chop;
line from C to 3cm heading 320 from C chop;
line from C to 3cm heading 330 from C chop;
line from C to 3cm heading 340 from C chop;
line from C to 3cm heading 350 from C chop;
autochop06.pikchrMATCH
C pikchr
Rust pikchr
Source
C: cylinder "cylinder"
line from C to 3cm heading 00 from C chop;
line from C to 3cm heading 10 from C chop;
line from C to 3cm heading 20 from C chop;
line from C to 3cm heading 30 from C chop;
line from C to 3cm heading 40 from C chop;
line from C to 3cm heading 50 from C chop;
line from C to 3cm heading 60 from C chop;
line from C to 3cm heading 70 from C chop;
line from C to 3cm heading 80 from C chop;
line from C to 3cm heading 90 from C chop;
line from C to 3cm heading 100 from C chop;
line from C to 3cm heading 110 from C chop;
line from C to 3cm heading 120 from C chop;
line from C to 3cm heading 130 from C chop;
line from C to 3cm heading 140 from C chop;
line from C to 3cm heading 150 from C chop;
line from C to 3cm heading 160 from C chop;
line from C to 3cm heading 170 from C chop;
line from C to 3cm heading 180 from C chop;
line from C to 3cm heading 190 from C chop;
line from C to 3cm heading 200 from C chop;
line from C to 3cm heading 210 from C chop;
line from C to 3cm heading 220 from C chop;
line from C to 3cm heading 230 from C chop;
line from C to 3cm heading 240 from C chop;
line from C to 3cm heading 250 from C chop;
line from C to 3cm heading 260 from C chop;
line from C to 3cm heading 270 from C chop;
line from C to 3cm heading 280 from C chop;
line from C to 3cm heading 290 from C chop;
line from C to 3cm heading 300 from C chop;
line from C to 3cm heading 310 from C chop;
line from C to 3cm heading 320 from C chop;
line from C to 3cm heading 330 from C chop;
line from C to 3cm heading 340 from C chop;
line from C to 3cm heading 350 from C chop;
autochop07.pikchrMATCH
C pikchr
Rust pikchr
Source
C: file "file"
line from C to 3cm heading 00 from C chop;
line from C to 3cm heading 10 from C chop;
line from C to 3cm heading 20 from C chop;
line from C to 3cm heading 30 from C chop;
line from C to 3cm heading 40 from C chop;
line from C to 3cm heading 50 from C chop;
line from C to 3cm heading 60 from C chop;
line from C to 3cm heading 70 from C chop;
line from C to 3cm heading 80 from C chop;
line from C to 3cm heading 90 from C chop;
line from C to 3cm heading 100 from C chop;
line from C to 3cm heading 110 from C chop;
line from C to 3cm heading 120 from C chop;
line from C to 3cm heading 130 from C chop;
line from C to 3cm heading 140 from C chop;
line from C to 3cm heading 150 from C chop;
line from C to 3cm heading 160 from C chop;
line from C to 3cm heading 170 from C chop;
line from C to 3cm heading 180 from C chop;
line from C to 3cm heading 190 from C chop;
line from C to 3cm heading 200 from C chop;
line from C to 3cm heading 210 from C chop;
line from C to 3cm heading 220 from C chop;
line from C to 3cm heading 230 from C chop;
line from C to 3cm heading 240 from C chop;
line from C to 3cm heading 250 from C chop;
line from C to 3cm heading 260 from C chop;
line from C to 3cm heading 270 from C chop;
line from C to 3cm heading 280 from C chop;
line from C to 3cm heading 290 from C chop;
line from C to 3cm heading 300 from C chop;
line from C to 3cm heading 310 from C chop;
line from C to 3cm heading 320 from C chop;
line from C to 3cm heading 330 from C chop;
line from C to 3cm heading 340 from C chop;
line from C to 3cm heading 350 from C chop;
autochop08.pikchrMATCH
C pikchr
Rust pikchr
Source
circle "C0"
move
circle "C1"
box at C0.c width 11cm height 2.5cm
arrow from C0 to C1 chop color red
move
text "bug report 2021-07-17" \
"forum 73eea815afda0715" \
"arrow C0 to C1 chopped" \
"C0 and box have same center" \
at 0.5 between last box.w and C0.w
autochop09.pikchrMATCH
C pikchr
Rust pikchr
Source
circle "C0" fit color blue
C1: circle at C0 radius 2.5*C0.radius color red
text "C1" with .n at C1.n color red
circle "X1" at 8*C0.radius heading 60 from C0 fit color blue
circle "X2" at 8*C0.radius heading 80 from C0 fit color red
circle "X3" at 8*C0.radius heading 100 from C0 fit color blue
circle "X4" at 8*C0.radius heading 120 from C0 fit color red
arrow color blue from C0 to X1 chop
arrow color red from C1 to X2 chop
arrow color blue from X3 to C0 chop
arrow color red from X4 to C1 chop
text "chop bug 2021-07-17" \
"forum 1d46e3a0bc5c5631" \
"red lines to red circles" \
"blue lines to blue circle" \
at 2cm below C0
autochop10.pikchrMATCH
C pikchr
Rust pikchr
Source
C: diamond "diamond"
line from C to 3cm heading 00 from C chop;
line from C to 3cm heading 10 from C chop;
line from C to 3cm heading 20 from C chop;
line from C to 3cm heading 30 from C chop;
line from C to 3cm heading 40 from C chop;
line from C to 3cm heading 50 from C chop;
line from C to 3cm heading 60 from C chop;
line from C to 3cm heading 70 from C chop;
line from C to 3cm heading 80 from C chop;
line from C to 3cm heading 90 from C chop;
line from C to 3cm heading 100 from C chop;
line from C to 3cm heading 110 from C chop;
line from C to 3cm heading 120 from C chop;
line from C to 3cm heading 130 from C chop;
line from C to 3cm heading 140 from C chop;
line from C to 3cm heading 150 from C chop;
line from C to 3cm heading 160 from C chop;
line from C to 3cm heading 170 from C chop;
line from C to 3cm heading 180 from C chop;
line from C to 3cm heading 190 from C chop;
line from C to 3cm heading 200 from C chop;
line from C to 3cm heading 210 from C chop;
line from C to 3cm heading 220 from C chop;
line from C to 3cm heading 230 from C chop;
line from C to 3cm heading 240 from C chop;
line from C to 3cm heading 250 from C chop;
line from C to 3cm heading 260 from C chop;
line from C to 3cm heading 270 from C chop;
line from C to 3cm heading 280 from C chop;
line from C to 3cm heading 290 from C chop;
line from C to 3cm heading 300 from C chop;
line from C to 3cm heading 310 from C chop;
line from C to 3cm heading 320 from C chop;
line from C to 3cm heading 330 from C chop;
line from C to 3cm heading 340 from C chop;
line from C to 3cm heading 350 from C chop;
colortest1.pikchrMATCH
C pikchr
Rust pikchr
Source
box "red" fill red fit
move
box "orange" fill orange fit
move
box "yellow" fill yellow fit
move
box "green" fill green fit
move
box "blue" fill blue fit
move
box "violet" fill violet fit
box "red" color red fit with .nw at 1cm below 1st box.sw
move
box "orange" color orange fit
move
box "yellow" color yellow fit
move
box "green" color green fit
move
box "blue" color blue fit
move
box "violet" color violet fit
diamond01.pikchrMATCH
C pikchr
Rust pikchr
Source
D1: diamond "First Diamond"
arrow
D2: diamond "Above" above "Below" below
arrow
D3: diamond "Fitted" fit
arrow from D2.s down 1cm
down
D4: diamond "Long string above" above "Below1" below fit
right
arrow
D5: diamond width 300% "thin" fit
arrow from D3.e right 2cm
right
D6: diamond height 300% "tall" above "diamond" below fit
empty.pikchrMATCH
C pikchr
<!-- empty pikchr diagram -->
Rust pikchr
<!-- empty pikchr diagram -->
Source
expr.pikchrMATCH
C pikchr
Rust pikchr
Source
linerad = 10px
linewid *= 0.5
$h = 0.21
margin = 1cm
debug_label_color = Red
color = lightgray
circle radius 10%
OUT: 6.3in right of previous.e # FIX ME
IN_X: linerad east of first circle.e
# The literal-value line
arrow
LTV: box "literal-value" fit
arrow right even with linerad+2*arrowht east of OUT
circle same
# The bind-parameter line
right
BNDP: oval "bind-parameter" fit with .w at 1.25*$h below LTV.w
arrow right even with OUT; line right linerad then up linerad
arrow from first circle.e right linerad then down even with BNDP \
then to BNDP.w
# The table column reference line
right
SN: oval "schema-name" fit with .w at 2.0*$h below BNDP.w
arrow 2*arrowht
oval "." bold fit
arrow
TN: oval "table-name" fit
arrow right 2*arrowht
oval "." bold fit
arrow
CN: oval "column-name" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,SN.n) down even with SN then to SN.w
TN_Y: 0.375*$h above TN.n
arrow from (IN_X,linerad above TN_Y) down linerad \
then right even with SN
arrow right right even with TN
line right even with linerad+arrowht west of CN.w \
then down even with CN then right linerad
line from (linerad+2*arrowht left of TN.w,TN_Y) right linerad \
then down even with TN then right linerad
# Unary operators
right
UOP: oval "unary-operator" fit with .w at 1.25*$h below SN.w
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,UOP.n) down even with UOP then to UOP.w
# Binary operators
right
BINY: box "expr" fit with .w at 1.25*$h below UOP.w
arrow 2*arrowht
oval "binary-operator" fit
arrow 2*arrowht
box "expr" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,BINY.n) down even with BINY then to BINY.w
# Function calls
right
FUNC: oval "function-name" fit with .w at 2.0*$h below BINY.w
arrow 1.5*arrowht
FLP: oval "(" bold fit
arrow
FDCT: oval "DISTINCT" fit
arrow
FEXP: box "expr" fit
arrow 150%
FRP: oval ")" bold fit
arrow right linerad then down $h then right 2*arrowht
FFC: box "filter-clause" fit
FA1: arrow right linerad then up even with FUNC then right 2*arrowht
arrow right linerad then down $h then right 2*arrowht
FOC: box "over-clause" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,FUNC.n) down even with FUNC then to FUNC.w
# filter clause bypass
arrow from FRP.e right even with FFC
line to arrowht left of FA1.end
# over clause bypass
arrow from FA1.end right even with OUT
line right linerad then up linerad
# expr loop
FCMA: oval "," bold fit at 1.25*$h above FEXP
arrow from FEXP.e right linerad then up even with FCMA \
then to FCMA.e
line from FCMA.w left even with 2*arrowht west of FEXP.w \
then down even with FEXP then right linerad
# "*" argument list
FSTR: oval "*" bold fit with .w at 1.25*$h below FDCT.w
arrow from FLP.e right linerad then down even with FSTR \
then to FSTR.w
FA2: arrow from FSTR.e right even with linerad+2*arrowht west of FRP.w
line right linerad then up even with FRP then right linerad
# empty argument list
arrow from (linerad east of FLP.e,FSTR.n) \
down even with $h below FSTR then right even with FDCT.w
arrow right even with FA2.end
line right linerad then up even with FSTR.n
# parenthesized and vector expressions
right
PRN: oval "(" bold fit with .w at 3.0*$h below FUNC.w
arrow
PEXP: box "expr" fit
arrow
oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,PRN.n) down even with PRN then to PRN.w
# expr loop
PCMA: oval "," bold fit at 1.25*$h above PEXP
arrow from PEXP.e right linerad then up even with PCMA \
then to PCMA.e
line from PCMA.w left even with 2*arrowht left of PEXP.w \
then down even with PEXP then right linerad
# CAST expression
right
CAST: oval "CAST" fit with .w at 1.25*$h below PRN.w
arrow 2*arrowht
oval "(" bold fit
arrow 2*arrowht
box "expr" fit
arrow 2*arrowht
oval "AS" fit
arrow 2*arrowht
box "type-name" fit
arrow 2*arrowht
oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,CAST.n) down even with CAST then to CAST.w
# COLLATE expression
right
COLL: box "expr" fit with .w at 1.25*$h below CAST.w
arrow 2*arrowht
oval "COLLATE" fit
arrow 2*arrowht
oval "collation-name" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,COLL.n) down even with COLL then to COLL.w
# LIKE expressions
right
LIKE: box "expr" fit with .w at 1.25*$h below COLL.w
arrow
LNOT: oval "NOT" fit
arrow 150%
LOP1: oval "LIKE" fit
LOP2: oval "GLOB" fit with .w at 1.25*$h below LOP1.w
LOP3: oval "REGEXP" fit with .w at 1.25*$h below LOP2.w
LOP4: oval "MATCH" fit with .w at 1.25*$h below LOP3.w
LE2: box "expr" fit with .w at (4*arrowht+linerad east of LOP3.e,LIKE)
arrow from LE2.e right linerad then down $h then right 2*arrowht
LESC: oval "ESCAPE" fit
arrow 2*arrowht
box "expr" fit
LA1: arrow right linerad then up even with LIKE then right
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,LIKE.n) down even with LIKE then to LIKE.w
# NOT bypass
line from linerad*2 west of LNOT.w \
right linerad then down $h \
then right even with arrowht east of LNOT.e \
then up even with LNOT then right linerad
# Inputs to the operators
LX1: 2*arrowht west of LOP1.w
arrow from linerad west of LX1 right linerad \
then down even with LOP4 then to LOP4.w
arrow from (LX1,LOP2.n) down even with LOP2 then to LOP2.w
arrow from (LX1,LOP3.n) down even with LOP3 then to LOP3.w
# Outputs from the operators
LX2: 2*arrowht east of LOP3.e
arrow from LOP4.e right even with LX2
arrow right linerad then up even with LE2 then to LE2.w
arrow from LOP3.e right even with LX2
line right linerad then up linerad
arrow from LOP2.e right even with LX2
line right linerad then up linerad
line from LOP1.e to arrowht west of LE2.w
# ESCAPE bypass
arrow from LE2.e right even with LESC
line to arrowht left of LA1.end
# ISNULL and NOTNULL operators
right
NNUL: box "expr" fit with .w at 5.0*$h below LIKE.w
arrow
NN1: oval "ISNULL" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,NNUL.n) down even with NNUL then to NNUL.w
NN2: oval "NOTNULL" fit with .w at 1.25*$h below NN1.w
right
NN3: oval "NOT" fit with .w at 1.25*$h below NN2.w
arrow 2*arrowht
NN3B: oval "NULL" fit
NNA1: arrow 2*arrowht
arrow right linerad then up even with NN1 then right
arrow from NN2.e right even with NNA1.end
line right linerad then up linerad
arrow from NNUL.e right linerad then down even with NN3 then to NN3.w
arrow from NNUL.e right linerad then down even with NN2 then to NN2.w
# The IS operator
right
IS: box "expr" fit with .w at 3.75*$h below NNUL.w
arrow 2*arrowht
oval "IS" fit
arrow
ISN: oval "NOT" fit
arrow
box "expr" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,IS.n) down even with IS then to IS.w
# NOT bypass
line from 3*arrowht west of ISN.w right linerad \
then down 0.8*$h then right even with arrowht east of ISN.e \
then up even with ISN then right linerad
# The BETWEEN operator
right
BTW: box "expr" fit with .w at 1.5*$h below IS.w
arrow
BTWN: oval "NOT" fit
arrow
oval "BETWEEN" fit
arrow 2*arrowht
box "expr" fit
arrow 2*arrowht
oval "AND" fit
arrow 2*arrowht
box "expr" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,BTW.n) down even with BTW then to BTW.w
# NOT bypass
line from 3*arrowht west of BTWN.w right linerad \
then down 0.8*$h then right even with arrowht east of BTWN.e \
then up even with BTWN then right linerad
# The IN operator
right
IN: box "expr" fit with .w at 1.75*$h below BTW.w
arrow
INNT: oval "NOT" fit
arrow
ININ: oval "IN" fit
arrow
INLP: oval "(" bold fit
arrow
INSS: box "select-stmt" fit
arrow
oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,IN.n) down even with IN then to IN.w
# NOT bypass
line from 3*arrowht west of INNT.w right linerad \
then down 0.8*$h then right even with arrowht east of INNT.e \
then up even with INNT then right linerad
# select-stmt bypass
line from 3*arrowht west of INSS.w right linerad \
then up 0.8*$h then right even with arrowht east of INSS.e \
then up even with INSS then right linerad
# expr list instead of select-stmt
INE1: box "expr" fit at 1.25*$h below INSS
arrow from 3*arrowht west of INSS.w right linerad \
then down even with INE1 then to INE1.w
line from INE1.e right even with arrowht east of INSS.e \
then up even with INSS then right linerad
# expr loop
INC1: oval "," bold fit at 1.25*$h below INE1
arrow from INE1.e right linerad then down even with INC1 \
then to INC1.e
line from INC1.w left even with 2*arrowht west of INE1.w \
then up even with INE1 then right linerad
# reference-to-table choice as RHS
INSN: oval "schema-name" fit with .w at 4.25*$h below INLP.w
arrow from INSN.e right 1.5*arrowht
INDT: oval "." bold fit
arrow 150%
INTF: oval "table-function" fit
arrow 1.5*arrowht
INL2: oval "(" bold fit
arrow 125%
INE2: box "expr" fit
arrow 125%
INR2: oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
# table reference branch
right
INTB: oval "table-name" fit with .w at 2*$h above INTF.w
arrow right even with OUT; line right linerad then up linerad
arrow from linerad+2*arrowht west of INTF.w right linerad \
then up even with INTB then to INTB.w
# expr-list no table-valued-functions
INC2: oval "," bold fit at 1.1*$h above INE2
arrow from INE2.e right linerad then up even with INC2 \
then to INC2.e
line from INC2.w right even with 2*arrowht west of INE2.w \
then down even with INE2 then right linerad
# expr-list bypass for table-valued functions
line from INL2.e right linerad then down .7*$h \
then right even with 2*arrowht left of INR2.w \
then up even with INR2 then right linerad
# links from IN operator to table references
arrow from ININ.e right linerad then down even with INSN \
then to INSN.w
# schema-name bypass
INY3: 0.45*$h above INSN.n
arrow from (linerad east of ININ.e,linerad above INY3) \
down linerad then right even with arrowht right of INSN.e
line right even with arrowht east of INDT.e \
then down even with INDT then right linerad
# NOT? EXISTS? (SELECT) clause
right
NE: oval "NOT" fit with .w at (IN.w,1.5*$h below INSN)
arrow
NEE: oval "EXISTS" fit
arrow
NELP: oval "(" bold fit
arrow 2*arrowht
box "select-stmt" fit
arrow 2*arrowht
oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,NE.n) down even with NE then to NE.w
NE_Y: 0.375*$h above NE.n
arrow from (IN_X,linerad above NE_Y) down linerad \
then right even with NE
line right even with linerad+arrowht west of NELP.w \
then down even with NELP then right linerad
line from (linerad+2*arrowht left of NEE.w,NE_Y) right linerad \
then down even with NEE then right linerad
# CASE expressions
right
CS: oval "CASE" fit with .w at 1.25*$h below NE.w
arrow
CSE1: box "expr" fit
arrow 150%
CSW: oval "WHEN" fit
arrow 2*arrowht
CSE2: box "expr" fit
arrow 2*arrowht
oval "THEN" fit
arrow 2*arrowht
CSE3: box "expr" fit
arrow 200%
CSEL: oval "ELSE" fit
arrow 2*arrowht
CSE4: box "expr" fit
arrow
oval "END" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,CS.n) down even with CS then to CS.w
# first expr bypass
CSY: 0.9*$h below CS
line from CS.e right linerad then down even with CSY \
then right even with arrowht east of CSE1.e then up even with CSE1 \
then right linerad
# when clause loop
arrow from CSE3.e right linerad then down even with CSY \
then left even with CSE2
line left even with 2*arrowht west of CSW.w \
then up even with CSW then right linerad
# ELSE clause bypass
line from linerad+2*arrowht west of CSEL.w right linerad \
then down even with CSY then right even with arrowht east of CSE4.e \
then up even with CSE4 then right linerad
# The RAISE function
right
RSE: box "raise-function" fit with .w at 1.9*$h below CS.w
arrow right even with OUT;
line right linerad then up even with first circle then right linerad
arrow from (IN_X,BNDP.n) down even with RSE then to RSE.w
expr2.pikchrMATCH
C pikchr
Rust pikchr
Source
# Isolated test for rounded corner path generation
linerad = 10px
line right linerad then up linerad
fonts01.pikchrMATCH
C pikchr
Rust pikchr
Source
ROW1: \
box "left" ljust \
"normal text"\
"right" rjust fit
box "left" ljust italic \
"italic text" italic \
"right" rjust italic fit
box "left" ljust bold \
"bold text" bold \
"right" rjust bold fit
box "left" ljust mono \
"monospace text" monospace \
"right" rjust mono fit
ROW2: \
box "left" ljust bold italic\
"bold italic text" italic bold \
"right" rjust italic bold fit with nw at ROW1.sw
box "left" ljust bold mono \
"bold monospace text" mono bold \
"right" rjust monospace bold fit
box "left" ljust italic mono \
"italic monospace text" mono italic \
"right" rjust monospace italic fit
ROW3: \
box "left" ljust bold italic mono \
"bold italic text" italic monospace bold \
"right" rjust monospace italic bold fit with nw at ROW2.sw
ROW4: \
box "left" ljust big \
"normal big text" big\
"right" rjust big fit with nw at ROW3.sw
box "left" ljust italic big \
"big italic text" italic big \
"right" rjust italic big fit
box "left" big ljust bold \
"big bold text" big bold \
"right" rjust big bold fit
box "left" ljust big mono \
"big monospace text" big monospace \
"right" rjust mono big fit
ROW5: \
box "left" ljust big bold italic\
"big bold italic text" big italic bold \
"right" rjust italic bold big fit with nw at ROW4.sw
box "left" ljust bold mono big \
"big bold monospace text" mono big bold \
"right" rjust monospace bold big fit
box "left" ljust italic mono big \
"big italic monospace text" mono big italic \
"right" rjust monospace italic big fit
ROW6: \
box "left" ljust bold italic big mono \
"big bold italic mono text" italic monospace big bold \
"right" rjust monospace italic bold big fit with nw at ROW5.sw
gridlines1.pikchrMATCH
C pikchr
Rust pikchr
Source
# Gridlines
# (Copied, with modifications, from a post by Steve Nicolai.
#
thickness *= 0.5
line color gray from -1.25, 1 to 1.25, 1
line same from -1.25, .5 to 1.25, .5
line same from -1.25, -0.5 to 1.25, -0.5
line same from -1.25, -1 to 1.25, -1
line same from -1.0, -1.25 to -1.0, 1.25
line same from -0.5, -1.25 to -0.5, 1.25
line same from 0.5, -1.25 to 0.5, 1.25
line same from 1.0, -1.25 to 1.0, 1.25
right
arrow from -1.375, 0 to 1.375, 0 thick
text "x" fit
up
arrow from 0, -1.375 to 0, 1.375 thick
text "y" fit
narrow.pikchrMATCH
C pikchr
Rust pikchr
Source
stickwidth=.045
box height 1 width stickwidth fill 0xC89DC7
move width stickwidth
box height 1 width stickwidth fill 0x9FAAD2
move width stickwidth
box height 1 width stickwidth fill 0x72B6C0
move width stickwidth
box height 1 width stickwidth fill 0x77B89D
move width stickwidth
box height 1 width stickwidth fill 0xA0B280
move width stickwidth
box height 1 width stickwidth fill 0xC5A685
move width stickwidth
box height 1 width stickwidth fill 0xD59CA7
move same
line <-
move same
box "Lines should all be" ljust \
"the same width." ljust \
"No round-off errors." ljust fit thickness 0
real01.pikchrMATCH
C pikchr
Rust pikchr
Source
scale = 0.9
bh = 0.45in
u32w = 0.75in
u64w = 1.5in
fullw = 3.0in
gap = 0.06in
# Row 0: Identity (bytes 0-15)
L0: text "IDENTITY" mono bold at (0, 0)
R0F0: box "msg_id" "u64" mono width u64w height bh fill 0xCFE7F3 \
with .w at L0.e + (0.2in, 0)
R0F1: box "channel_id" "u32" mono width u32w height bh fill 0xCFE7F3 with .w at R0F0.e
R0F2: box "method_id" "u32" mono width u32w height bh fill 0xCFE7F3 with .w at R0F1.e
# Separators
line from R0F0.ne to R0F0.se color 0x666666
line from R0F1.ne to R0F1.se color 0x666666
# Byte offsets above first row
text "0" mono small with .s at R0F0.nw + (0, 0.08in)
text "8" mono small with .s at R0F1.nw + (0, 0.08in)
text "12" mono small with .s at R0F2.nw + (0, 0.08in)
text "16" mono small with .s at R0F2.ne + (0, 0.08in)
# Row 1: Payload location (bytes 16-31)
L1: text "LOCATION" mono bold with .e at L0.e + (0, -bh - gap)
R1F0: box "payload_slot" "u32" mono width u32w height bh fill 0xC9EFC2 \
with .nw at R0F0.sw + (0, -gap)
R1F1: box "payload_gen" "u32" mono width u32w height bh fill 0xC9EFC2 with .w at R1F0.e
R1F2: box "payload_off" "u32" mono width u32w height bh fill 0xC9EFC2 with .w at R1F1.e
R1F3: box "payload_len" "u32" mono width u32w height bh fill 0xC9EFC2 with .w at R1F2.e
# Separators
line from R1F0.ne to R1F0.se color 0x666666
line from R1F1.ne to R1F1.se color 0x666666
line from R1F2.ne to R1F2.se color 0x666666
text "32" mono small with .w at R1F3.e + (0.08in, 0)
# Row 2: Flow control (bytes 32-47)
L2: text "FLOW CTRL" mono bold with .e at L1.e + (0, -bh - gap)
R2F0: box "flags" "u32" mono width u32w height bh fill 0xFFF2B6 \
with .nw at R1F0.sw + (0, -gap)
R2F1: box "credit_grant" "u32" mono width u32w height bh fill 0xFFF2B6 with .w at R2F0.e
R2F2: box "deadline_ns" "u64" mono width u64w height bh fill 0xFFF2B6 with .w at R2F1.e
# Separators
line from R2F0.ne to R2F0.se color 0x666666
line from R2F1.ne to R2F1.se color 0x666666
text "48" mono small with .w at R2F2.e + (0.08in, 0)
# Row 3: Inline payload (bytes 48-63)
L3: text "INLINE" mono bold with .e at L2.e + (0, -bh - gap)
R3F0: box "inline_payload" "[u8; 16]" mono width fullw height bh fill 0xF1B5B5 \
with .nw at R2F0.sw + (0, -gap)
text "64" mono small with .w at R3F0.e + (0.08in, 0)
# Variable payload section
L4: text "PAYLOAD" mono bold with .e at L3.e + (0, -bh - gap - 0.1in)
PL: box "postcard-encoded data" "0+ bytes" mono width fullw height 0.5in \
fill 0xDFF5E1 dashed with .nw at R3F0.sw + (0, -gap - 0.1in)
test01.pikchrMATCH
C pikchr
Rust pikchr
Source
right;
circle "C0";
A0: arrow;
circle "C1";
A1: arrow; circle "C2";
arrow;
circle "C4";
arrow;
circle "C6"
circle "C3" at (C4.x-C2.x) ne of C2;
arrow;
circle "C5"
arrow from C2.ne to C3.sw
assert( previous == last arrow )
assert( previous == 6th arrow )
# Demonstrate that a new point can be established using LABEL: notation
AS: start of last arrow
AE: end of last arrow
# Validate various kinds of expressions and locations as a test of
# parser expression processing and layout
#
assert( last arrow.start.x == C2.ne.x )
assert( AS.y == C2.ne.y )
assert( last arrow.end.x == C3.sw.x )
assert( AE.y == C3.sw.y )
assert( AE == C3.sw )
assert( 1st last arrow.end == C3.sw )
assert( start of A0 == C0.e )
assert( C0.y == C1.y );
assert( C0.y == C2.y );
assert( C0.y == C4.y );
assert( C0.y == C6.y );
assert( C3.y == C5.y );
test02.pikchrMATCH
C pikchr
Rust pikchr
Source
/* First generate the main graph */
scale = 0.75
Main: [
circle "C0"
arrow
circle "C1"
arrow
circle "C2"
arrow
circle "C4"
arrow
circle "C6"
]
Branch: [
circle "C3"
arrow
circle "C5"
] with .sw at Main.C2.n + (0.35,0.35)
arrow from Main.C2 to Branch.C3 chop
/* Now generate the background colors */
layer = 0
$featurecolor = 0xfedbce
$maincolor = 0xd9fece
$divY = (Branch.y + Main.y)/2
$divH = (Branch.y - Main.y)
box fill $featurecolor color $featurecolor \
width Branch.width*1.5 height $divH \
at Branch
box fill $maincolor color $maincolor \
width Main.width+0.1 height $divH \
at Main
"main" ljust at 0.1 se of nw of 2nd box
"feature" ljust at 0.1 se of nw of 1st box
test03.pikchrMATCH
C pikchr
Rust pikchr
Source
right
B1: box "One"; line
B2: box "Two"; arrow
B3: box "Three"; down; arrow down 50%; circle "Hi!"; left;
spline -> left 2cm then to One.se
Macro: [
B4: box "four"
B5: box "five"
B6: box "six"
] with n at 3cm below s of 2nd box
arrow from s of 2nd box to Macro.B5.n
spline -> from e of last circle right 1cm then down 1cm then to Macro.B4.e
box width Macro.width+0.1 height Macro.height+0.1 at Macro color Red
box width Macro.B5.width+0.05 \
height Macro.B5.height+0.05 at Macro.B5 color blue
test04.pikchrMATCH
C pikchr
13<br>
/* 1 */ print 5+8;
/* 2 */
/* 3 */ # NB: Deliberate division-by-zero error in order to test math logic
/* 4 */ print (17.4-5)/(2-2);
^
ERROR: division by zero
0<br>
Rust pikchr
Error: Division by zero
Source
print 5+8;
# NB: Deliberate division-by-zero error in order to test math logic
print (17.4-5)/(2-2);
test05.pikchrMATCH
C pikchr
0.5<br>
0.8<br>
2<br>
16738740<br>
817<br>
0.9092974268<br>
-0.4161468365<br>
4.123105626<br>
5<br>
10<br>
/* 10 */ print sqrt(17)
/* 11 */ print min(5,10)
/* 12 */ print max(5,10)
/* 13 */
/* 14 */ # NB: deliberate sqrt() error in order to test math logic
/* 15 */ print sqrt(-11)
^^^^
ERROR: sqrt of negative value
0<br>
Rust pikchr
Error: sqrt of negative
Source
print linewid
linewid=0.8
print linewid
scale=2.0
print scale
print hotpink
print 17 + linewid*1000;
print sin(scale);
print cos(scale)
print sqrt(17)
print min(5,10)
print max(5,10)
# NB: deliberate sqrt() error in order to test math logic
print sqrt(-11)
B1: box "one" width 1 height 1 at 2,2;
B2: box thickness 300% dotted 0.03 "two" at 1,3;
print "B2.n: ",B2.n.x,",",B2.n.y
print "B2.c: ",B2.c.x,",",B2.c.y
print "B2.e: ",B2.e.x,",",B2.e.y
scale = 1
box "three" "four" ljust "five" with .n at 0.1 below B2.s width 50%
# Text demo: <text x="100" y="100" text-anchor="end" dominant-baseline="central">I love SVG!</text>
test07.pikchrMATCH
C pikchr
this is a test: 139<br>
Colors: 16753920 0 16777215 16711680 32768 255<br>
Rust pikchr
Source
B: box "This is" "<b>" "box \"B\"" color DarkRed
"B.nw" rjust above at 0.05 left of B.nw
"B.w" rjust at 0.05 left of B.w
"B.sw" rjust below at 0.05 left of B.sw; $abc = DarkBlue
"B.s" below at B.s
// C++ style comments allowed.
"B.se" ljust below at 0.05 right of B.se color DarkBlue
"B.e" ljust at 0.05 right of B.e /* C-style comments */
"B.ne" ljust above at 0.05 right of B.ne
"B.n" center above at B.n
print "this is a test: " /*comment ignored*/, $abc
print "Colors:", Orange, Black, White, Red, Green, Blue
# line from B.ne + (0.05,0) right 1.0 then down 2.5 then left 1.5
test08.pikchrMATCH
C pikchr
Rust pikchr
Source
debug = 1;
box "one" width 80% height 80%
box "two" width 150% color DarkRed # Comment does not mask newline
arrow "xyz" above // Comment does not mask newline
box "three" height 150% color DarkBlue
down
arrow
B4: box "four"
B45: box "4.5" fill SkyBlue
move
B5: box "five"
left
B6: box "six"
up
box "seven" width 50% height 50%
line from 0.1 right of B4.e right 1 then down until even with B5 \
then to B5 rad 0.1 chop
arrow from B6 left even with 2nd box then up to 2nd box chop rad 0.1
arrow from 1/2 way between B6.w and B6.sw left until even with first box \
then up to first box rad 0.1 chop
oval wid 25% ht B4.n.y - B45.s.y at (B6.x,B4.s.y)
arrow from last box to last oval chop
arrow <- from B4.w left until even with last oval.e
arrow <- from B45 left until even with last oval.e chop
test09.pikchrMATCH
C pikchr
Rust pikchr
Source
HEAD: circle
circle radius 50% with .se at HEAD.nw
circle radius 50% with .sw at HEAD.ne
test10.pikchrMATCH
C pikchr
Rust pikchr
Source
C: "+"; $x = 0
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
$x = $x + 10
line from 0.5 heading $x from C to 1.0 heading $x from C
test12.pikchrMATCH
C pikchr
Rust pikchr
Source
circle "One"
arrow
circle "Two"; down
arrow down 40%
circle "Three"
move
circle "Four"
test13.pikchrMATCH
C pikchr
Rust pikchr
Source
// margin = 1
line up 1 right 2
linewid = 0
arrow left 2
move left 0.1
line <-> down 1 "height " rjust
print "1in=",1in
print "1cm=",1cm
print "1mm=",1mm
print "1pt=",1pt
print "1px=",1px
print "1pc=",1pc
scale = 0.25
circle "in" radius 1in
circle "cm" radius 2.54cm
circle "mm" radius 25.4mm
circle "pt" radius 72pt
circle "px" radius 96px
circle "pc" radius 6pc
circle "in" radius 0.5*1in with .n at s of 1st circle
circle "cm" radius 0.5*2.54cm
circle "mm" radius 25.4mm * 0.5
circle "pt" radius 72pt * 0.5
circle "px" radius 96px * 0.5
circle "pc" radius 6pc * 0.5
box dotted; line dotted; move; line dashed; box dashed
test21.pikchrMATCH
C pikchr
Rust pikchr
Source
line right 5 dashed; move left 5 down .25; right
line right 5 dashed 0.25; move left 5 down .25; right
line right 5 dashed 0.5; move left 5 down .25; right
line right 5 dashed 1;
margin = 24pt;
linewid *= 1.75
arrow "on top of"; move
arrow "above" "below"; move
arrow "above" above; move
arrow "below" below; move
arrow "above" "on top of" "below"
move to start of first arrow down 1in;
right
arrow "way above" "above" "on the line" "below" "way below"
move; arrow "way above" "above" "below" "way below"
move to start of first arrow down 2in;
right
box "first line" "second line" "third line" "fourth line" "fifth line" fit
move
box "first line" "second line" "third line" "fourth line" fit
move
box "first line" "second line" "third line" fit
move
box "first line" "second line" fit
move
box "first line" fit
move to start of first arrow down 3in;
right
box "first above" above "second above" above "third" fit
dot color red at last box
move 2cm
box " 3 leading spaces" "&" "3 trailing spaces " fit
test23b.pikchrMATCH
C pikchr
0.14 0.015<br>
Rust pikchr
Source
margin = 24pt;
linewid *= 1.75
charht = 0.14
//thickness *= 8
print charht, thickness
arrow "on top of"; move
arrow "above" "below"; move
arrow "above" above; move
arrow "below" below; move
arrow "above" "on top of" "below"
move to start of first arrow down 1in;
right
arrow "way a||bove" "ab||ove" "on t||he line" "below" "way below"
move; arrow "way above" "above" "below" "way below"
move; arrow "way above" above "above" above
move; arrow "below" below "way below" below
move; arrow "above-1" above "above-2" above "floating"
move to start of first arrow down 2in;
right
arrow "above-1" above "above-2" above "below" below
move; arrow "below-1" below "below-2" below "floating"
move; arrow "below-1" below "below-2" below "above" above
move to start of first arrow down 3in;
right
box "first line" "second line" "third line" "fourth line" "fifth line" fit
move
box "first line" "second line" "third line" "fourth line" fit
move
box "first line" "second line" "third line" fit
move
box "first line" "second line" fit
move
box "first line" fit
move to start of first arrow down 4in;
right
box "first above" above "second above" above "third" fit
dot color red at last box
test23c.pikchrMATCH
C pikchr
Rust pikchr
Source
linewid *= 2
arrow "Big" big "Small" small thin
box invis "thin" "line" fit
move
arrow "Big Big" big big "Small Small" small small thick
box invis "thick" "line" fit
box thick "Thick" with .nw at .5 below start of 1st arrow
move
box thick thick "Thick" "Thick"
move
box thin "Thin"
move
box thin thin "Thin" "Thin"
test24.pikchrMATCH
C pikchr
Rust pikchr
Source
arrow left; box; arrow; circle; arrow
test25.pikchrMATCH
C pikchr
Rust pikchr
Source
arrow; circle; down; arrow
test26.pikchrMATCH
C pikchr
Rust pikchr
Source
line from 0,0 right 1 then up 1 then right 1 then down 1.5 \
then left 0.6 dashed;
spline from 0,0 right 1 then up 1 then right 1 then down 1.5 \
then left 0.6
circle fill white \
at 1/2 between 4th vertex of previous and 5th vertex of previous
spline -> from last circle.e go right then heading 30 then heading 45 \
then heading 60 then heading 75
test27.pikchrMATCH
C pikchr
Rust pikchr
Source
line dotted right 1 then down 0.5 left 1 then right 1
spline from start of first line color red \
right 1 then down 0.5 left 1 then right 1 <->
spline from start of first line color blue radius 0.2 \
right 1 then down 0.5 left 1 then right 1 <->
move down 1 from start of first line
line radius 0.3 \
right 1 then down 0.5 left 1 then right 1 <->
test28.pikchrMATCH
C pikchr
Rust pikchr
Source
box "Box"
arrow
cylinder "One"
down
arrow
ellipse "Ellipse"
up
arrow from One.n
circle "Circle"
right
arrow from One.e <-
circle "E" radius 50%
circle "NE" radius 50% at 0.5 ne of One.ne
arrow from NE.sw to One.ne
circle "SE" radius 50% at 0.5 se of One.se
arrow from SE.nw to One.se
spline from One.sw left 0.2 down 0.2 then to Box.se ->
spline from Circle.w left 0.3 then left 0.2 down 0.2 then to One.nw ->
test29.pikchrMATCH
C pikchr
Rust pikchr
Source
# Demonstrate the ability to close and fill a line with the "fill"
# attribute - treating it as a polygon.
#
line right 1 then down 0.25 then up .5 right 0.5 \
then up .5 left 0.5 then down 0.25 then left 1 close fill blue
move
box "Box to right" "of the" "polygon"
move
line "not a" "polygon" right 1in fill red
move to w of 1st line then down 3.5cm
line same as 1st line
test30.pikchrMATCH
C pikchr
Rust pikchr
Source
debug = 1
down; box ht 0.2 wid 1.5; move down 0.15; box same; move same; box same
test31.pikchrMATCH
C pikchr
Rust pikchr
Source
box "1"
[ box "2"; arrow "3" above; box "4" ] with .n at last box.s - (0,0.1)
"Thing 2: " rjust at last [].w
dot at last box.s color red
dot at last [].n color blue
test32.pikchrMATCH
C pikchr
0.5 0<br>
Rust pikchr
Source
spline right then up then left then down ->
move right 2cm
spline right then up left then down ->
move right 2cm
dot; dot; dot;
dot rad 150% color red at 1st vertex of 1st spline
dot same color orange at 2nd vertex of 1st spline
dot same color green at 3rd vertex of 1st spline
dot same color blue at 4th vertex of 1st spline
dot same color red at 1st vertex of 2nd spline
dot same color green at 2nd vertex of 2nd spline
dot same color blue at 3rd vertex of 2nd spline
print 2nd vertex of 1st spline.x, 2nd vertex of 1st spline.y
test33.pikchrMATCH
C pikchr
Rust pikchr
Source
margin = 1cm
"+" at 0,0
arc -> from 0.5,0 to 0,0.5
arc -> cw from 0,0 to 1,0.5
test34.pikchrMATCH
C pikchr
Rust pikchr
Source
line; arc; arc cw; arrow
test35.pikchrMATCH
C pikchr
Rust pikchr
Source
A: ellipse
ellipse ht .2 wid .3 with .se at 1st ellipse.nw
ellipse ht .2 wid .3 with .sw at 1st ellipse.ne
circle rad .05 at 0.5 between A.nw and A.c
circle rad .05 at 0.5 between A.ne and A.c
arc from 0.25 between A.w and A.e to 0.75 between A.w and A.e
// dot color red at A.nw
// dot color orange at A.c
// dot color purple at A.ne
test36.pikchrMATCH
C pikchr
Rust pikchr
Source
h = .5; dh = .02; dw = .1
[
Ptr: [
boxht = h; boxwid = dw
A: box
B: box
C: box
box wid 2*boxwid "..."
D: box
]
Block: [
boxht = 2*dw;
boxwid = 2*dw
movewid = 2*dh
A: box; move
B: box; move
C: box; move
box invis "..." wid 2*boxwid; move
D: box
] with .n at Ptr.s - (0,h/2)
arrow from Ptr.A to Block.A.nw + (dh,0)
arrow from Ptr.B to Block.B.nw + (dh,0)
arrow from Ptr.C to Block.C.nw + (dh,0)
arrow from Ptr.D to Block.D.nw + (dh,0)
]
box dashed ht last [].ht+dw wid last [].wid+dw at last []
test37.pikchrMATCH
C pikchr
Rust pikchr
Source
# Change from the original:
# Need fixing:
# * "bottom of last box"
# * ".t"
#
define ndblock {
box wid boxwid/2 ht boxht/2
down; box same with .t at bottom of last box; box same
}
boxht = .2; boxwid = .3; circlerad = .3; dx = 0.05
down; box; box; box; box ht 3*boxht "." "." "."
L: box; box; box invis wid 2*boxwid "hashtab:" with .e at 1st box .w
right
Start: box wid .5 with .sw at 1st box.ne + (.4,.2) "..."
N1: box wid .2 "n1"; D1: box wid .3 "d1"
N3: box wid .4 "n3"; D3: box wid .3 "d3"
box wid .4 "..."
N2: box wid .5 "n2"; D2: box wid .2 "d2"
arrow right from 2nd box
ndblock
spline -> right .2 from 3rd last box then to N1.sw + (dx,0)
spline -> right .3 from 2nd last box then to D1.sw + (dx,0)
arrow right from last box
ndblock
spline -> right .2 from 3rd last box to N2.sw-(dx,.2) to N2.sw+(dx,0)
spline -> right .3 from 2nd last box to D2.sw-(dx,.2) to D2.sw+(dx,0)
arrow right 2*linewid from L
ndblock
spline -> right .2 from 3rd last box to N3.sw + (dx,0)
spline -> right .3 from 2nd last box to D3.sw + (dx,0)
circlerad = .3
circle invis "ndblock" at last box.e + (1.2,.2)
arrow dashed from last circle.w to 5/8<last circle.w,2nd last box> chop
box invis wid 2*boxwid "ndtable:" with .e at Start.w
test38.pikchrMATCH
C pikchr
Rust pikchr
Source
# Need fixing:
#
# * ".bot" as an abbreviation for ".bottom"
# * "up from top of LA"
#
arrow "source" "code"
LA: box "lexical" "analyzer"
arrow "tokens" above
P: box "parser"
arrow "intermediate" "code"
Sem: box "semantic" "checker"
arrow
arrow <-> up from top of LA
LC: box "lexical" "corrector"
arrow <-> up from top of P
Syn: box "syntactic" "corrector"
arrow up
DMP: box "diagnostic" "message" "printer"
arrow <-> right from east of DMP
ST: box "symbol" "table"
arrow from LC.ne to DMP.sw
arrow from Sem.nw to DMP.se
arrow <-> from Sem.top to ST.bot
test38b.pikchrMATCH
C pikchr
Rust pikchr
Source
# Need fixing:
#
# * ".bot" as an abbreviation for ".bottom"
# * "up from top of LA"
#
arrow "source" "code"
LA: box "lexical" "analyzer"
arrow "tokens" above
P: box "parser"
arrow "intermediate" "code" wid 180%
Sem: box "semantic" "checker"
arrow
arrow <-> up from top of LA
LC: box "lexical" "corrector"
arrow <-> up from top of P
Syn: box "syntactic" "corrector"
arrow up
DMP: box "diagnostic" "message" "printer"
arrow <-> right from east of DMP
ST: box "symbol" "table"
arrow from LC.ne to DMP.sw
arrow from Sem.nw to DMP.se
arrow <-> from Sem.top to ST.bot
# Corner test
box "C"
$d = 1in
circle rad 50% "N" at $d n of C; arrow from last circle to C.n chop
circle same "NE" at $d ne of C; arrow from last circle to C.ne chop
circle same "E" at $d e of C; arrow from last circle to C.e chop
circle same "SE" at $d se of C; arrow from last circle to C.se chop
circle same "S" at $d s of C; arrow from last circle to C.s chop
circle same "SW" at $d sw of C; arrow from last circle to C.sw chop
circle same "W" at $d w of C; arrow from last circle to C.w chop
circle same "NW" at $d nw of C; arrow from last circle to C.nw chop
box "C" at 3*$d east of C radius 15px
circle rad 50% "N" at $d n of C; arrow from last circle to C.n chop
circle same "NE" at $d ne of C; arrow from last circle to C.ne chop
circle same "E" at $d e of C; arrow from last circle to C.e chop
circle same "SE" at $d se of C; arrow from last circle to C.se chop
circle same "S" at $d s of C; arrow from last circle to C.s chop
circle same "SW" at $d sw of C; arrow from last circle to C.sw chop
circle same "W" at $d w of C; arrow from last circle to C.w chop
circle same "NW" at $d nw of C; arrow from last circle to C.nw chop
ellipse "C" at 2.5*$d south of 1st box
circle rad 50% "N" at $d n of C; arrow from last circle to C.n chop
circle same "NE" at $d ne of C; arrow from last circle to C.ne chop
circle same "E" at $d e of C; arrow from last circle to C.e chop
circle same "SE" at $d se of C; arrow from last circle to C.se chop
circle same "S" at $d s of C; arrow from last circle to C.s chop
circle same "SW" at $d sw of C; arrow from last circle to C.sw chop
circle same "W" at $d w of C; arrow from last circle to C.w chop
circle same "NW" at $d nw of C; arrow from last circle to C.nw chop
circle "C" at 3*$d east of last ellipse
circle rad 50% "N" at $d n of C; arrow from last circle to C.n chop
circle same "NE" at $d ne of C; arrow from last circle to C.ne chop
circle same "E" at $d e of C; arrow from last circle to C.e chop
circle same "SE" at $d se of C; arrow from last circle to C.se chop
circle same "S" at $d s of C; arrow from last circle to C.s chop
circle same "SW" at $d sw of C; arrow from last circle to C.sw chop
circle same "W" at $d w of C; arrow from last circle to C.w chop
circle same "NW" at $d nw of C; arrow from last circle to C.nw chop
cylinder "C" at 2.5*$d south of last ellipse
circle rad 50% "N" at $d n of C; arrow from last circle to C.n chop
circle same "NE" at $d ne of C; arrow from last circle to C.ne chop
circle same "E" at $d e of C; arrow from last circle to C.e chop
circle same "SE" at $d se of C; arrow from last circle to C.se chop
circle same "S" at $d s of C; arrow from last circle to C.s chop
circle same "SW" at $d sw of C; arrow from last circle to C.sw chop
circle same "W" at $d w of C; arrow from last circle to C.w chop
circle same "NW" at $d nw of C; arrow from last circle to C.nw chop
oval "C" at 3*$d east of last cylinder
circle rad 50% "N" at $d n of C; arrow from last circle to C.n chop
circle same "NE" at $d ne of C; arrow from last circle to C.ne chop
circle same "E" at $d e of C; arrow from last circle to C.e chop
circle same "SE" at $d se of C; arrow from last circle to C.se chop
circle same "S" at $d s of C; arrow from last circle to C.s chop
circle same "SW" at $d sw of C; arrow from last circle to C.sw chop
circle same "W" at $d w of C; arrow from last circle to C.w chop
circle same "NW" at $d nw of C; arrow from last circle to C.nw chop
file "C" at 2.5*$d south of last cylinder
circle rad 50% "N" at $d n of C; arrow from last circle to C.n chop
circle same "NE" at $d ne of C; arrow from last circle to C.ne chop
circle same "E" at $d e of C; arrow from last circle to C.e chop
circle same "SE" at $d se of C; arrow from last circle to C.se chop
circle same "S" at $d s of C; arrow from last circle to C.s chop
circle same "SW" at $d sw of C; arrow from last circle to C.sw chop
circle same "W" at $d w of C; arrow from last circle to C.w chop
circle same "NW" at $d nw of C; arrow from last circle to C.nw chop
diamond "C" at 2.5*$d south of last oval
circle rad 50% "N" at $d n of C; arrow from last circle to C.n chop
circle same "NE" at $d ne of C; arrow from last circle to C.ne chop
circle same "E" at $d e of C; arrow from last circle to C.e chop
circle same "SE" at $d se of C; arrow from last circle to C.se chop
circle same "S" at $d s of C; arrow from last circle to C.s chop
circle same "SW" at $d sw of C; arrow from last circle to C.sw chop
circle same "W" at $d w of C; arrow from last circle to C.w chop
circle same "NW" at $d nw of C; arrow from last circle to C.nw chop
test42.pikchrMATCH
C pikchr
Rust pikchr
Source
C: ellipse "ellipse"
line from C to 2cm heading 00 from C chop;
line from C to 2cm heading 10 from C chop;
line from C to 2cm heading 20 from C chop;
line from C to 2cm heading 30 from C chop;
line from C to 2cm heading 40 from C chop;
line from C to 2cm heading 50 from C chop;
line from C to 2cm heading 60 from C chop;
line from C to 2cm heading 70 from C chop;
line from C to 2cm heading 80 from C chop;
line from C to 2cm heading 90 from C chop;
line from C to 2cm heading 100 from C chop;
line from C to 2cm heading 110 from C chop;
line from C to 2cm heading 120 from C chop;
line from C to 2cm heading 130 from C chop;
line from C to 2cm heading 140 from C chop;
line from C to 2cm heading 150 from C chop;
line from C to 2cm heading 160 from C chop;
line from C to 2cm heading 170 from C chop;
line from C to 2cm heading 180 from C chop;
line from C to 2cm heading 190 from C chop;
line from C to 2cm heading 200 from C chop;
line from C to 2cm heading 210 from C chop;
line from C to 2cm heading 220 from C chop;
line from C to 2cm heading 230 from C chop;
line from C to 2cm heading 240 from C chop;
line from C to 2cm heading 250 from C chop;
line from C to 2cm heading 260 from C chop;
line from C to 2cm heading 270 from C chop;
line from C to 2cm heading 280 from C chop;
line from C to 2cm heading 290 from C chop;
line from C to 2cm heading 300 from C chop;
line from C to 2cm heading 310 from C chop;
line from C to 2cm heading 320 from C chop;
line from C to 2cm heading 330 from C chop;
line from C to 2cm heading 340 from C chop;
line from C to 2cm heading 350 from C chop;
test43.pikchrMATCH
C pikchr
Rust pikchr
Source
scale = 0.75
box "One"
arrow right 200% "Bold" bold above "Italic" italic below
circle "Two"
circle "Bold-Italic" bold italic aligned fit \
at 4cm heading 143 from Two
arrow from Two to last circle "above" aligned above "below" aligned below chop
circle "C2" fit at 4cm heading 50 from Two
arrow from Two to last circle "above" aligned above "below "aligned below chop
circle "C3" fit at 4cm heading 200 from Two
arrow from last circle to Two <- \
"above-rjust" aligned rjust above \
"below-rjust" aligned rjust below chop
test44.pikchrMATCH
C pikchr
Rust pikchr
Source
debug=1
file "*.md" rad 20%
arrow
box rad 10px "Markdown" "Interpreter"
arrow right 120% "HTML" above
file " HTML "
test45.pikchrMATCH
C pikchr
Rust pikchr
Source
ALL: [
file "ljust" italic "*.md" ljust "*.txt" ljust "*.wiki" ljust rad 20%
arrow
box rad 10px "Markdown" mono ljust "Interpreter" monospace ljust \
"(monospace)" mono ljust italic fit
arrow right 200% "above" above "rjust " rjust below " ljust" ljust below
file "rjust" italic "*.htm" rjust "*.js" rjust
arrow down from first box.s "rjust " rjust " ljust" ljust
box "rjust" rjust above "center" center "ljust" ljust above \
"rjust" rjust below "ljust" ljust below big big
]
box invis "Text Justification Rules" big bold fit with .s at 0.2 above ALL.n
test45b.pikchrMATCH
C pikchr
Rust pikchr
Source
box "rjust" rjust above "center" center "ljust" ljust above \
"rjust" rjust below "ljust" ljust below big big
test46.pikchrMATCH
C pikchr
Rust pikchr
Source
# Test case for all production rule:
#
# position ::= object edge
#
All: [
B: box dashed
circle ".n" fit at 1.5cm heading 0 from B.n
arrow thin from previous to B.n chop
circle ".north" fit at 3cm heading 15 from B.north
arrow thin from previous to B.north chop
circle ".t" fit at 1.5cm heading 30 from B.t
arrow thin from previous to B.t chop
circle ".top" fit at 3cm heading -15 from B.top
arrow thin from previous to B.top chop
circle ".ne" fit at 1cm ne of B.ne; arrow thin from previous to B.ne chop
circle ".e" fit at 2cm heading 50 from B.e; arrow thin from previous to B.e chop
circle ".right" fit at 3cm heading 75 from B.right
arrow thin from previous to B.right chop
circle ".end¹" fit at 3cm heading 100 from B.end
arrow thin from previous to B.end chop
circle ".se" fit at 1cm heading 110 from B.se
arrow thin from previous to B.se chop
circle ".s" fit at 1.5cm heading 180 from B.s
arrow thin from previous to B.s chop
circle ".south" fit at 3cm heading 195 from B.south
arrow thin from previous to B.south chop
circle ".bot" fit at 1.8cm heading 215 from B.bot
arrow thin from previous to B.bot chop
circle ".bottom" fit at 2.7cm heading 160 from B.bottom
arrow thin from previous to B.bottom chop
circle ".sw" fit at 1cm sw of B.sw; arrow thin from previous to B.sw chop
circle ".w" fit at 2cm heading 270 from B.w
arrow thin from previous to B.w chop
circle ".left" fit at 3cm heading 180+75 from B.left
arrow thin from previous to B.left chop
circle ".start¹" fit at 2.5cm heading 295 from B.start
arrow thin from previous to B.start chop
circle ".nw" fit at 1cm nw of B.nw; arrow thin from previous to B.nw chop
circle ".c" fit at 2.5cm heading -25 from B.c
line thin from previous to 0.5<previous,B.c> chop
arrow thin from previous.end to B.c
circle ".center" fit at 3.6cm heading 180-44 from B.center
line thin from previous to 0.5<previous,B.center> chop
arrow thin from previous.end to B.center
circle "λ" fit at 2.5cm heading 250 from B
line from previous to 0.5<previous,B> chop
arrow thin from previous.end to B
]
"21 Names For 9 Boundary Points" big big with .s at .5cm above All.n
"¹ \"start\" and \"end\" assume a \"right\" layout direction" below \
with .n at 2mm below All.s
test47.pikchrMATCH
C pikchr
Rust pikchr
Source
# Test case for all production rule:
#
# position ::= object edge
#
All: [
B: line thick thick color blue go 0.8 heading 350 then go 0.4 heading 120 \
then go 0.5 heading 35 \
then go 1.2 heading 190 then go 0.4 heading 340 "+"
line thin dashed color gray from B.nw to B.ne to B.se to B.sw close
circle ".n" fit at 1.5cm heading 0 from B.n
arrow thin from previous to B.n chop
circle ".north" fit at 3cm heading 15 from B.north
arrow thin from previous to B.north chop
circle ".t" fit at 1.5cm heading 30 from B.t
arrow thin from previous to B.t chop
circle ".top" fit at 3cm heading -15 from B.top
arrow thin from previous to B.top chop
circle ".ne" fit at 1cm ne of B.ne; arrow thin from previous to B.ne chop
circle ".e" fit at 2cm heading 50 from B.e; arrow thin from previous to B.e chop
circle ".right" fit at 3cm heading 75 from B.right
arrow thin from previous to B.right chop
circle ".end" fit at 2cm heading 120 from B.end
arrow thin from previous to B.end chop
circle ".se" fit at 1cm heading 170 from B.se
arrow thin from previous to B.se chop
circle ".s" fit at 1.5cm heading 180 from B.s
arrow thin from previous to B.s chop
circle ".south" fit at 3cm heading 195 from B.south
arrow thin from previous to B.south chop
circle ".bot" fit at 1.8cm heading 215 from B.bot
arrow thin from previous to B.bot chop
circle ".bottom" fit at 2.7cm heading 160 from B.bottom
arrow thin from previous to B.bottom chop
circle ".sw" fit at 1cm sw of B.sw; arrow thin from previous to B.sw chop
circle ".w" fit at 2cm heading 300 from B.w
arrow thin from previous to B.w chop
circle ".left" fit at 3cm heading 280 from B.left
arrow thin from previous to B.left chop
circle ".start" fit at 2.5cm heading 265 from B.start
arrow thin from previous to B.start chop
circle ".nw" fit at 1cm nw of B.nw; arrow thin from previous to B.nw chop
circle ".c" fit at 2.5cm heading -15 from B.c
line thin from previous to 0.5<previous,B.c> chop
arrow thin from previous.end to B.c
circle ".center" fit at 3.3cm heading 110 from B.center
line thin from previous to 0.5<previous,B.center> chop
arrow thin from previous.end to B.center
circle "λ" fit at 1.7cm heading 250 from B
line from previous to 0.5<previous,B> chop
arrow thin from previous.end to B
]
"21 Names For 11 Boundary Points" big big with .s at .5cm above All.n
test47b.pikchrMATCH
C pikchr
Rust pikchr
Source
# Test case for all production rule:
#
# position ::= object edge
#
All: [
B: line thick thick color blue go 0.8 heading 350 then go 0.4 heading 120 \
then go 0.5 heading 35 \
then go 1.2 heading 190 then go 0.4 heading 340 close "+"
line thin dashed color gray from B.nw to B.ne to B.se to B.sw close
circle ".n" fit at 1.5cm heading 0 from B.n
arrow thin from previous to B.n chop
circle ".north" fit at 3cm heading 15 from B.north
arrow thin from previous to B.north chop
circle ".t" fit at 1.5cm heading 30 from B.t
arrow thin from previous to B.t chop
circle ".top" fit at 3cm heading -15 from B.top
arrow thin from previous to B.top chop
circle ".ne" fit at 1cm ne of B.ne; arrow thin from previous to B.ne chop
circle ".e" fit at 2cm heading 50 from B.e; arrow thin from previous to B.e chop
circle ".right" fit at 3cm heading 75 from B.right
arrow thin from previous to B.right chop
circle ".end" fit at 2cm heading 95 from B.end
arrow thin from previous to B.end chop
circle ".se" fit at 1cm heading 170 from B.se
arrow thin from previous to B.se chop
circle ".s" fit at 1.5cm heading 180 from B.s
arrow thin from previous to B.s chop
circle ".south" fit at 3cm heading 195 from B.south
arrow thin from previous to B.south chop
circle ".bot" fit at 1.8cm heading 215 from B.bot
arrow thin from previous to B.bot chop
circle ".bottom" fit at 2.7cm heading 160 from B.bottom
arrow thin from previous to B.bottom chop
circle ".sw" fit at 1cm sw of B.sw; arrow thin from previous to B.sw chop
circle ".w" fit at 2cm heading 300 from B.w
arrow thin from previous to B.w chop
circle ".left" fit at 3cm heading 280 from B.left
arrow thin from previous to B.left chop
circle ".start" fit at 2.5cm heading 265 from B.start
arrow thin from previous to B.start chop
circle ".nw" fit at 1cm nw of B.nw; arrow thin from previous to B.nw chop
circle ".c" fit at 2.5cm heading -15 from B.c
line thin from previous to 0.5<previous,B.c> chop
arrow thin from previous.end to B.c
circle ".center" fit at 3.3cm heading 130 from B.center
line thin from previous to 0.5<previous,B.center> chop
arrow thin from previous.end to B.center
circle "λ" fit at 1.7cm heading 250 from B
line from previous to 0.5<previous,B> chop
arrow thin from previous.end to B
]
"21 Names For 11 Boundary Points" big big above \
"On a closed polygon" above with .s at 0.2cm below All.n
test48.pikchrMATCH
C pikchr
Rust pikchr
Source
# Test case for all production rule:
#
# position ::= object edge
#
All: [
B: line thick color blue go 0.8 heading 350 then go 0.4 heading 120 \
then go 0.5 heading 35 \
then go 1.2 heading 190 then go 0.4 heading 340 "+"
oval "1st vertex" fit at 2cm heading 250 from 1st vertex of B
arrow thin from previous to 1st vertex of B chop
oval "2nd vertex" fit at 2cm west of 2nd vertex of B
arrow thin from previous to 2nd vertex of B chop
oval "3rd vertex" fit at 2cm north of 3rd vertex of B
arrow thin from previous to 3rd vertex of B chop
oval "4th vertex" fit at 2cm east of 4th vertex of B
arrow thin from previous to 4th vertex of B chop
oval "5th vertex" fit at 2cm east of 5th vertex of B
arrow thin from previous to 5th vertex of B chop
oval "6th vertex" fit at 2cm south of 6th vertex of B
arrow thin from previous to 6th vertex of B chop
]
"Names Of Vertexes" big big with .s at .5cm above All.n
test49.pikchrMATCH
C pikchr
Rust pikchr
Source
dot "A" above
dot "B" above at 3 heading 130 from A
dot "(A,B)" above at (A,B)
dot "(B,A)" above at (B,A)
test50.pikchrMATCH
C pikchr
Rust pikchr
Source
All: [
CW: box "cwal"
line <-
S2: box "s2"
line <-
CL: box "client"
arc -> color red cw from CL.s to CW.s
]
text "Red arc is fully visible" "Pikchr forum 2020-09-14" \
with .s at 5mm above All.n
test51.pikchrMATCH
C pikchr
Rust pikchr
Source
One: [
CW: box "cwal"
line <-
S2: box "s2"
line <-
CL: box "client"
down
line ->
line -> left until even with CW
line -> color red go up to CW.s
]
text "Red line should be an arrow" "Pikchr forum 2020-09-14" \
with .s at 2mm above One.n
Two: [
right
CW: box "cwal"
line <-
S2: box "s2"
line <-
CL: box "client"
down
line ->
line -> left until even with CW
up
line -> to CW.s color red
] with .n at 1cm below One.s
test51minimal.pikchrMATCH
C pikchr
Rust pikchr
Source
CW: box "cwal"
down
line ->
line -> color red go up to CW.s
test52.pikchrMATCH
C pikchr
Rust pikchr
Source
All: [
file "A"
cylinder "B" at 5cm heading 125 from A
X: line from A to B chop "from A to B" aligned above
dot color red at X.c
dot color red at X.start
dot color red at X.end
]
"Text Alignment" big "On A Chopped Line" big with .s at .3cm above All.n
test53.pikchrMATCH
C pikchr
Rust pikchr
Source
line color green
dot color red
line color blue
text "\"dot\" object causes no motion" with .s at 8mm above last dot
assert( 1st dot.start == 1st dot.end )
assert( 1st line.end == 2nd line.start )
test54.pikchrMATCH
C pikchr
Rust pikchr
Source
margin = 4mm
All: [
file thick thick fill lightgray \
"wide-file" "test 1" "abcde" "uvwxyz" "bottom" fit
move
cylinder thick thick fill lightgray "cylinder" "test 1" fit
move
diamond thick thick fill lightgray "wide-diamond" "test 1" "abcde" "uvwxyz" \
"bottom" fit
]
text "Fit & Background for" "File, Cylinder, and Diamond" \
with .s at .2 above All.n
test55.pikchrMATCH
C pikchr
Rust pikchr
Source
lineht *= 0.4
$margin = lineht*2.5
# scale = 0.5
# fontscale = 1.125
down
In: box "Interface" wid 150% ht 75% fill white
arrow
CP: box same "SQL Command" "Processor"
arrow
VM: box same "Virtual Machine"
arrow down 1.25*$margin
BT: box same "B-Tree"
arrow
box same "Pager"
arrow
OS: box same "OS Interface"
box same with .w at 1.25*$margin east of 1st box.e "Tokenizer"
arrow
box same "Parser"
arrow
CG: box same ht 200% "Code" "Generator"
UT: box same as 1st box at (Tokenizer,Pager) "Utilities"
move lineht
TC: box same "Test Code"
arrow from CP to 1/4<Tokenizer.sw,Tokenizer.nw> chop
arrow from 1/3<CG.nw,CG.sw> to CP chop
box ht (In.n.y-VM.s.y)+$margin wid In.wid+$margin \
at CP fill 0xd8ecd0 behind In
line invis from 0.25*$margin east of last.sw up last.ht \
"Core" italic aligned
box ht (BT.n.y-OS.s.y)+$margin wid In.wid+$margin \
at Pager fill 0xd0ece8 behind In
line invis from 0.25*$margin east of last.sw up last.ht \
"Backend" italic aligned
box ht (Tokenizer.n.y-CG.s.y)+$margin wid In.wid+$margin \
at 1/2<Tokenizer.n,CG.s> fill 0xe8d8d0 behind In
line invis from 0.25*$margin west of last.se up last.ht \
"SQL Compiler" italic aligned
box ht (UT.n.y-TC.s.y)+$margin wid In.wid+$margin \
at 1/2<UT,TC> fill 0xe0ecc8 behind In
line invis from 0.25*$margin west of last.se up last.ht \
"Accessories" italic aligned
test56.pikchrMATCH
C pikchr
Rust pikchr
Source
lineht *= 0.4
$margin = lineht*2.5
scale = 0.5
fontscale = 1.125
down
In: box "Interface" wid 150% ht 75% fill white
arrow
CP: box same "SQL Command" "Processor"
arrow
VM: box same "Virtual Machine"
arrow down 1.25*$margin
BT: box same "B-Tree"
arrow
box same "Pager"
arrow
OS: box same "OS Interface"
box same with .w at 1.25*$margin east of 1st box.e "Tokenizer"
arrow
box same "Parser"
arrow
CG: box same ht 200% "Code" "Generator"
UT: box same as 1st box at (Tokenizer,Pager) "Utilities"
move lineht
TC: box same "Test Code"
arrow from CP to 1/4<Tokenizer.sw,Tokenizer.nw> chop
arrow from 1/3<CG.nw,CG.sw> to CP chop
box ht (In.n.y-VM.s.y)+$margin wid In.wid+$margin \
at CP fill 0xd8ecd0 behind In
line invis from 0.25*$margin east of last.sw up last.ht \
"Core" italic aligned
box ht (BT.n.y-OS.s.y)+$margin wid In.wid+$margin \
at Pager fill 0xd0ece8 behind In
line invis from 0.25*$margin east of last.sw up last.ht \
"Backend" italic aligned
box ht (Tokenizer.n.y-CG.s.y)+$margin wid In.wid+$margin \
at 1/2<Tokenizer.n,CG.s> fill 0xe8d8d0 behind In
line invis from 0.25*$margin west of last.se up last.ht \
"SQL Compiler" italic aligned
box ht (UT.n.y-TC.s.y)+$margin wid In.wid+$margin \
at 1/2<UT,TC> fill 0xe0ecc8 behind In
line invis from 0.25*$margin west of last.se up last.ht \
"Accessories" italic aligned
test57a.pikchrMATCH
C pikchr
Rust pikchr
Source
line up 25% "aligned centered above" above aligned
test57b.pikchrMATCH
C pikchr
Rust pikchr
Source
line up 25% "aligned ljust above" above aligned ljust
test57c.pikchrMATCH
C pikchr
Rust pikchr
Source
line up 25% "aligned rjust below" aligned rjust below
test58.pikchrMATCH
C pikchr
Rust pikchr
Source
scale = 0.8
All: [
circle "C0" fit fill white
arrow right 50%
$arrowlen = previous.wid
circle same "C1"
A1: arrow same thickness 0.5*(thickness)
# ^^^^^^^^^^^^^^^
# demonstrate access to the "thickness" variable by
# enclosing it in parentheses
circle same "C2"
arrow same as 1st arrow
circle same "C4"
arrow same
circle same "C6"
circle same "C3" at dist(C2,C4) heading 30 from C2
arrow right 50%
circle same "C5"
arrow from C2 to C3 chop
C3P: circle same "C3'" at dist(C4,C6) heading 30 from C6
arrow right 50% from C3P.e
C5P: circle same "C5'"
arrow from C6 to C3P chop
box height C3.y-C2.y \
width dist(C5P.e,C0.w)+1.5*C1.rad \
with .w at 0.5*$arrowlen west of C0.w \
behind C0 \
fill 0xc6e2ff color 0xaac5df
box same width previous.e.x - C2.w.x \
with .se at previous.ne \
fill 0x9accfc
spline <- thin from 1mm south of A1.center down .8cm then right .5cm color gray
" 0.5*(thickness)" ljust small at previous.end
dot at previous.c
assert( A1.thickness == 1st arrow.thickness/2 )
right
circle "C0" fit fill white at 3.5cm south of C0
arrow right 50%
circle same "C1"
arrow same
circle same "C2"
arrow same
circle same "C4"
arrow same
circle same "C6"
circle same "C3" at dist(C2,C4) heading 30 from C2
arrow right 50%
circle same "C5"
arrow same
circle same "C7"
arrow from C2 to C3 chop
arrow from C6 to C7 chop
box height C3.y-C2.y \
width dist(C7.e,C0.w)+1.5*C1.radius \
with .w at 0.5*$arrowlen west of C0.w \
behind C0 \
fill 0xc6e2ff color 0xaac5df
box same width previous.e.x - C2.w.x \
with .se at previous.ne \
fill 0x9accfc
]
"Rebase vs. Merge" big big bold with .s at 3mm north of All.n
# Error messages in a macro
#
define abc {box "should not see this" fit}
define abc {box "don't see this either" fit}
define xyz {box "should show #1" fit;}
define abc {ellipse "should show #2" fit;}
xyz abc
/* 231 */ then down 0.8*$h then right even with arrowht east of ISN.e \
/* 232 */ then up even with ISN then right linerad
/* 233 */
/* 234 */ # Error message deep inside a long script.
/* 235 */ # This error is on line 236
/* 236 */ error "hello"
^^^^^^^
ERROR: syntax error
Rust pikchr
Error: error: hello
Source
linerad = 10px
linewid *= 0.5
$h = 0.21
margin = 1cm
debug_label_color = Red
color = lightgray
circle radius 10%
OUT: 6.3in right of previous.e # FIX ME
IN_X: linerad east of first circle.e
# The literal-value line
arrow
LTV: box "literal-value" fit
arrow right even with linerad+2*arrowht east of OUT
circle same
# The bind-parameter line
right
BNDP: oval "bind-parameter" fit with .w at 1.25*$h below LTV.w
arrow right even with OUT; line right linerad then up linerad
arrow from first circle.e right linerad then down even with BNDP \
then to BNDP.w
# The table column reference line
right
SN: oval "schema-name" fit with .w at 2.0*$h below BNDP.w
arrow 2*arrowht
oval "." bold fit
arrow
TN: oval "table-name" fit
arrow right 2*arrowht
oval "." bold fit
arrow
CN: oval "column-name" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,SN.n) down even with SN then to SN.w
TN_Y: 0.375*$h above TN.n
arrow from (IN_X,linerad above TN_Y) down linerad \
then right even with SN
arrow right right even with TN
line right even with linerad+arrowht west of CN.w \
then down even with CN then right linerad
line from (linerad+2*arrowht left of TN.w,TN_Y) right linerad \
then down even with TN then right linerad
# Unary operators
right
UOP: oval "unary-operator" fit with .w at 1.25*$h below SN.w
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,UOP.n) down even with UOP then to UOP.w
# Binary operators
right
BINY: box "expr" fit with .w at 1.25*$h below UOP.w
arrow 2*arrowht
oval "binary-operator" fit
arrow 2*arrowht
box "expr" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,BINY.n) down even with BINY then to BINY.w
# Function calls
right
FUNC: oval "function-name" fit with .w at 2.0*$h below BINY.w
arrow 1.5*arrowht
FLP: oval "(" bold fit
arrow
FDCT: oval "DISTINCT" fit
arrow
FEXP: box "expr" fit
arrow 150%
FRP: oval ")" bold fit
arrow right linerad then down $h then right 2*arrowht
FFC: box "filter-clause" fit
FA1: arrow right linerad then up even with FUNC then right 2*arrowht
arrow right linerad then down $h then right 2*arrowht
FOC: box "over-clause" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,FUNC.n) down even with FUNC then to FUNC.w
# filter clause bypass
arrow from FRP.e right even with FFC
line to arrowht left of FA1.end
# over clause bypass
arrow from FA1.end right even with OUT
line right linerad then up linerad
# expr loop
FCMA: oval "," bold fit at 1.25*$h above FEXP
arrow from FEXP.e right linerad then up even with FCMA \
then to FCMA.e
line from FCMA.w left even with 2*arrowht west of FEXP.w \
then down even with FEXP then right linerad
# "*" argument list
FSTR: oval "*" bold fit with .w at 1.25*$h below FDCT.w
arrow from FLP.e right linerad then down even with FSTR \
then to FSTR.w
FA2: arrow from FSTR.e right even with linerad+2*arrowht west of FRP.w
line right linerad then up even with FRP then right linerad
# empty argument list
arrow from (linerad east of FLP.e,FSTR.n) \
down even with $h below FSTR then right even with FDCT.w
arrow right even with FA2.end
line right linerad then up even with FSTR.n
# parenthesized and vector expressions
right
PRN: oval "(" bold fit with .w at 3.0*$h below FUNC.w
arrow
PEXP: box "expr" fit
arrow
oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,PRN.n) down even with PRN then to PRN.w
# expr loop
PCMA: oval "," bold fit at 1.25*$h above PEXP
arrow from PEXP.e right linerad then up even with PCMA \
then to PCMA.e
line from PCMA.w left even with 2*arrowht left of PEXP.w \
then down even with PEXP then right linerad
# CAST expression
right
CAST: oval "CAST" fit with .w at 1.25*$h below PRN.w
arrow 2*arrowht
oval "(" bold fit
arrow 2*arrowht
box "expr" fit
arrow 2*arrowht
oval "AS" fit
arrow 2*arrowht
box "type-name" fit
arrow 2*arrowht
oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,CAST.n) down even with CAST then to CAST.w
# COLLATE expression
right
COLL: box "expr" fit with .w at 1.25*$h below CAST.w
arrow 2*arrowht
oval "COLLATE" fit
arrow 2*arrowht
oval "collation-name" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,COLL.n) down even with COLL then to COLL.w
# LIKE expressions
right
LIKE: box "expr" fit with .w at 1.25*$h below COLL.w
arrow
LNOT: oval "NOT" fit
arrow 150%
LOP1: oval "LIKE" fit
LOP2: oval "GLOB" fit with .w at 1.25*$h below LOP1.w
LOP3: oval "REGEXP" fit with .w at 1.25*$h below LOP2.w
LOP4: oval "MATCH" fit with .w at 1.25*$h below LOP3.w
LE2: box "expr" fit with .w at (4*arrowht+linerad east of LOP3.e,LIKE)
arrow from LE2.e right linerad then down $h then right 2*arrowht
LESC: oval "ESCAPE" fit
arrow 2*arrowht
box "expr" fit
LA1: arrow right linerad then up even with LIKE then right
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,LIKE.n) down even with LIKE then to LIKE.w
# NOT bypass
line from linerad*2 west of LNOT.w \
right linerad then down $h \
then right even with arrowht east of LNOT.e \
then up even with LNOT then right linerad
# Inputs to the operators
LX1: 2*arrowht west of LOP1.w
arrow from linerad west of LX1 right linerad \
then down even with LOP4 then to LOP4.w
arrow from (LX1,LOP2.n) down even with LOP2 then to LOP2.w
arrow from (LX1,LOP3.n) down even with LOP3 then to LOP3.w
# Outputs from the operators
LX2: 2*arrowht east of LOP3.e
arrow from LOP4.e right even with LX2
arrow right linerad then up even with LE2 then to LE2.w
arrow from LOP3.e right even with LX2
line right linerad then up linerad
arrow from LOP2.e right even with LX2
line right linerad then up linerad
line from LOP1.e to arrowht west of LE2.w
# ESCAPE bypass
arrow from LE2.e right even with LESC
line to arrowht left of LA1.end
# ISNULL and NOTNULL operators
right
NNUL: box "expr" fit with .w at 5.0*$h below LIKE.w
arrow
NN1: oval "ISNULL" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,NNUL.n) down even with NNUL then to NNUL.w
NN2: oval "NOTNULL" fit with .w at 1.25*$h below NN1.w
right
NN3: oval "NOT" fit with .w at 1.25*$h below NN2.w
arrow 2*arrowht
NN3B: oval "NULL" fit
NNA1: arrow 2*arrowht
arrow right linerad then up even with NN1 then right
arrow from NN2.e right even with NNA1.end
line right linerad then up linerad
arrow from NNUL.e right linerad then down even with NN3 then to NN3.w
arrow from NNUL.e right linerad then down even with NN2 then to NN2.w
# The IS operator
right
IS: box "expr" fit with .w at 3.75*$h below NNUL.w
arrow 2*arrowht
oval "IS" fit
arrow
ISN: oval "NOT" fit
arrow
box "expr" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,IS.n) down even with IS then to IS.w
# NOT bypass
line from 3*arrowht west of ISN.w right linerad \
then down 0.8*$h then right even with arrowht east of ISN.e \
then up even with ISN then right linerad
# Error message deep inside a long script.
# This error is on line 236
error "hello"
# The BETWEEN operator
right
BTW: box "expr" fit with .w at 1.5*$h below IS.w
arrow
BTWN: oval "NOT" fit
arrow
oval "BETWEEN" fit
arrow 2*arrowht
box "expr" fit
arrow 2*arrowht
oval "AND" fit
arrow 2*arrowht
box "expr" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,BTW.n) down even with BTW then to BTW.w
# NOT bypass
line from 3*arrowht west of BTWN.w right linerad \
then down 0.8*$h then right even with arrowht east of BTWN.e \
then up even with BTWN then right linerad
# The IN operator
right
IN: box "expr" fit with .w at 1.75*$h below BTW.w
arrow
INNT: oval "NOT" fit
arrow
ININ: oval "IN" fit
arrow
INLP: oval "(" bold fit
arrow
INSS: box "select-stmt" fit
arrow
oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,IN.n) down even with IN then to IN.w
# NOT bypass
line from 3*arrowht west of INNT.w right linerad \
then down 0.8*$h then right even with arrowht east of INNT.e \
then up even with INNT then right linerad
# select-stmt bypass
line from 3*arrowht west of INSS.w right linerad \
then up 0.8*$h then right even with arrowht east of INSS.e \
then up even with INSS then right linerad
# expr list instead of select-stmt
INE1: box "expr" fit at 1.25*$h below INSS
arrow from 3*arrowht west of INSS.w right linerad \
then down even with INE1 then to INE1.w
line from INE1.e right even with arrowht east of INSS.e \
then up even with INSS then right linerad
# expr loop
INC1: oval "," bold fit at 1.25*$h below INE1
arrow from INE1.e right linerad then down even with INC1 \
then to INC1.e
line from INC1.w left even with 2*arrowht west of INE1.w \
then up even with INE1 then right linerad
# reference-to-table choice as RHS
INSN: oval "schema-name" fit with .w at 4.25*$h below INLP.w
arrow from INSN.e right 1.5*arrowht
INDT: oval "." bold fit
arrow 150%
INTF: oval "table-function" fit
arrow 1.5*arrowht
INL2: oval "(" bold fit
arrow 125%
INE2: box "expr" fit
arrow 125%
INR2: oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
# table reference branch
right
INTB: oval "table-name" fit with .w at 2*$h above INTF.w
arrow right even with OUT; line right linerad then up linerad
arrow from linerad+2*arrowht west of INTF.w right linerad \
then up even with INTB then to INTB.w
# expr-list no table-valued-functions
INC2: oval "," bold fit at 1.1*$h above INE2
arrow from INE2.e right linerad then up even with INC2 \
then to INC2.e
line from INC2.w right even with 2*arrowht west of INE2.w \
then down even with INE2 then right linerad
# expr-list bypass for table-valued functions
line from INL2.e right linerad then down .7*$h \
then right even with 2*arrowht left of INR2.w \
then up even with INR2 then right linerad
# links from IN operator to table references
arrow from ININ.e right linerad then down even with INSN \
then to INSN.w
# schema-name bypass
INY3: 0.45*$h above INSN.n
arrow from (linerad east of ININ.e,linerad above INY3) \
down linerad then right even with arrowht right of INSN.e
line right even with arrowht east of INDT.e \
then down even with INDT then right linerad
# NOT? EXISTS? (SELECT) clause
right
NE: oval "NOT" fit with .w at (IN.w,1.5*$h below INSN)
arrow
NEE: oval "EXISTS" fit
arrow
NELP: oval "(" bold fit
arrow 2*arrowht
box "select-stmt" fit
arrow 2*arrowht
oval ")" bold fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,NE.n) down even with NE then to NE.w
NE_Y: 0.375*$h above NE.n
arrow from (IN_X,linerad above NE_Y) down linerad \
then right even with NE
line right even with linerad+arrowht west of NELP.w \
then down even with NELP then right linerad
line from (linerad+2*arrowht left of NEE.w,NE_Y) right linerad \
then down even with NEE then right linerad
# CASE expressions
right
CS: oval "CASE" fit with .w at 1.25*$h below NE.w
arrow
CSE1: box "expr" fit
arrow 150%
CSW: oval "WHEN" fit
arrow 2*arrowht
CSE2: box "expr" fit
arrow 2*arrowht
oval "THEN" fit
arrow 2*arrowht
CSE3: box "expr" fit
arrow 200%
CSEL: oval "ELSE" fit
arrow 2*arrowht
CSE4: box "expr" fit
arrow
oval "END" fit
arrow right even with OUT; line right linerad then up linerad
arrow from (IN_X,CS.n) down even with CS then to CS.w
# first expr bypass
CSY: 0.9*$h below CS
line from CS.e right linerad then down even with CSY \
then right even with arrowht east of CSE1.e then up even with CSE1 \
then right linerad
# when clause loop
arrow from CSE3.e right linerad then down even with CSY \
then left even with CSE2
line left even with 2*arrowht west of CSW.w \
then up even with CSW then right linerad
# ELSE clause bypass
line from linerad+2*arrowht west of CSEL.w right linerad \
then down even with CSY then right even with arrowht east of CSE4.e \
then up even with CSE4 then right linerad
# The RAISE function
right
RSE: box "raise-function" fit with .w at 1.9*$h below CS.w
arrow right even with OUT;
line right linerad then up even with first circle then right linerad
arrow from (IN_X,BNDP.n) down even with RSE then to RSE.w
test63.pikchrMATCH
C pikchr
/* 1 */ # Nesting macros too deep
/* 2 */ define m00 {box "Hello, world!" fit}
/* 3 */ define m01 {m00}
^^^
ERROR: macros nested too deep
Called from:
/* 4 */ define m02 {m01}
^^^
Called from:
/* 5 */ define m03 {m02}
^^^
Called from:
/* 6 */ define m04 {m03}
^^^
Called from:
/* 7 */ define m05 {m04}
^^^
Called from:
/* 8 */ define m06 {m05}
^^^
Called from:
/* 9 */ define m07 {m06}
^^^
Called from:
/* 10 */ define m08 {m07}
^^^
Called from:
/* 11 */ define m09 {m08}
^^^
Called from:
/* 12 */ define m10 {m09}
^^^
Called from:
/* 15 */ m10
^^^
Rust pikchr
Error: Macro expansion depth exceeded (max 10). Possible infinite recursion in macro 'm00'
# Font size layout tests
#
box "small*2" small small fit
move 10%
box "small" small fit
move same
box "normal" fit
move same
box "big" big fit
move same
box "big*2" big big fit
move to 2cm below 1st box.w
box "very small" small small "small" small "normal" \
"big" big "very big" big big fit
move
box "Very big" big big "big" big "normal" \
"small" small "very small" small small fit
test70.pikchrMATCH
C pikchr
Rust pikchr
Source
fill = bisque
B1: box "Pointy" "Diamond" width 150% invis
line from B1.w to B1.n to B1.e to B1.s close behind B1 rad 0px
move
B2: box "Rounded" "Diamond" width 150% invis with .w at 1cm right of B1.e
line from B2.w to B2.n to B2.e to B2.s close behind B2 rad 20px
dot fill red at 1st line.start
dot fill red at last line.start
test71.pikchrMATCH
C pikchr
Rust pikchr
Source
fill = bisque
linerad = 15px
leftmargin = 2cm
oval "SUBMIT TICKET" width 150%
down
arrow 50%
NEW: file "New bug ticket" "marked \"Open\"" fit
arrow same
box "Triage," "augment &" "correct" fit
arrow same
DC: box "Developer comments" fit
arrow same
FR: box "Filer responds" fit
arrow 100%
REJ: diamond "Reject?"
right
arrow 100% "Yes" above
box "Mark ticket" "\"Rejected\" &" "\"Resolved\"" fit with .w at previous.e
arrow right 50%
REJF: file "Rejected" "ticket" fit
arrow right 50%
REOP: diamond "Reopen?"
down
REJA: arrow 75% from REJ.s " No; fix it" ljust
CHNG: box "Developer changes code" with .n at last arrow.s fit
arrow 50%
FIXD: diamond "Fixed?"
right
FNO: arrow "No" above
RES: box "Optional:" "Update ticket resolution:" "\"Partial Fix\", etc." fit
down
arrow 75% " Yes" ljust from FIXD.s
box "Mark ticket" "\"Fixed\" & \"Closed\"" fit
arrow 50%
RESF: file "Resolved ticket" fit
arrow same
oval "END"
line from 0.3<FR.ne,FR.se> right even with 0.25 right of DC.e then \
up even with DC.e then to DC.e ->
line from NEW.w left 0.5 then down even with REJ.w then to REJ.w ->
line invis from 2nd vertex of last line to 3rd vertex of last line \
"fast reject path" above aligned
line from RES.e right 0.3 then up even with CHNG.e then to CHNG.e ->
line from REOP.s "No" aligned above down 0.4
line from previous.s down to (previous.s, RESF.e) then to RESF.e ->
line from REOP.n "Yes" aligned below up 0.3
line from previous.n up even with 0.6<FR.ne,FR.se> then to 0.6<FR.ne,FR.se> ->
test72.pikchrMATCH
C pikchr
Rust pikchr
Source
C1: cylinder "radius 0%" rad 0
move
cylinder "radius 50%" rad 50%
move
cylinder "radius 100%"
C1B: cylinder "fit 0%" rad 0 fit with .n at 0.5cm below C1.s
move
cylinder "fit 50%" rad 50% fit
move
cylinder "fit 100%" fit
C2: cylinder "radius 125%" rad 125% with .n at 0.5cm below C1B.s
move
cylinder "radius 150%" rad 150%
move
cylinder "radius 200%" rad 200%
C3: cylinder "fit 125%" rad 125% with .n at 0.5cm below C2.s fit
move
cylinder "fit 150%" rad 150% fit
move
cylinder "fit 200%" rad 200% fit
C4: cylinder "fit" "80%" rad 80% with .n at 0.5cm below C3.s fit
move
cylinder "fit" "120%" rad 120% fit
move
cylinder "fit" "150%" rad 150% fit
test73.pikchrMATCH
C pikchr
Rust pikchr
Source
/* Large radius on cylinders
** Forum post 983b36dbcf 2021-01-31
*/
C1: cylinder "rad 0%" rad 0
move
cylinder "rad 50%" rad 50%
move
cylinder "rad 100%"
C1b: cylinder "rad +1cm" rad +1cm with .n at 0.5cm below C1.s
move
cylinder "rad -1cm" rad -1cm
move
cylinder "rad -10px" rad -10px
C2: cylinder "fit 0%" rad 0 fit with .n at 1cm below C1b.s
move
cylinder "fit 200%" rad 200% fit
move
cylinder "fit 300%" rad 300% fit
C3: cylinder "fit 400%" rad 400% fit with .n at 0.5cm below C2.s
move
cylinder "fit +10px" rad +10px fit
move
cylinder "fit -10px" rad -10px fit
C4: cylinder "fit 1000%" rad 1000% fit with .n at 0.5cm below C3.s
move
cylinder "fit +1cm" rad +1cm fit
move
cylinder "fit -1cm" rad -1cm fit
test74.pikchrMATCH
C pikchr
Rust pikchr
Source
/* Use of the "this" objectname
*/
A: box "a" fit ht this.wid
B: box "bbbb" fit ht this.wid with .sw at previous.se
C: box "ccccccccc" fit ht this.wid with .sw at previous.se
D: box "a" fit ht this.wid rad 0.25*this.wid \
with .n at 1cm below A.s
E: box "bbbb" fit ht this.wid rad 0.25*this.wid \
with .n at (previous.e.x+0.5*this.width, previous.n.y)
F: box "ccccccccc" fit ht this.wid rad 0.25*this.wid \
with .n at (previous.e.x+0.5*this.wid, previous.n.y)
test75.pikchrMATCH
C pikchr
Rust pikchr
Source
box "Alternative spellings for arrow tokens <-, ->, and <->" invis fit
line → "&rarr;" above from (previous.s.x-1.5cm,previous.s.y-0.75cm) right 3cm;
line → "&rightarrow;" above from 0.75cm below previous.start right 3cm;
line → "→" above from 0.75cm below previous.start right 3cm;
line ← "&larr;" above from 0.75cm below previous.start right 3cm;
line ← "&leftarrow;" above from 0.75cm below previous.start right 3cm;
line ← "←" above from 0.75cm below previous.start right 3cm;
line ↔ "&leftrightarrow;" above from 0.75cm below previous.start right 3cm;
line ↔ "↔" above from 0.75cm below previous.start right 3cm;
arrow right
box width 2*boxht "Start"
arrow
box same "Right"
move to 1st box.s
down
arrow
box same "Down"
arrow
box same "Should continue down" "from \"Down\"" "not to the right!" \
"See forum post 75a2220c44" "on 2023-08-12" fit
test78.pikchrMATCH
C pikchr
Rust pikchr
Source
down
text "Zero Thickness Objects"
box "Box" fill lightblue thickness 0 fit
circle "Circle" fill yellow thickness 0 fit
file "File" fill lightgreen thickness 0 fit
oval "Oval 1" fill pink thickness 0 fit
oval "Oval 2" fill lightgrey width 1.1cm height 2cm thickness 0
cylinder "Cylinder" fill orange fit thickness 0
diamond "Diamond" fill lightblue fit thickness 0
TITLE: text "'with .start at' tests..." \
"Top row should match bottom row" \
"Forum post a48fbe155b on 2024-06-25" fit
B1: box with .nw at 1cm below TITLE.sw
C1: circle with .start at B1.end
B2: box with .n at 3cm below B1.n
C2: circle
down
B3: box with .w at 1cm right of C1.e
C3: circle with .start at B3.end
B4: box with .n at 3cm below B3.n
C4: circle
left
B5: box with .n at 4cm right of B3.n
C5: circle with .start at B5.end
B6: box with .n at 3cm below B5.n
C6: circle
up
B7: box with .n at 2.5cm right of B5.s
C7: circle with .start at B7.end
B8: box with .n at 3cm below B7.n
C7: circle
test81.pikchrMATCH
C pikchr
Rust pikchr
Source
text "Box B should full sized - not fit-to-text." \
"See forum post f9f5d90f33 on 2025-03-03."
down
text "A"
box "B" with nw at A.e