Hex Artifact Content
Not logged in

Artifact 01797386236f6b28bea388045023fdb488e89a4b:


0000: 5c 20 73 63 61 6e 20 63 6f 6c 6f 72 20 51 52 20  \ scan color QR 
0010: 63 6f 64 65 73 20 6f 6e 20 41 6e 64 72 6f 69 64  codes on Android
0020: 0a 0a 5c 20 43 6f 70 79 72 69 67 68 74 20 28 43  ..\ Copyright (C
0030: 29 20 32 30 31 36 20 20 20 42 65 72 6e 64 20 50  ) 2016   Bernd P
0040: 61 79 73 61 6e 0a 0a 5c 20 54 68 69 73 20 70 72  aysan..\ This pr
0050: 6f 67 72 61 6d 20 69 73 20 66 72 65 65 20 73 6f  ogram is free so
0060: 66 74 77 61 72 65 3a 20 79 6f 75 20 63 61 6e 20  ftware: you can 
0070: 72 65 64 69 73 74 72 69 62 75 74 65 20 69 74 20  redistribute it 
0080: 61 6e 64 2f 6f 72 20 6d 6f 64 69 66 79 0a 5c 20  and/or modify.\ 
0090: 69 74 20 75 6e 64 65 72 20 74 68 65 20 74 65 72  it under the ter
00a0: 6d 73 20 6f 66 20 74 68 65 20 47 4e 55 20 41 66  ms of the GNU Af
00b0: 66 65 72 6f 20 47 65 6e 65 72 61 6c 20 50 75 62  fero General Pub
00c0: 6c 69 63 20 4c 69 63 65 6e 73 65 20 61 73 20 70  lic License as p
00d0: 75 62 6c 69 73 68 65 64 20 62 79 0a 5c 20 74 68  ublished by.\ th
00e0: 65 20 46 72 65 65 20 53 6f 66 74 77 61 72 65 20  e Free Software 
00f0: 46 6f 75 6e 64 61 74 69 6f 6e 2c 20 65 69 74 68  Foundation, eith
0100: 65 72 20 76 65 72 73 69 6f 6e 20 33 20 6f 66 20  er version 3 of 
0110: 74 68 65 20 4c 69 63 65 6e 73 65 2c 20 6f 72 0a  the License, or.
0120: 5c 20 28 61 74 20 79 6f 75 72 20 6f 70 74 69 6f  \ (at your optio
0130: 6e 29 20 61 6e 79 20 6c 61 74 65 72 20 76 65 72  n) any later ver
0140: 73 69 6f 6e 2e 0a 0a 5c 20 54 68 69 73 20 70 72  sion...\ This pr
0150: 6f 67 72 61 6d 20 69 73 20 64 69 73 74 72 69 62  ogram is distrib
0160: 75 74 65 64 20 69 6e 20 74 68 65 20 68 6f 70 65  uted in the hope
0170: 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20 62 65   that it will be
0180: 20 75 73 65 66 75 6c 2c 0a 5c 20 62 75 74 20 57   useful,.\ but W
0190: 49 54 48 4f 55 54 20 41 4e 59 20 57 41 52 52 41  ITHOUT ANY WARRA
01a0: 4e 54 59 3b 20 77 69 74 68 6f 75 74 20 65 76 65  NTY; without eve
01b0: 6e 20 74 68 65 20 69 6d 70 6c 69 65 64 20 77 61  n the implied wa
01c0: 72 72 61 6e 74 79 20 6f 66 0a 5c 20 4d 45 52 43  rranty of.\ MERC
01d0: 48 41 4e 54 41 42 49 4c 49 54 59 20 6f 72 20 46  HANTABILITY or F
01e0: 49 54 4e 45 53 53 20 46 4f 52 20 41 20 50 41 52  ITNESS FOR A PAR
01f0: 54 49 43 55 4c 41 52 20 50 55 52 50 4f 53 45 2e  TICULAR PURPOSE.
0200: 20 20 53 65 65 20 74 68 65 0a 5c 20 47 4e 55 20    See the.\ GNU 
0210: 41 66 66 65 72 6f 20 47 65 6e 65 72 61 6c 20 50  Affero General P
0220: 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20 66 6f  ublic License fo
0230: 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 0a  r more details..
0240: 0a 5c 20 59 6f 75 20 73 68 6f 75 6c 64 20 68 61  .\ You should ha
0250: 76 65 20 72 65 63 65 69 76 65 64 20 61 20 63 6f  ve received a co
0260: 70 79 20 6f 66 20 74 68 65 20 47 4e 55 20 41 66  py of the GNU Af
0270: 66 65 72 6f 20 47 65 6e 65 72 61 6c 20 50 75 62  fero General Pub
0280: 6c 69 63 20 4c 69 63 65 6e 73 65 0a 5c 20 61 6c  lic License.\ al
0290: 6f 6e 67 20 77 69 74 68 20 74 68 69 73 20 70 72  ong with this pr
02a0: 6f 67 72 61 6d 2e 20 20 49 66 20 6e 6f 74 2c 20  ogram.  If not, 
02b0: 73 65 65 20 3c 68 74 74 70 3a 2f 2f 77 77 77 2e  see <http://www.
02c0: 67 6e 75 2e 6f 72 67 2f 6c 69 63 65 6e 73 65 73  gnu.org/licenses
02d0: 2f 3e 2e 0a 0a 61 6c 73 6f 20 6f 70 65 6e 67 6c  />...also opengl
02e0: 20 61 6c 73 6f 20 61 6e 64 72 6f 69 64 0a 0a 3a   also android..:
02f0: 20 73 63 61 6e 2d 73 74 61 72 74 20 28 20 2d 2d   scan-start ( --
0300: 20 29 0a 20 20 20 20 68 69 64 65 6b 62 20 68 69   ).    hidekb hi
0310: 64 65 73 74 61 74 75 73 20 3e 63 68 61 6e 67 65  destatus >change
0320: 64 20 20 73 63 72 65 65 6e 2b 6b 65 65 70 0a 20  d  screen+keep. 
0330: 20 20 20 63 2d 6f 70 65 6e 2d 62 61 63 6b 20 74     c-open-back t
0340: 6f 20 63 61 6d 65 72 61 0a 20 20 20 20 70 72 6f  o camera.    pro
0350: 67 72 61 6d 20 30 3d 20 49 46 0a 09 5b 27 5d 20  gram 0= IF..['] 
0360: 56 65 72 74 65 78 53 68 61 64 65 72 20 5b 27 5d  VertexShader [']
0370: 20 46 72 61 67 6d 65 6e 74 53 68 61 64 65 72 20   FragmentShader 
0380: 63 72 65 61 74 65 2d 70 72 6f 67 72 61 6d 20 74  create-program t
0390: 6f 20 70 72 6f 67 72 61 6d 0a 20 20 20 20 54 48  o program.    TH
03a0: 45 4e 0a 20 20 20 20 63 61 6d 2d 70 72 65 70 61  EN.    cam-prepa
03b0: 72 65 20 20 6e 65 77 2d 73 63 61 6e 74 65 78 65  re  new-scantexe
03c0: 73 20 3b 0a 0a 3a 20 64 72 61 77 2d 63 61 6d 20  s ;..: draw-cam 
03d0: 28 20 2d 2d 20 29 0a 20 20 20 20 30 3e 66 72 61  ( -- ).    0>fra
03e0: 6d 65 62 75 66 66 65 72 0a 20 20 20 20 63 61 6d  mebuffer.    cam
03f0: 65 72 61 2d 69 6e 69 74 20 73 63 72 65 65 6e 2d  era-init screen-
0400: 6f 72 69 65 6e 74 61 74 69 6f 6e 20 31 65 20 31  orientation 1e 1
0410: 65 20 64 72 61 77 2d 73 63 61 6e 20 73 79 6e 63  e draw-scan sync
0420: 0a 20 20 20 20 63 61 6d 2d 77 20 63 61 6d 2d 68  .    cam-w cam-h
0430: 20 73 63 61 6e 2d 66 62 2d 72 61 77 20 3e 66 72   scan-fb-raw >fr
0440: 61 6d 65 62 75 66 66 65 72 0a 20 20 20 20 31 20  amebuffer.    1 
0450: 31 65 20 31 65 20 64 72 61 77 2d 73 63 61 6e 0a  1e 1e draw-scan.
0460: 20 20 20 20 73 63 61 6e 2d 74 65 78 2d 72 61 77      scan-tex-raw
0470: 20 6c 69 6e 65 61 72 2d 6d 69 70 6d 61 70 20 6d   linear-mipmap m
0480: 69 70 6d 61 70 20 3b 0a 0a 70 72 65 76 69 6f 75  ipmap ;..previou
0490: 73 20 70 72 65 76 69 6f 75 73 0a 0a 5c 5c 5c 0a  s previous..\\\.
04a0: 4c 6f 63 61 6c 20 56 61 72 69 61 62 6c 65 73 3a  Local Variables:
04b0: 0a 66 6f 72 74 68 2d 6c 6f 63 61 6c 2d 77 6f 72  .forth-local-wor
04c0: 64 73 3a 0a 20 20 20 20 28 0a 20 20 20 20 20 28  ds:.    (.     (
04d0: 28 22 6e 65 74 32 6f 3a 22 20 22 2b 6e 65 74 32  ("net2o:" "+net2
04e0: 6f 3a 22 29 20 64 65 66 69 6e 69 74 69 6f 6e 2d  o:") definition-
04f0: 73 74 61 72 74 65 72 20 28 66 6f 6e 74 2d 6c 6f  starter (font-lo
0500: 63 6b 2d 6b 65 79 77 6f 72 64 2d 66 61 63 65 20  ck-keyword-face 
0510: 2e 20 31 29 0a 20 20 20 20 20 20 22 5b 20 5c 74  . 1).      "[ \t
0520: 5c 6e 5d 22 20 74 20 6e 61 6d 65 20 28 66 6f 6e  \n]" t name (fon
0530: 74 2d 6c 6f 63 6b 2d 66 75 6e 63 74 69 6f 6e 2d  t-lock-function-
0540: 6e 61 6d 65 2d 66 61 63 65 20 2e 20 33 29 29 0a  name-face . 3)).
0550: 20 20 20 20 20 28 22 5b 61 2d 7a 30 2d 39 5d 2b       ("[a-z0-9]+
0560: 28 22 20 69 6d 6d 65 64 69 61 74 65 20 28 66 6f  (" immediate (fo
0570: 6e 74 2d 6c 6f 63 6b 2d 63 6f 6d 6d 65 6e 74 2d  nt-lock-comment-
0580: 66 61 63 65 20 2e 20 31 29 0a 20 20 20 20 20 20  face . 1).      
0590: 22 29 22 20 6e 69 6c 20 63 6f 6d 6d 65 6e 74 20  ")" nil comment 
05a0: 28 66 6f 6e 74 2d 6c 6f 63 6b 2d 63 6f 6d 6d 65  (font-lock-comme
05b0: 6e 74 2d 66 61 63 65 20 2e 20 31 29 29 0a 20 20  nt-face . 1)).  
05c0: 20 20 29 0a 66 6f 72 74 68 2d 6c 6f 63 61 6c 2d    ).forth-local-
05d0: 69 6e 64 65 6e 74 2d 77 6f 72 64 73 3a 0a 20 20  indent-words:.  
05e0: 20 20 28 0a 20 20 20 20 20 28 28 22 6e 65 74 32    (.     (("net2
05f0: 6f 3a 22 20 22 2b 6e 65 74 32 6f 3a 22 29 20 28  o:" "+net2o:") (
0600: 30 20 2e 20 32 29 20 28 30 20 2e 20 32 29 20 6e  0 . 2) (0 . 2) n
0610: 6f 6e 2d 69 6d 6d 65 64 69 61 74 65 29 0a 20 20  on-immediate).  
0620: 20 20 29 0a 45 6e 64 3a 0a 5b 54 48 45 4e 5d 0a    ).End:.[THEN].