gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-mdb] 71/93: see stuff


From: gnunet
Subject: [taler-taler-mdb] 71/93: see stuff
Date: Mon, 18 Nov 2019 21:13:34 +0100

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository taler-mdb.

commit 8803fd14e8f8d4bf538b8896049f570025b82197
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Nov 16 10:51:30 2019 +0100

    see stuff
---
 src/main.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/main.c b/src/main.c
index d03c9b4..4cfde1b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -267,7 +267,7 @@ show_qrcode (const char *uri)
     {
       unsigned int off =
         (x * qrc->width / size) + (y * qrc->width / size) * qrc->width;
-      qrDisplay.memory[(y + yOff) + qrDisplay.var_info.xres * (x + xOff)] =
+      qrDisplay.memory[(y + yOff) * qrDisplay.var_info.xres + (x + xOff)] =
         (0 == (qrc->data[off] & 1)) ? 0xFFFF : 0x0000;
     }
 #endif
@@ -276,21 +276,21 @@ show_qrcode (const char *uri)
 #if LEGACY
   if (0 < qrDisplay.devicefd)
   {
-    width = qrDisplay.var_info.xres;
-    height = qrDisplay.var_info.yres;
+    xwidth = qrDisplay.var_info.xres;
+    yheight = qrDisplay.var_info.yres;
     /* show the qrcode */
-    xOff = (height - size) / 2;
-    yOff = (width - size) / 2;
-    for (size_t row = xOff; row < height; row++)
+    yOff = (yheight - size) / 2;
+    xOff = (xwidth - size) / 2;
+    for (size_t yrow = yOff; row < yheight; yrow++)
     {
-      for (size_t col = yOff; col < width; col++)
+      for (size_t xcol = xOff; col < xwidth; col++)
       {
-        if (((row - xOff) < size)&&((col - yOff) < size))
+        if (((yrow - yOff) < size)&&((xcol - xOff) < size))
         {
           for (unsigned int c = 0; c < n_channels; c++)
           {
-            qrDisplay.memory[(row * width + col)] =
-              pixels[((row - xOff) * size + (col - yOff)) * n_channels + c];
+            qrDisplay.memory[(yrow * xwidth + xcol)] =
+              pixels[((yrow - yOff) * size + (xcol - xOff)) * n_channels + c];
           }
         }
       }

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]