From 342c58cba65d8581e7e9245af8b9ee1e0a0faaed Mon Sep 17 00:00:00 2001 From: Pioter Date: Wed, 30 Nov 2022 19:22:46 +0100 Subject: [PATCH] Issue #5 Work In Progress: Add icon to QR size Changes: - Added function to calculate logo size - Added Function to calculate logo position - Upgrade the FoxBarcodeQR form ToDo: - use some libreary i.e. GDIPlusX to render the image on existing QR code Signed-off-by: Piotr Poniewicz --- FoxBarcodeQR_v_2_10/FoxBarcodeQR.pjt | Bin 13365 -> 14718 bytes FoxBarcodeQR_v_2_10/foxbarcodeqr.SCT | Bin 8275 -> 10489 bytes FoxBarcodeQR_v_2_10/foxbarcodeqr.pjx | Bin 2492 -> 2623 bytes FoxBarcodeQR_v_2_10/foxbarcodeqr.prg | 38 +++++++++++++++++++++++++++ FoxBarcodeQR_v_2_10/foxbarcodeqr.scx | Bin 3322 -> 3431 bytes 5 files changed, 38 insertions(+) diff --git a/FoxBarcodeQR_v_2_10/FoxBarcodeQR.pjt b/FoxBarcodeQR_v_2_10/FoxBarcodeQR.pjt index 9c7b8f2a6fe5641619ea2cf4cdad266fa86ee40d..987a292fe00581d6f34ec2b6c24c356bc92b1035 100644 GIT binary patch delta 3641 zcmbtXdrX_x6+id;Fa~2D#=Oic7y?Nk1`K(XJdH8n%nxjTl%%Cg9593hFfk^i(Izyl zTGzG8#BQd&+N>mMyDVxNLaT0?x+(o*(b_+{RhqhJ|1@2sZIRlk32j1y-Tm%ohd|mS zf6VCI@1Aq-J@MutWQN5j$a!Em^LawvK*JP~~|JW)Ru8Jsqlb}}qp-`~z3!}-j0F3FBRZM7 z8I(FNa!Y=xc5Emd4MoN{Ys{Z|XoLoij!|Dr@5Fd0GTxh9*&7}W^+$$|gnIkKhbBfs zqtPdOj|`1Z1cxgSx#f{r5j@LCa2y*imjxrqi1t1d2#yNTI@l&$A%4q!09N>{Xvt?^ zLUICh2tKRId>y?N^B)HTKjAf##cZJU`Pjj<&p~5t^WZr;@=mxABhj|SpuVi5dvF|`G4sJftJB37_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ary patch delta 443 zcmaJ-u}T9$5KSa^xfl>ZkzA0lO&Y74z1h9pGML;Y#^jE8LBvY1u@USQ5fK!$ak00s zu@P)Vu(K5W0)IhUE9Xv$Rt^lzyf^Rd>^#mr&0F3=wNbsdZc6g9P$+cSBmjN%g;qlL zi8!KUEKS1@7~|5Lr9O+Hc`Mb6C+4%%s!Rl?ZSA;c#3lg1g~UKh@D&8UMpPzoYBR^g zUKGhwDCEk#+YK{qH{F$gMG3KYnFukEkc-Z3LGN;{0;#{9A86>Al7R>`r=jKADYc`Y zRg~w`&qyE<%&X&??eZ2m_#O(4fq5zK+mkgHr)~>o*V%Ob2o8SfnsrFV*JiKM?<}oS znE-Mf03h(Z^0Y6J@I1nlu`s)?z#NMRy`p4716Pdh 'N' + RETURN + ENDIF + LOCAL lnLogoSize, lnImageRatio + lnImageRatio = 2.75 + lnLogoSize = ROUND(nQrSize / lnImageRatio, 0) + RETURN lnLogoSize + ENDFUNC + + *--------------------------------------------------------- + * Function SetLogoPosition(nQrSize) + *--------------------------------------------------------- + * Params: + * nQrSize = size of the side length (in pixels) + * nLogoSize = calculated size of logo (output from CalculateLogoSize) + * Returns the begin position of drawing logo + *--------------------------------------------------------- + FUNCTION SetLogoPosition + LPARAMETERS nQrSize, nLogoSize + IF TYPE("nQrSize") <> 'N' + RETURN + ENDIF + + LOCAL lnCentralPosition, lnPixelDrawPosition + lnCentralPosition = nQrSize / 2 + lnPixelDrawPosition = ROUND(lnCentralPosition - (nLogoSize / 2),0) + RETURN lnPixelDrawPosition + ENDFUNC ENDDEFINE && FoxBarcodeQR diff --git a/FoxBarcodeQR_v_2_10/foxbarcodeqr.scx b/FoxBarcodeQR_v_2_10/foxbarcodeqr.scx index 3770d1b4b5fe4801c972345ebdff8c0911111994..91a7d28b8da2594e1b034132f348eaaa8b3d5624 100644 GIT binary patch delta 774 zcmZXSOG_J37>19Rsb(h9+?+U36N6e55oa=)$s`0Rn#3wDA|a^RR7I!@sTSHry@DH2 zEG|wdxGDJ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