arrowshapes_list
arrowshapes_list()
Return a list of all head/tail arrow
Syntaxe
var list = arrowshapes_list();
Full example
var heads = arrowshapes_list();
console(heads.length);
var axstart = 70;
var ax = axstart;
var ay = 50;
var asize = 40;
var alen = 120;
var ashaft = 15;
var astepy = 60;
var astepx = alen+20;
canvas(width=140*(heads.length), height=70*(heads.length));
load_text_default(12);
var count = 0;
for (var i = 0; i < heads.length; i++) {
for (var j = 0; j < heads.length; j++) {
if ( heads[i] == heads[j] ) {
fill("#FFC107");
} else {
fill("#90CAF9");
}
arrow(
x=ax, y=ay, rotation=0,
length=alen, shaft=ashaft,
position=false,
head=asize, head_shape=heads[i],
tail=asize, tail_shape=heads[j]
);
text(heads[j]+" - "+heads[i], ax, ay-2, ax=middle, ay=middle);
ax += astepx;
count++;
// Retour à la marge toutes les 4 valeurs (au total)
if (count % heads.length == 0) {
ay += astepy;
ax = axstart;
}
}
}
load_text_default(16);
text(
"left==tail, right==head - Some combinations are bugged - we're still looking into it...",
x=width()/2, y=height()-30, ax=middle, ay=middle
);
save("arrowshapes_list.png");
