Lines Matching refs:qr
53 let qr: QrCode = QrCode::encode_text(text, errcorlvl).unwrap(); in do_basic_demo() localVariable
54 print_qr(&qr); in do_basic_demo()
55 println!("{}", to_svg_string(&qr, 4)); in do_basic_demo()
62 …let qr = QrCode::encode_text("314159265358979323846264338327950288419716939937510", QrCodeEcc::Med… in do_variety_demo() localVariable
63 print_qr(&qr); in do_variety_demo()
66 …let qr = QrCode::encode_text("DOLLAR-AMOUNT:$39.87 PERCENTAGE:100.00% OPERATIONS:+-*/", QrCodeEcc:… in do_variety_demo() localVariable
67 print_qr(&qr); in do_variety_demo()
70 let qr = QrCode::encode_text("こんにちwa、世界! αβγδ", QrCodeEcc::Quartile).unwrap(); in do_variety_demo() localVariable
71 print_qr(&qr); in do_variety_demo()
74 let qr = QrCode::encode_text(concat!( in do_variety_demo() localVariable
82 print_qr(&qr); in do_variety_demo()
91 let qr = QrCode::encode_text(&[silver0, silver1].concat(), QrCodeEcc::Low).unwrap(); in do_segment_demo() localVariable
92 print_qr(&qr); in do_segment_demo()
98 let qr = QrCode::encode_segments(&segs, QrCodeEcc::Low).unwrap(); in do_segment_demo() localVariable
99 print_qr(&qr); in do_segment_demo()
105 let qr = QrCode::encode_text(&[golden0, golden1, golden2].concat(), QrCodeEcc::Low).unwrap(); in do_segment_demo() localVariable
106 print_qr(&qr); in do_segment_demo()
113 let qr = QrCode::encode_segments(&segs, QrCodeEcc::Low).unwrap(); in do_segment_demo() localVariable
114 print_qr(&qr); in do_segment_demo()
118 let qr = QrCode::encode_text(madoka, QrCodeEcc::Low).unwrap(); in do_segment_demo() localVariable
119 print_qr(&qr); in do_segment_demo()
136 let qr = QrCode::encode_segments(&segs, QrCodeEcc::Low).unwrap(); in do_segment_demo() localVariable
137 print_qr(&qr); in do_segment_demo()
145 …let qr = QrCode::encode_segments_advanced(&segs, QrCodeEcc::High, Version::MIN, Version::MAX, None… in do_mask_demo() localVariable
146 print_qr(&qr); in do_mask_demo()
147 …let qr = QrCode::encode_segments_advanced(&segs, QrCodeEcc::High, Version::MIN, Version::MAX, Some… in do_mask_demo() localVariable
148 print_qr(&qr); in do_mask_demo()
152 …let qr = QrCode::encode_segments_advanced(&segs, QrCodeEcc::Medium, Version::MIN, Version::MAX, So… in do_mask_demo() localVariable
153 print_qr(&qr); in do_mask_demo()
154 …let qr = QrCode::encode_segments_advanced(&segs, QrCodeEcc::Medium, Version::MIN, Version::MAX, So… in do_mask_demo() localVariable
155 print_qr(&qr); in do_mask_demo()
156 …let qr = QrCode::encode_segments_advanced(&segs, QrCodeEcc::Medium, Version::MIN, Version::MAX, So… in do_mask_demo() localVariable
157 print_qr(&qr); in do_mask_demo()
158 …let qr = QrCode::encode_segments_advanced(&segs, QrCodeEcc::Medium, Version::MIN, Version::MAX, So… in do_mask_demo() localVariable
159 print_qr(&qr); in do_mask_demo()
169 fn to_svg_string(qr: &QrCode, border: i32) -> String { in to_svg_string()
174 let dimension = qr.size().checked_add(border.checked_mul(2).unwrap()).unwrap(); in to_svg_string()
179 for y in 0 .. qr.size() { in to_svg_string()
180 for x in 0 .. qr.size() { in to_svg_string()
181 if qr.get_module(x, y) { in to_svg_string()
196 fn print_qr(qr: &QrCode) { in print_qr()
198 for y in -border .. qr.size() + border { in print_qr()
199 for x in -border .. qr.size() + border { in print_qr()
200 let c: char = if qr.get_module(x, y) { '█' } else { ' ' }; in print_qr()