TESTER

barcode_128

barcode_128(text, [list=true], [x], [y], [width], [height], [center], [stroke], [fill], [weight]) -> NULL || List of 0,1 for each bar

Generate Barcode 128

Arguments

NameRequiredDefaultDescription
textyes-Text to use
list-trueIf true, return a list of points, and don't draw (width, height, stroke, fill & weight are ignored)
x--X top left position
y--Y top left position
width--Width of individual bar
height--Height of individual bar
center--If true, x/y are the center
stroke--Stroke color
fill--Fill color
weight--Stroke weight (thickness)

Full example

canvas(width=1000, height=450, center=true);
var texte = "1234567890";
var cb = barcode_128(texte, list=true);
console(cb);

coord_scale(3); 
barcode_128(
    texte, 
    x=0, y=0, center=true,
    width=3, height=100, fill="#000"
);
text(texte, 0, 65, ax=MIDDLE);

save("barcode_128.png");