INNER CODE UNIT · JavaScript

gfa_plot_arrow

lh3/gfatools · js/gfa-plot.js:29

function gfa_plot_arrow(ctx, x, y, len, w, rev, text, fs, color_stroke, color_fill)
{
	ctx.font = fs? fs + "px monospace" : "9px monospace";
	var reg = new Path2D();
	reg.moveTo(x, y);
	if (rev == null || !rev) {
		reg.lineTo(x - w, y - w);
		reg.lineTo(x - w + len, y - w);
		reg.lineTo(x + len, y);
		reg.lineTo(x - w + len, y + w);
		reg.lineTo(x - w, y + w);
	} else {
		reg.lineTo(x + w, y - w);
		reg.lineTo(x + w + len, y - w);
		reg.lineTo(x + len, y);
		reg.lineTo(x + w + len, y + w);
		reg.lineTo(x + w, y + w);
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…