Some fixes done for Revision 46, of version 13 of M2000 Interpreter.
Also a new object, the m2000.cBarcode we can make Barcodes (We can make QR code from another point: https://georgekarras.blogspot.com/2022/10/revision-10-version-11-qrcode.html)
The object cBarcode found at git: https://github.com/wqweto/ClipBar from Vladimir Vissoultchev, from Bulgaria.
WINDOW 14, 16200, 14200;
mode 14
CLS,0
report 2, "BARCODE"
declare bar "m2000.cBarcode"
rem print type$(bar)
Enum UcsBarCodeTypeEnum {
ucsBctAuto = 0
ucsBctEan13
ucsBctEan8
ucsBctEan128
ucsBctUpcA
ucsBctUpcE
}
Long ink_bleed_in_percents=10
boolean true=1=1, false=1=0
method bar, "init", ink_bleed_in_percents, bHangSeparators:= TRUE, bShowDigits:=TRUE as ok
method bar, "GetBarCode", "123456789012:12345", ucsBctEan13 as Pic
With Pic, "Width" as pic.width, "Height" as pic.height
move 5000, 6000
// Pic is a Picture object
mem$=""
// Now Image can render Pic to string
Image Pic, 7500 to mem$
rem ? image.x(mem$)=7500
rem ? len(mem$)
// so now we place a bitmap
image mem$ ', 7500
// We can render Picture as emf directly
Step 0, -4000
Image Pic, 7500*1.2
// We can make a file in memory using Drawing.
// We can make another emf where we draw the picture
drawing {
image Pic, 3000
} as Mem
rem ? len(Mem)
step -3000, 6000
// we can rotate the image now
image Mem, 10000, ,-90
method bar, "GetBarCode", "abcdefABCDEFG23432432432432432", ucsBctEan128 as Pic
move 5000, 9000
Image Pic, 11000
method bar, "GetBarCode", "123456789012abcdefABCDEFG23432432432432432", ucsBctEan128 as Pic
move 5000, 12000
Image Pic, 11000
push key$
drop
sub BigTitle(this$, there, percent)
local w, n
mm=width
w=scale.x
drawing {
Linespace 0
mode 8
pen #FFEEFf
bold 0
legend chr$(160)+this$+chr$(160),"Lucida Handwriting", 8,0,3,1,-20
} as w
cursor 0, there
move !
n=scale.x/image.x(w)*percent/100
step (scale.x-image.x(w)*n)/2
image w, image.x(w)*n
end sub
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου
You can feel free to write any suggestion, or idea on the subject.