革天明 发表于 2013-3-18 11:41:36

英文好的同学看看此函数如何翻译,



QRGetPatternData Function
TopPreviousNext

Gets the QRCode barcode pattern matrix data.

BOOL QRGetPatternData(LPVOID lpBuffer,
                                       DWORD *Size,
                                       WORD *Rows,
                                       WORD *Columns);




Parameters

lpBuffer
Pointer to a buffer that receives the character stream ('1's and '0's) storing the QRCode barcode pattern matrix data row by row from the top left matrix corner, '1' indicates the black module and '0' indicates the white module. If the function fails and the variable pointed to by Size returns the required buffer size, in characters.Size On input, specifies the size, in characters, of the lpBuffer. On output, receives the size, in characters, of the QRCode barcode pattern matrix ('1's and '0's). RowsA pointer to the variable that receives the number of the rows for the pattern matrix.ColumnsA pointer to the variable that receives the number of the columns for the pattern matrix..
Return ValueIf the function succeeds, the return value is a nonzero value, otherwise the return value is zero.

Remarks
You can use this function to obtain the QRCode barcode pattern matrix data and render the QRCode barcode onto any device such as the printer, call QRSetMessage() and QRConfigure() functions before calling this function, other functions don't affect the output of QRCode barcode pattern matrix.Based on the Orientation parameter value, rotate the pattern matrix accordingly before you render theQRCode barcode onto a device.

阿然 发表于 2013-3-18 11:41:37

还在搞你的二维码呢

革天明 发表于 2013-3-18 15:57:22

阿然 发表于 2013-3-18 15:14 static/image/common/back.gif
还在搞你的二维码呢

是啊,我想攻克二维码在CAD上的本地化应用,不需联网,在CAD中生成二维码

ll_j 发表于 2013-3-18 17:51:39

革天明 发表于 2013-3-18 15:57 static/image/common/back.gif
是啊,我想攻克二维码在CAD上的本地化应用,不需联网,在CAD中生成二维码

你用“QR码进阶”百度一下,可以看到一些关于QR二维码的文章。

阿然 发表于 2013-3-19 08:47:15

这怎么好意思,俺啥都没帮上

lixuedong 发表于 2013-3-20 08:27:33

本帖最后由 lixuedong 于 2013-3-20 08:45 编辑

我也翻译不了, 但我能提供其他途径

我试了一下用
http://www.xcad.ch/tests/qrcode.html,输入中文,出来的二进制码,用你写的lisp.绘制后,手机读出来的是乱码。

lixuedong 发表于 2013-3-20 08:31:26

我在用
http://qrcode.cha-gang.com/   ,在线创建你的矢量二维码,可印刷的二维码
可以输出eps格式的文件。

把这个文件,用lisp读入后

lixuedong 发表于 2013-3-20 08:32:14

命令: (setq fhmcfile (findfile "二维.eps"))
"D:\\二维.eps"

命令: (setq f (open fhmcfile "r"))
#<file "D:\\二维.eps">

命令: (setq str (read-line f))
"%!PS-Adobe EPSF-3.0"

命令: (setq str (read-line f))
"%%Creator: Zend_Matrixcode_Qrcode"

命令: (setq str (read-line f))
"%%Title: QRcode"

命令: (setq str (read-line f))
"%%CreationDate: 2013-03-20"

命令: (setq str (read-line f))
"%%DocumentData: Clean7Bit"

命令: (setq str (read-line f))
"%%LanguageLevel: 2"

命令: (setq str (read-line f))
"%%Pages: 1"

命令: (setq str (read-line f))
"%%BoundingBox: 0 0 264 264"

命令: (setq str (read-line f))
"8 8 scale"

命令: (setq str (read-line f))
"4 4 translate"

命令: (setq str (read-line f))
"/F { rectfill } def"

命令: (setq str (read-line f))
"0 0 0 setrgbcolor"

命令: (setq str (read-line f))
"0 24 1 1 F"

命令: (setq str (read-line f))
"0 23 1 1 F"

lixuedong 发表于 2013-3-20 08:44:57

本帖最后由 lixuedong 于 2013-3-20 08:52 编辑

可以看到 "0 24 1 1 F" 是第一个1
"0 23 1 1 F" 是第二个1   

"0 22 1 1 F"    "0 21 1 1 F""0 20 1 1 F""0 19 1 1 F""0 18 1 1 F""0 15 1 1 F" "0 11 1 1 F" "0 10 1 1 F" "0 8 1 1 F" "0 6 1 1 F""0 5 1 1 F" "0 4 1 1 F" "0 3 1 1 F" "0 2 1 1 F""0 1 1 1 F" "0 0 1 1 F"
上面第一组数据就是1 1 1 1 1 1 1 001 0 0 0 1 1 0 1 0 1 1 1 1 1 1 1



"1 24 1 1 F" 代表第二组第一位是 1

===============================================
那这个lisp程序只要按照这个规律,该位有数就为1 ,就直接写一个图元在图上。没有就不写。
那不是就解决你的问题了。
==============================================
还有,写程序时,图元不要用SOLID,填充是会慢的。改用带宽度的pline就行了,
如果有连续的,就写成一条长的。不要断

==============================================
到时,写出来,送我一个





328302216 发表于 2013-3-20 09:54:47

lixuedong 发表于 2013-3-20 08:44 static/image/common/back.gif
可以看到 "0 24 1 1 F" 是第一个1
"0 23 1 1 F" 是第二个1   



lixuedong肯定是高手 整一个出来给我们学习学习嘛!
页: [1] 2
查看完整版本: 英文好的同学看看此函数如何翻译,