diff options
author | Norbert Preining <norbert@preining.info> | 2020-02-05 03:03:08 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-02-05 03:03:08 +0000 |
commit | 4b795f65d52cde0d136c0175ce20101946378b54 (patch) | |
tree | 07b9b0c89193d379ff6971be01a8ca1e3e6931ca /macros/luatex/generic/barracuda/test/test-code128 | |
parent | fc358ce7332053945afe16ced2a271556cdccfb7 (diff) |
CTAN sync 202002050303
Diffstat (limited to 'macros/luatex/generic/barracuda/test/test-code128')
-rw-r--r-- | macros/luatex/generic/barracuda/test/test-code128/001-code128-test.lua | 4 | ||||
-rw-r--r-- | macros/luatex/generic/barracuda/test/test-code128/002-code128-test.pdf | bin | 22044 -> 22132 bytes | |||
-rw-r--r-- | macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex | 20 |
3 files changed, 13 insertions, 11 deletions
diff --git a/macros/luatex/generic/barracuda/test/test-code128/001-code128-test.lua b/macros/luatex/generic/barracuda/test/test-code128/001-code128-test.lua index 78645612dc..33dd927dc7 100644 --- a/macros/luatex/generic/barracuda/test/test-code128/001-code128-test.lua +++ b/macros/luatex/generic/barracuda/test/test-code128/001-code128-test.lua @@ -1,7 +1,7 @@ --- Copyright (C) 2018 Roberto Giacomelli +-- Copyright (C) 2020 Roberto Giacomelli local barracuda = require "barracuda" -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local c128, err = barcode:new_encoder("code128") assert(not err, err) diff --git a/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.pdf b/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.pdf Binary files differindex c3c8460bc7..4cf993a396 100644 --- a/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.pdf +++ b/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.pdf diff --git a/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex b/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex index eeaf60e483..b5c081659e 100644 --- a/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex +++ b/macros/luatex/generic/barracuda/test/test-code128/002-code128-test.tex @@ -1,5 +1,5 @@ % !TeX program = LuaTeX -% Copyright (C) 2019 Roberto Giacomelli +% Copyright (C) 2020 Roberto Giacomelli \newbox\mybox \nopagenumbers @@ -13,7 +13,7 @@ barracuda = require "barracuda" } \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local c128, err = barcode:new_encoder("code128") assert(not err, err) @@ -34,7 +34,7 @@ second one) takes the anchor parameters from the super class Barcode, while the second one takes anchors from itself: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() local ok, err = barcode:set_param{ax = 1, ay = 1} % super class set up assert(ok, err) assert(barcode.ax == 1, "barcode ax is "..tostring(barcode.ax)) @@ -63,8 +63,9 @@ will take to super class Barcode, previously set to 1.0. So, the symbols will be aligned to the top: \directlua{ -local c128, err = barracuda:get_barcode_class() - :enc_by_name "code128"; assert(c128, err) +local c128, err = barracuda:barcode() + :enc_by_name "code128"; +assert(c128, err) local s, err = c128:from_string("123456"); assert(s, err) local canvas = barracuda:new_canvas() @@ -84,7 +85,7 @@ Test 4: set up vertical anchor globally to 0.0, locally to the encoder to 0.5 and locally to 1.0: \directlua{ -local barcode = barracuda:get_barcode_class() +local barcode = barracuda:barcode() % set ay globally to 0.0 local ok, err = barcode:set_param("ay", 0); assert(ok, err) @@ -108,8 +109,9 @@ drv:ga_to_hbox(canvas, "mybox") Test 5: uint() costructor and save a file with PDF literal code: \directlua{ -local barcode = barracuda:get_barcode_class() -local c128, err = barcode:enc_by_name("code128"); assert(c128, err) +local barcode = barracuda:barcode() +local c128, err = barcode:enc_by_name("code128"); +assert(c128, err) local s, e = c128:from_uint(1234567890); assert(s, e) local canvas = barracuda:new_canvas() local _, errc = s:append_ga(canvas); assert(not errc, errc) @@ -118,7 +120,7 @@ drv:ga_to_hbox(canvas, "mybox") drv:save("native", canvas, "02-05-pdfliteral") }\box\mybox -That's all folk! +That's all folks! \bye |