diff --git a/FoxBarcodeQR_v_2_10/FoxBarcodeQR.pjt b/FoxBarcodeQR_v_2_10/FoxBarcodeQR.pjt index 9c7b8f2..987a292 100644 Binary files a/FoxBarcodeQR_v_2_10/FoxBarcodeQR.pjt and b/FoxBarcodeQR_v_2_10/FoxBarcodeQR.pjt differ diff --git a/FoxBarcodeQR_v_2_10/foxbarcodeqr.SCT b/FoxBarcodeQR_v_2_10/foxbarcodeqr.SCT index d7ca0f0..66656d6 100644 Binary files a/FoxBarcodeQR_v_2_10/foxbarcodeqr.SCT and b/FoxBarcodeQR_v_2_10/foxbarcodeqr.SCT differ diff --git a/FoxBarcodeQR_v_2_10/foxbarcodeqr.pjx b/FoxBarcodeQR_v_2_10/foxbarcodeqr.pjx index 47d58f9..e9e671a 100644 Binary files a/FoxBarcodeQR_v_2_10/foxbarcodeqr.pjx and b/FoxBarcodeQR_v_2_10/foxbarcodeqr.pjx differ diff --git a/FoxBarcodeQR_v_2_10/foxbarcodeqr.prg b/FoxBarcodeQR_v_2_10/foxbarcodeqr.prg index 52c3e8a..525028a 100644 --- a/FoxBarcodeQR_v_2_10/foxbarcodeqr.prg +++ b/FoxBarcodeQR_v_2_10/foxbarcodeqr.prg @@ -376,6 +376,44 @@ DEFINE CLASS FoxBarcodeQR AS CUSTOM "Line: " + TRANSFORM(m.nLine) MESSAGEBOX(m.lcErrMsg, 0 + 16, "FoxBarcodeQR error") ENDPROC + + *--------------------------------------------------------- + * Function CalculateLogoSize(nQrSize) + *--------------------------------------------------------- + * Params: + * nQrSize = size of the side length (in pixels) + * Returns the optimal size of logo which we can add + *--------------------------------------------------------- + FUNCTION CalculateLogoSize + LPARAMETERS nQrSize + IF TYPE("nQrSize") <> '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 3770d1b..91a7d28 100644 Binary files a/FoxBarcodeQR_v_2_10/foxbarcodeqr.scx and b/FoxBarcodeQR_v_2_10/foxbarcodeqr.scx differ