ruby-zint 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zint/barcode.rb +1 -1
- data/lib/zint/native.rb +17 -17
- data/lib/zint/version.rb +1 -1
- metadata +3 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64af83d59b1d29bdae5808430c36817e3517bee6cd7bbd34147cb377cccc02b2
|
4
|
+
data.tar.gz: 17a44a73c35894b6b7f7f8b884e18fa622400746cf9331c19e68b43994a2f958
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 580e3329db01adf7bae175780221cc3dbdbb45f4578e439e6c1cb6425e28ca7b0118f11576cb463d8588da6298ccf963f7edf481cba15b6b37d2d902bb1280b7
|
7
|
+
data.tar.gz: ce7b11a96fd7ce11a16ecd97b4b479beb2a2ca09eb67da67409096b0b0a6b1eedd77eb1059b3cd9894ec426b36df9f6ef5bd52720eb39b75b2db7e47276eaa33
|
data/lib/zint/barcode.rb
CHANGED
@@ -86,7 +86,7 @@ module Zint
|
|
86
86
|
call_function(:ZBarcode_Encode_and_Buffer, @zint_symbol, value, value.bytesize, rotate_angle)
|
87
87
|
end
|
88
88
|
|
89
|
-
@zint_symbol[:bitmap].read_bytes(
|
89
|
+
@zint_symbol[:bitmap].read_bytes(@zint_symbol[:bitmap_width] * @zint_symbol[:bitmap_height])
|
90
90
|
end
|
91
91
|
|
92
92
|
# Exports barcode to buffer
|
data/lib/zint/native.rb
CHANGED
@@ -20,57 +20,57 @@ module Zint
|
|
20
20
|
typedef :pointer, :source
|
21
21
|
|
22
22
|
# Create and initialize a symbol structure
|
23
|
-
attach_function(:ZBarcode_Create, [], :zint_symbol)
|
23
|
+
attach_function(:ZBarcode_Create, [], :zint_symbol, blocking: true)
|
24
24
|
|
25
25
|
# Free any output buffers that may have been created and initialize output fields
|
26
|
-
attach_function(:ZBarcode_Clear, [:zint_symbol], :void)
|
26
|
+
attach_function(:ZBarcode_Clear, [:zint_symbol], :void, blocking: true)
|
27
27
|
|
28
28
|
# Free a symbol structure, including any output buffers
|
29
29
|
#
|
30
30
|
# For use with ruby's garbage collector ZBarcode_Delete must be called with a plain :pointer and not an :zint_symbol.
|
31
|
-
attach_function(:ZBarcode_Delete, [:pointer], :void)
|
31
|
+
attach_function(:ZBarcode_Delete, [:pointer], :void, blocking: true)
|
32
32
|
|
33
33
|
# Encode a barcode. If `length` is 0, `source` must be NUL-terminated.
|
34
|
-
attach_function(:ZBarcode_Encode, [:zint_symbol, :source, :length], :error_code)
|
34
|
+
attach_function(:ZBarcode_Encode, [:zint_symbol, :source, :length], :error_code, blocking: true)
|
35
35
|
|
36
36
|
# Encode a barcode using input data from file `filename`
|
37
|
-
attach_function(:ZBarcode_Encode_File, [:zint_symbol, :filename], :error_code)
|
37
|
+
attach_function(:ZBarcode_Encode_File, [:zint_symbol, :filename], :error_code, blocking: true)
|
38
38
|
|
39
39
|
# Output a previously encoded symbol to file `symbol->outfile`
|
40
|
-
attach_function(:ZBarcode_Print, [:zint_symbol, :rotate_angle], :error_code)
|
40
|
+
attach_function(:ZBarcode_Print, [:zint_symbol, :rotate_angle], :error_code, blocking: true)
|
41
41
|
|
42
42
|
# Encode and output a symbol to file `symbol->outfile`
|
43
|
-
attach_function(:ZBarcode_Encode_and_Print, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
|
43
|
+
attach_function(:ZBarcode_Encode_and_Print, [:zint_symbol, :source, :length, :rotate_angle], :error_code, blocking: true)
|
44
44
|
|
45
45
|
# Encode a symbol using input data from file `filename` and output to file `symbol->outfile`
|
46
|
-
attach_function(:ZBarcode_Encode_File_and_Print, [:zint_symbol, :filename, :rotate_angle], :error_code)
|
46
|
+
attach_function(:ZBarcode_Encode_File_and_Print, [:zint_symbol, :filename, :rotate_angle], :error_code, blocking: true)
|
47
47
|
|
48
48
|
# Output a previously encoded symbol to memory as raster (`symbol->bitmap`)
|
49
|
-
attach_function(:ZBarcode_Buffer, [:zint_symbol, :rotate_angle], :error_code)
|
49
|
+
attach_function(:ZBarcode_Buffer, [:zint_symbol, :rotate_angle], :error_code, blocking: true)
|
50
50
|
|
51
51
|
# Encode and output a symbol to memory as raster (`symbol->bitmap`)
|
52
|
-
attach_function(:ZBarcode_Encode_and_Buffer, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
|
52
|
+
attach_function(:ZBarcode_Encode_and_Buffer, [:zint_symbol, :source, :length, :rotate_angle], :error_code, blocking: true)
|
53
53
|
|
54
54
|
# Encode a symbol using input data from file `filename` and output to memory as raster (`symbol->bitmap`)
|
55
|
-
attach_function(:ZBarcode_Encode_File_and_Buffer, [:zint_symbol, :filename, :rotate_angle], :error_code)
|
55
|
+
attach_function(:ZBarcode_Encode_File_and_Buffer, [:zint_symbol, :filename, :rotate_angle], :error_code, blocking: true)
|
56
56
|
|
57
57
|
# Output a previously encoded symbol to memory as vector (`symbol->vector`)
|
58
|
-
attach_function(:ZBarcode_Buffer_Vector, [:zint_symbol, :rotate_angle], :error_code)
|
58
|
+
attach_function(:ZBarcode_Buffer_Vector, [:zint_symbol, :rotate_angle], :error_code, blocking: true)
|
59
59
|
|
60
60
|
# Encode and output a symbol to memory as vector (`symbol->vector`)
|
61
|
-
attach_function(:ZBarcode_Encode_and_Buffer_Vector, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
|
61
|
+
attach_function(:ZBarcode_Encode_and_Buffer_Vector, [:zint_symbol, :source, :length, :rotate_angle], :error_code, blocking: true)
|
62
62
|
|
63
63
|
# Encode a symbol using input data from file `filename` and output to memory as vector (`symbol->vector`)
|
64
|
-
attach_function(:ZBarcode_Encode_File_and_Buffer_Vector, [:zint_symbol, :filename, :rotate_angle], :error_code)
|
64
|
+
attach_function(:ZBarcode_Encode_File_and_Buffer_Vector, [:zint_symbol, :filename, :rotate_angle], :error_code, blocking: true)
|
65
65
|
|
66
66
|
# Is `symbol_id` a recognized symbology?
|
67
|
-
attach_function(:ZBarcode_ValidID, [:symbol_id], :bool)
|
67
|
+
attach_function(:ZBarcode_ValidID, [:symbol_id], :bool, blocking: true)
|
68
68
|
|
69
69
|
# Return the capability flags for symbology `symbol_id` that match `cap_flag`
|
70
|
-
attach_function(:ZBarcode_Cap, [:symbol_id, :cap_flag], :uint32)
|
70
|
+
attach_function(:ZBarcode_Cap, [:symbol_id, :cap_flag], :uint32, blocking: true)
|
71
71
|
|
72
72
|
# Return the version of Zint linked to
|
73
|
-
attach_function(:ZBarcode_Version, [], :int32)
|
73
|
+
attach_function(:ZBarcode_Version, [], :int32, blocking: true)
|
74
74
|
|
75
75
|
# Raises specific error for API return code
|
76
76
|
#
|
data/lib/zint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-zint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elias Fröhner
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: ffi
|
@@ -38,7 +37,6 @@ dependencies:
|
|
38
37
|
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
39
|
version: '2.1'
|
41
|
-
description:
|
42
40
|
email:
|
43
41
|
- apiwalker96@gmail.com
|
44
42
|
executables: []
|
@@ -297,7 +295,6 @@ metadata:
|
|
297
295
|
source_code_uri: https://github.com/api-walker/ruby-zint
|
298
296
|
msys2_mingw_dependencies: cmake libpng
|
299
297
|
documentation_uri: https://rubydoc.info/gems/ruby-zint
|
300
|
-
post_install_message:
|
301
298
|
rdoc_options:
|
302
299
|
- "--main"
|
303
300
|
- README.md
|
@@ -318,8 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
318
315
|
- !ruby/object:Gem::Version
|
319
316
|
version: '0'
|
320
317
|
requirements: []
|
321
|
-
rubygems_version: 3.
|
322
|
-
signing_key:
|
318
|
+
rubygems_version: 3.7.0
|
323
319
|
specification_version: 4
|
324
320
|
summary: Ruby FFI binding for libzint
|
325
321
|
test_files: []
|