fix styling

This commit is contained in:
wphiphi 2022-01-02 15:36:22 +01:00 committed by GitHub
parent 419f7cb342
commit 42cfcdcb49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,19 +208,15 @@ var version_information_table_bit = [
];
function add_version_info(t, version){
if (version >= 7) {
for (step=0 ; step < 3 ; step++ )
{
for (step=0 ; step < 3 ; step++ ){
x=0;
for(let i = 17 - step; i>=0 ; i -= 3){
// Bottom Left
draw_square(t, 4*version + 6 + step, x ,1, version_information_table_bit[version - 7][i]);
// Top Right
draw_square(t, x, 4*version + 6 + step ,1, version_information_table_bit[version - 7][i]);
x++;
}
}
}
@ -229,10 +225,8 @@ function add_version_info(t, version){
// https://www.thonky.com/qr-code-tutorial/format-version-information
function add_dark_module(t, version){
//dark module is always (8, 4*version + 9)
draw_square(t, 4*version + 9, 8 ,1, BLACK_COLOR);
return t;
}
@ -262,8 +256,6 @@ function generate_qr(version){
generate_timing_pattern_h(t, 8, 6, x_max-9);
add_alignment_patterns(t, version-1);
add_dark_module(t,version);
add_version_info(t,version);