UWVA#90681 Achtergrond van QR-codes instelbaar maken (nu hardcoded wit)
svn path=/Slnkdwf/trunk/; revision=70390
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
STDMETHODIMP CQRCode::InterfaceSupportsErrorInfo(REFIID riid)
|
STDMETHODIMP CQRCode::InterfaceSupportsErrorInfo(REFIID riid)
|
||||||
{
|
{
|
||||||
static const IID* arr[] =
|
static const IID* arr[] =
|
||||||
{
|
{
|
||||||
&IID_IQRCode
|
&IID_IQRCode
|
||||||
};
|
};
|
||||||
@@ -70,14 +70,14 @@ bool CQRCode::CreateCxImage(CxImage *img)
|
|||||||
{
|
{
|
||||||
CQR_Encode* pQR_Encode = new CQR_Encode;
|
CQR_Encode* pQR_Encode = new CQR_Encode;
|
||||||
|
|
||||||
BOOL res = pQR_Encode->EncodeData(m_nLevel, m_nVersion,
|
BOOL res = pQR_Encode->EncodeData(m_nLevel, m_nVersion,
|
||||||
m_bAutoExtend, m_nMaskingNo,
|
m_bAutoExtend, m_nMaskingNo,
|
||||||
m_Text );
|
m_Text );
|
||||||
if (!res)
|
if (!res)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
img->Create((pQR_Encode->m_nSymbleSize+2*QR_MARGIN), (pQR_Encode->m_nSymbleSize+2*QR_MARGIN), 24 /* bpp */);
|
img->Create((pQR_Encode->m_nSymbleSize+2*QR_MARGIN), (pQR_Encode->m_nSymbleSize+2*QR_MARGIN), 24 /* bpp */);
|
||||||
img->Clear(255);
|
img->Clear(m_BgGrayColor);
|
||||||
img->SetTransIndex(-1);
|
img->SetTransIndex(-1);
|
||||||
for (int i = 0; i < pQR_Encode->m_nSymbleSize; ++i)
|
for (int i = 0; i < pQR_Encode->m_nSymbleSize; ++i)
|
||||||
for (int j = 0; j < pQR_Encode->m_nSymbleSize; ++j)
|
for (int j = 0; j < pQR_Encode->m_nSymbleSize; ++j)
|
||||||
@@ -214,3 +214,17 @@ STDMETHODIMP CQRCode::put_Color(LONG newVal)
|
|||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CQRCode::get_BgGrayColor(BYTE* pVal)
|
||||||
|
{
|
||||||
|
*pVal = m_BgGrayColor;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CQRCode::put_BgGrayColor(BYTE newVal)
|
||||||
|
{
|
||||||
|
m_BgGrayColor = newVal;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public:
|
|||||||
m_nMaskingNo = -1; // Auto
|
m_nMaskingNo = -1; // Auto
|
||||||
m_nSize = 8; // pixels/module
|
m_nSize = 8; // pixels/module
|
||||||
m_Color = 0x000000; // zwart
|
m_Color = 0x000000; // zwart
|
||||||
|
m_BgGrayColor = 0xFF; // wit
|
||||||
}
|
}
|
||||||
|
|
||||||
DECLARE_REGISTRY_RESOURCEID(IDR_QRCODE)
|
DECLARE_REGISTRY_RESOURCEID(IDR_QRCODE)
|
||||||
@@ -62,6 +63,7 @@ private:
|
|||||||
BOOL m_bAutoExtend;
|
BOOL m_bAutoExtend;
|
||||||
int m_nLevel;
|
int m_nLevel;
|
||||||
int m_Color;
|
int m_Color;
|
||||||
|
int m_BgGrayColor;
|
||||||
int m_nSize;
|
int m_nSize;
|
||||||
bool CreateCxImage(CxImage* img);
|
bool CreateCxImage(CxImage* img);
|
||||||
HRESULT StreamPNG(CxImage &img, VARIANT *ImageData, BOOL bPNG);
|
HRESULT StreamPNG(CxImage &img, VARIANT *ImageData, BOOL bPNG);
|
||||||
@@ -83,6 +85,8 @@ public:
|
|||||||
STDMETHOD(put_Size)(LONG newVal);
|
STDMETHOD(put_Size)(LONG newVal);
|
||||||
STDMETHOD(get_Color)(LONG* pVal);
|
STDMETHOD(get_Color)(LONG* pVal);
|
||||||
STDMETHOD(put_Color)(LONG newVal);
|
STDMETHOD(put_Color)(LONG newVal);
|
||||||
|
STDMETHOD(get_BgGrayColor)(BYTE* pVal);
|
||||||
|
STDMETHOD(put_BgGrayColor)(BYTE newVal);
|
||||||
};
|
};
|
||||||
|
|
||||||
OBJECT_ENTRY_AUTO(__uuidof(QRCode), CQRCode)
|
OBJECT_ENTRY_AUTO(__uuidof(QRCode), CQRCode)
|
||||||
|
|||||||
@@ -395,6 +395,8 @@ interface IQRCode : IDispatch{
|
|||||||
[propput, id(7), helpstring("property Size")] HRESULT Size([in] LONG newVal);
|
[propput, id(7), helpstring("property Size")] HRESULT Size([in] LONG newVal);
|
||||||
[propget, id(8), helpstring("property Color")] HRESULT Color([out, retval] LONG* pVal);
|
[propget, id(8), helpstring("property Color")] HRESULT Color([out, retval] LONG* pVal);
|
||||||
[propput, id(8), helpstring("property Color")] HRESULT Color([in] LONG newVal);
|
[propput, id(8), helpstring("property Color")] HRESULT Color([in] LONG newVal);
|
||||||
|
[propget, id(9), helpstring("property BgGrayColor")] HRESULT BgGrayColor([out, retval] BYTE* pVal);
|
||||||
|
[propput, id(9), helpstring("property BgGrayColor")] HRESULT BgGrayColor([in] BYTE newVal);
|
||||||
};
|
};
|
||||||
[
|
[
|
||||||
object,
|
object,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Zorg dat versies alfabetisch altijd op elkaar volgen!
|
// Zorg dat versies alfabetisch altijd op elkaar volgen!
|
||||||
#define SLNK_MAJOR_VERSION 4
|
#define SLNK_MAJOR_VERSION 4
|
||||||
#define SLNK_MINOR_VERSION 40
|
#define SLNK_MINOR_VERSION 41
|
||||||
#define SLNK_BUILD_VERSION 0
|
#define SLNK_BUILD_VERSION 0
|
||||||
|
|
||||||
// Define resource strings
|
// Define resource strings
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
V4.30 23-08-2022
|
V4.41 23-09-2025
|
||||||
|
- UWVA#90681 Achtergrond van QR-codes instelbaar maken via BgGrayColor
|
||||||
|
|
||||||
|
V4.40 17-06-2024
|
||||||
- Visual Studio 2022
|
- Visual Studio 2022
|
||||||
- SZDB#82496 plaatjes verkleinen met Resample2 ipv. Resample
|
- SZDB#82496 plaatjes verkleinen met Resample2 ipv. Resample
|
||||||
- CIZN#82871 tekeningen met zwarte lijnen forceren (whipfile.forcePlanColor)
|
- CIZN#82871 tekeningen met zwarte lijnen forceren (whipfile.forcePlanColor)
|
||||||
|
|||||||
Reference in New Issue
Block a user