rqr 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -1
- data/License.txt +1 -1
- data/README.txt +2 -2
- data/lib/rqr/qrcode.rb +3 -3
- data/lib/rqr/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/License.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Note: Original QR_Encode.h and QR_Encode.cpp are free license. (by Psytec Inc)
|
2
2
|
|
3
|
-
Copyright (c) 2008 Ryota Maruko, Keiko
|
3
|
+
Copyright (c) 2008 Ryota Maruko, Keiko Soezima
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
data/README.txt
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
A ruby library to create
|
7
|
+
A ruby library to create QR code image. Output: PS, JPEG, PNG, EPS, TIFF.
|
8
8
|
|
9
9
|
== SYNOPSIS:
|
10
10
|
|
@@ -55,7 +55,7 @@ If using OSX, Use Fink(http://www.finkproject.org) Universal Binary libs.
|
|
55
55
|
|
56
56
|
(The MIT License)
|
57
57
|
|
58
|
-
Copyright (c) 2008 Ryota Maruko, Keiko
|
58
|
+
Copyright (c) 2008 Ryota Maruko, Keiko Soezima
|
59
59
|
|
60
60
|
Permission is hereby granted, free of charge, to any person obtaining
|
61
61
|
a copy of this software and associated documentation files (the
|
data/lib/rqr/qrcode.rb
CHANGED
@@ -4,13 +4,13 @@ module RQR
|
|
4
4
|
# options
|
5
5
|
# :level L:0, M:1(default), Q:2, H:3
|
6
6
|
# :version S:0(default), M:1, L:2
|
7
|
-
# :
|
7
|
+
# :auto_extend true(default)|false auto extent if over version size
|
8
8
|
# :masking masking pattern 0-7, -1(default auto)
|
9
9
|
# :length data length
|
10
10
|
# :module_size module pixel size
|
11
11
|
# :eps_preview true|false(default)
|
12
12
|
def initialize(options = {})
|
13
|
-
@options = { :level => 1, :version => 0, :
|
13
|
+
@options = { :level => 1, :version => 0, :auto_extend => true,
|
14
14
|
:masking => -1, :eps_preview => false, :module_size => 4 }
|
15
15
|
@options.merge!(options)
|
16
16
|
end
|
@@ -55,7 +55,7 @@ module RQR
|
|
55
55
|
|
56
56
|
def init_encoder(data)
|
57
57
|
@encoder = QR::CQR_Encode.new
|
58
|
-
unless @encoder.EncodeData(@options[:level], @options[:version], @options[:
|
58
|
+
unless @encoder.EncodeData(@options[:level], @options[:version], @options[:auto_extend], @options[:masking], data)
|
59
59
|
close; raise EncodeException.new("qrcode encord error!")
|
60
60
|
end
|
61
61
|
end
|
data/lib/rqr/version.rb
CHANGED