Compare commits

...

10 Commits

Author SHA1 Message Date
Jos Groot Lipman
8f2e7852a8 UWVA#90681 Achtergrond van QR-codes instelbaar maken (nu hardcoded wit)
svn path=/Slnkdwf/trunk/; revision=70390
2025-09-23 10:04:23 +00:00
Jos Groot Lipman
6e502e509d V4.30 23-08-2022
- SZDB#82496 plaatjes verkleinen met Resample2 ipv. Resample
  - CIZN#82871 tekeningen met zwarte lijnen forceren (whipfile.forcePlanColor)

svn path=/Slnkdwf/trunk/; revision=65166
2024-06-17 10:32:44 +00:00
Jos Groot Lipman
7d01fc5e9f V4.30 23-08-2022
- Visual Studio 2022

svn path=/Slnkdwf/trunk/; revision=65165
2024-06-17 10:28:40 +00:00
Jos Groot Lipman
dcf444798e v4.29 ZLMV#78395 Whip2DC ook correctie voor niet orthogonale Units
Whip2PNG.flags en Whipfile.flags ingevoerd. Bitje +1 om bovenstaande te activeren

svn path=/Slnkdwf/trunk/; revision=61777
2023-09-12 09:25:39 +00:00
Jos Groot Lipman
9e8df1579d v4.29 BLOS#76236 ArchiCad - ook Whip2DC z-coördinaat correctie van LUDE#30224 laten doen
svn path=/Slnkdwf/trunk/; revision=58868
2023-01-29 21:40:56 +00:00
Jos Groot Lipman
3e13632f92 BLOS#75830 ArchiCad - Tekstlabel in unicode
svn path=/Slnkdwf/trunk/; revision=58489
2023-01-04 09:19:25 +00:00
Jos Groot Lipman
e731af7547 FCLT#63646 Graphics verbeteringen property 'UnmatchedLabels' tijdje geleden al toegevoegd.
svn path=/Slnkdwf/trunk/; revision=54145
2021-12-14 11:14:00 +00:00
Jos Groot Lipman
a332b6d817 FCLT#63646 Graphics 2022 FCLT#69128 Fontawesome iconen kunnen gebruiken als Graphics symbolen
svn path=/Slnkdwf/trunk/; revision=53563
2021-11-02 20:28:57 +00:00
Jos Groot Lipman
77059e3fc5 FCLT#69128 Fontawesome iconen kunnen gebruiken als Graphics symbolen
svn path=/Slnkdwf/trunk/; revision=53535
2021-10-28 21:18:14 +00:00
Jos Groot Lipman
0c84bb20cb V4.27 18-10-2021
- FCLT#69004 Label achtergrondkleur en alpha via [cff00ff,00ff00,128]

svn path=/Slnkdwf/trunk/; revision=53435
2021-10-18 20:42:41 +00:00
36 changed files with 585 additions and 193 deletions

View File

@@ -22,7 +22,7 @@
<ProjectGuid>{0E49D578-377F-4C07-8339-8737AA9FA0EC}</ProjectGuid>
<RootNamespace>bblib</RootNamespace>
<Keyword>MFCProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -30,26 +30,26 @@
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -22,7 +22,7 @@
<ProjectGuid>{3EA5B7D3-EA9B-420B-B283-0D92E620B970}</ProjectGuid>
<RootNamespace>QRCode</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -30,25 +30,25 @@
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B0573FCD-8E98-421C-8BA3-F47CEB1F1047}"
EndProject
@@ -26,114 +26,40 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QRCode", "QRCode\QRCode.vcx
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Debug|Win32.ActiveCfg = Debug|Win32
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Debug|x64.ActiveCfg = Debug|x64
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Debug|x64.Build.0 = Debug|x64
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Release|Mixed Platforms.Build.0 = Release|Win32
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Release|Win32.ActiveCfg = Release|Win32
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Release|Win32.Build.0 = Release|Win32
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Release|x64.ActiveCfg = Release|x64
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Release|x64.Build.0 = Release|x64
{6DFC9788-904C-4724-A734-06634061EF00}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{6DFC9788-904C-4724-A734-06634061EF00}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{6DFC9788-904C-4724-A734-06634061EF00}.Debug|Win32.ActiveCfg = Debug|Win32
{6DFC9788-904C-4724-A734-06634061EF00}.Debug|x64.ActiveCfg = Debug|x64
{6DFC9788-904C-4724-A734-06634061EF00}.Debug|x64.Build.0 = Debug|x64
{6DFC9788-904C-4724-A734-06634061EF00}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{6DFC9788-904C-4724-A734-06634061EF00}.Release|Mixed Platforms.Build.0 = Release|Win32
{6DFC9788-904C-4724-A734-06634061EF00}.Release|Win32.ActiveCfg = Release|Win32
{6DFC9788-904C-4724-A734-06634061EF00}.Release|Win32.Build.0 = Release|Win32
{6DFC9788-904C-4724-A734-06634061EF00}.Release|x64.ActiveCfg = Release|x64
{6DFC9788-904C-4724-A734-06634061EF00}.Release|x64.Build.0 = Release|x64
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Debug|Win32.ActiveCfg = Debug|Win32
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Debug|x64.ActiveCfg = Debug|x64
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Release|Mixed Platforms.Build.0 = Release|Win32
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Release|Win32.ActiveCfg = Release|Win32
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Release|x64.ActiveCfg = Release|x64
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Debug|Win32.ActiveCfg = Debug|Win32
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Debug|x64.ActiveCfg = Debug|x64
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Release|Mixed Platforms.Build.0 = Release|Win32
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Release|Win32.ActiveCfg = Release|Win32
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Release|x64.ActiveCfg = Release|x64
{18EC7157-E263-458C-A41C-52E9538A642F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{18EC7157-E263-458C-A41C-52E9538A642F}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{18EC7157-E263-458C-A41C-52E9538A642F}.Debug|Win32.ActiveCfg = Debug|Win32
{18EC7157-E263-458C-A41C-52E9538A642F}.Debug|x64.ActiveCfg = Debug|x64
{18EC7157-E263-458C-A41C-52E9538A642F}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{18EC7157-E263-458C-A41C-52E9538A642F}.Release|Mixed Platforms.Build.0 = Release|Win32
{18EC7157-E263-458C-A41C-52E9538A642F}.Release|Win32.ActiveCfg = Release|Win32
{18EC7157-E263-458C-A41C-52E9538A642F}.Release|x64.ActiveCfg = Release|x64
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Debug|Win32.ActiveCfg = Debug|Win32
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Debug|x64.ActiveCfg = Debug|x64
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Release|Mixed Platforms.Build.0 = Release|Win32
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Release|Win32.ActiveCfg = Release|Win32
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Release|x64.ActiveCfg = Release|x64
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Debug|Win32.ActiveCfg = Debug|Win32
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Debug|Win32.Build.0 = Debug|Win32
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Debug|x64.ActiveCfg = Debug|x64
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Debug|x64.Build.0 = Debug|x64
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Release|Mixed Platforms.Build.0 = Release|Win32
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Release|Win32.ActiveCfg = Release|Win32
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Release|Win32.Build.0 = Release|Win32
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Release|x64.ActiveCfg = Release|x64
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Release|x64.Build.0 = Release|x64
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Debug|Win32.ActiveCfg = Debug|Win32
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Debug|Win32.Build.0 = Debug|Win32
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Debug|x64.ActiveCfg = Debug|x64
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Debug|x64.Build.0 = Debug|x64
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Release|Mixed Platforms.Build.0 = Release|Win32
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Release|Win32.ActiveCfg = Release|Win32
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Release|Win32.Build.0 = Release|Win32
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Release|x64.ActiveCfg = Release|x64
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Release|x64.Build.0 = Release|x64
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Debug|Win32.ActiveCfg = Debug|Win32
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Debug|Win32.Build.0 = Debug|Win32
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Debug|x64.ActiveCfg = Debug|x64
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Debug|x64.Build.0 = Debug|x64
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Release|Mixed Platforms.Build.0 = Release|Win32
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Release|Win32.ActiveCfg = Release|Win32
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Release|Win32.Build.0 = Release|Win32
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Release|x64.ActiveCfg = Release|x64
{0E49D578-377F-4C07-8339-8737AA9FA0EC}.Release|x64.Build.0 = Release|x64
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Debug|Win32.ActiveCfg = Debug|Win32
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Debug|Win32.Build.0 = Debug|Win32
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Debug|x64.ActiveCfg = Debug|x64
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Debug|x64.Build.0 = Debug|x64
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Release|Mixed Platforms.Build.0 = Release|Win32
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Release|Win32.ActiveCfg = Release|Win32
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Release|Win32.Build.0 = Release|Win32
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Release|x64.ActiveCfg = Release|x64
{3EA5B7D3-EA9B-420B-B283-0D92E620B970}.Release|x64.Build.0 = Release|x64
EndGlobalSection

View File

@@ -168,9 +168,14 @@ STDMETHODIMP CImageConvert::SaveAs(BSTR IMGPath)
}
// mode 1 for fast (nearest pixel) method, or 2 for accurate (bicubic spline interpolation) method.
if (!m_image.Resample(m_width, m_height, /*mode*/ 2))
return myAtlReportError (GetObjectCLSID(), "Error resizing to w=%d, h=%d\n%s",
m_height, m_width, m_image.GetLastError());
// if (!m_image.Resample(m_width, m_height, /*mode*/ 2))
// return myAtlReportError (GetObjectCLSID(), "Error resizing to w=%d, h=%d\n%s",
// m_height, m_width, m_image.GetLastError());
// Die IM_GAUSSIAN wordt alleen gebruikt bij vergroten wat wij nooit doen eigenlijk
if (!m_image.Resample2(m_width, m_height, /*mode*/ CxImage::IM_GAUSSIAN))
return myAtlReportError(GetObjectCLSID(), "Error resizing to w=%d, h=%d\n%s",
m_height, m_width, m_image.GetLastError());
}
CString fileout(IMGPath);

View File

@@ -8,7 +8,7 @@
STDMETHODIMP CQRCode::InterfaceSupportsErrorInfo(REFIID riid)
{
static const IID* arr[] =
static const IID* arr[] =
{
&IID_IQRCode
};
@@ -70,14 +70,14 @@ bool CQRCode::CreateCxImage(CxImage *img)
{
CQR_Encode* pQR_Encode = new CQR_Encode;
BOOL res = pQR_Encode->EncodeData(m_nLevel, m_nVersion,
m_bAutoExtend, m_nMaskingNo,
BOOL res = pQR_Encode->EncodeData(m_nLevel, m_nVersion,
m_bAutoExtend, m_nMaskingNo,
m_Text );
if (!res)
return false;
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);
for (int i = 0; i < pQR_Encode->m_nSymbleSize; ++i)
for (int j = 0; j < pQR_Encode->m_nSymbleSize; ++j)
@@ -214,3 +214,17 @@ STDMETHODIMP CQRCode::put_Color(LONG newVal)
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;
}

View File

@@ -30,6 +30,7 @@ public:
m_nMaskingNo = -1; // Auto
m_nSize = 8; // pixels/module
m_Color = 0x000000; // zwart
m_BgGrayColor = 0xFF; // wit
}
DECLARE_REGISTRY_RESOURCEID(IDR_QRCODE)
@@ -62,6 +63,7 @@ private:
BOOL m_bAutoExtend;
int m_nLevel;
int m_Color;
int m_BgGrayColor;
int m_nSize;
bool CreateCxImage(CxImage* img);
HRESULT StreamPNG(CxImage &img, VARIANT *ImageData, BOOL bPNG);
@@ -83,6 +85,8 @@ public:
STDMETHOD(put_Size)(LONG newVal);
STDMETHOD(get_Color)(LONG* pVal);
STDMETHOD(put_Color)(LONG newVal);
STDMETHOD(get_BgGrayColor)(BYTE* pVal);
STDMETHOD(put_BgGrayColor)(BYTE newVal);
};
OBJECT_ENTRY_AUTO(__uuidof(QRCode), CQRCode)

View File

@@ -71,6 +71,12 @@ interface IWhipFile : IDispatch{
[id(29), helpstring("method SymbolOrigin")] HRESULT SymbolOrigin([in] BSTR symbolName, [in] DOUBLE dwgX, [in] DOUBLE dwgY);
[propget, id(30), helpstring("property minMergeDistance")] HRESULT minMergeDistance([out, retval] DOUBLE* pVal);
[propput, id(30), helpstring("property minMergeDistance")] HRESULT minMergeDistance([in] DOUBLE newVal);
[id(31), helpstring("method SetSymbolFont")] HRESULT SetSymbolFont([in] BSTR FontName, [in, defaultvalue(1000)] DOUBLE FontHeight);
[propget, id(32), helpstring("property UnmatchedLabels")] HRESULT UnmatchedLabels([out, retval] BSTR* pUnmatched);
[propget, id(33), helpstring("property flags")] HRESULT flags([out, retval] LONG* pVal);
[propput, id(33), helpstring("property flags")] HRESULT flags([in] LONG newVal);
[propget, id(34), helpstring("property forcePlanColor")] HRESULT forcePlanColor([out, retval] LONG* pVal);
[propput, id(34), helpstring("property forcePlanColor")] HRESULT forcePlanColor([in] LONG newVal);
};
[
object,
@@ -112,6 +118,8 @@ interface IWhip2PNG : IDispatch{
[id(24), helpstring("method SetAntialias")] HRESULT SetAntialias([in] LONG lFactor, [in, defaultvalue(0)] LONG lMethod);
[propget, id(25), helpstring("property markers")] HRESULT markers([out, retval] LONG* pVal);
[propput, id(25), helpstring("property markers")] HRESULT markers([in] LONG newVal);
[propget, id(26), helpstring("property flags")] HRESULT flags([out, retval] LONG* pVal);
[propput, id(26), helpstring("property flags")] HRESULT flags([in] LONG newVal);
};
[
object,
@@ -387,6 +395,8 @@ interface IQRCode : IDispatch{
[propput, id(7), helpstring("property Size")] HRESULT Size([in] LONG newVal);
[propget, id(8), helpstring("property Color")] HRESULT Color([out, retval] LONG* pVal);
[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,

View File

@@ -23,32 +23,32 @@
<ProjectGuid>{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}</ProjectGuid>
<RootNamespace>SLNKDWF</RootNamespace>
<Keyword>AtlProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -1,6 +1,6 @@
// Zorg dat versies alfabetisch altijd op elkaar volgen!
#define SLNK_MAJOR_VERSION 4
#define SLNK_MINOR_VERSION 27
#define SLNK_MINOR_VERSION 41
#define SLNK_BUILD_VERSION 0
// Define resource strings

View File

@@ -44,6 +44,7 @@ CSLNKSymbolDefinition::CSLNKSymbolDefinition(int count, WT_Logical_Point const *
m_wtFile.set_eplotsection(NULL);
this->m_dwgScale = 1.0;
m_AsBitmap = NULL;
m_hasBitmap = false;
m_BoundingContour.m_Units = units;
m_BoundingContour.set(count, points, false);
m_Origin = CSLNKContourImpl::Centroid(m_BoundingContour);

View File

@@ -34,7 +34,8 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
CSLNKSymbolDefinition *symbdef,
WT_Integer32 &node_num,
double hintScale,
BOOL forFind, double scale)
BOOL forFind, double scale,
int ttfdescent)
{
ATLASSERT(symbdef != NULL);
@@ -45,12 +46,15 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
file.desired_rendition().fill() = file.rendition().fill() = WT_Fill();
WT_Font default_font;
default_font.width_scale() = 0; // Triggert FONT_WIDTH_SCALE_BIT bitje zetten
default_font.rotation() = 0;
default_font.height() = 0;
default_font.flags() = 0;
default_font.serialize(file); // Op de default zetten.
file.desired_rendition().font() = file.rendition().font() = default_font;
if (!this->m_unicode.length())
{
default_font.width_scale() = 0; // Triggert FONT_WIDTH_SCALE_BIT bitje zetten
default_font.rotation() = 0;
default_font.height() = 0;
default_font.flags() = 0;
default_font.serialize(file); // Op de default zetten.
file.desired_rendition().font() = file.rendition().font() = default_font;
}
WT_Point3D insertion(m_dwgX, m_dwgY);
@@ -136,6 +140,24 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
{
// Skip want toch onzichtbaar
}
else if (this->m_unicode.length())
{
if (m_ColorSet)
m_Color.serialize(file);
// Het roteren en verschalen gebeurt via WT_Transform SymbolTrans
// Een gewijzigde rotatie of schaal maakt dat we een (Font) moeten wegschrijven naar de DWF
// De toolkit snapt echter niet goed dat het nodig is bij gewijzigde Transform, daarom hieronder expliciet
file.desired_rendition().font().height() = file.desired_rendition().font().height(); // Zorg dat FONT_HEIGHT_BIT gezet raakt
file.desired_rendition().font().rotation() = 0; // Zorg dat FONT_ROTATION_BIT gezet raakt
file.desired_rendition().font().serialize(file);
//https://stackoverflow.com/questions/32781414/what-is-the-baseline-font-height-of-fontawesome-font
// Waarom moet ik hier 125 gebruiken? Omdat dat in de svg descent (64) / units-per-em (512) is!
WT_Text my_text(WT_Logical_Point(0, -ttfdescent), this->m_unicode);
// het font is in CWhipFile::GenerateSymbols al goed gezet
my_text.serialize(file);
}
else
symbdef->serialize(file, m_Color, m_ColorSet, myRound(m_Lineweight * scale));
@@ -193,8 +215,11 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
WT_Fill().serialize(file); // Ook op de default zetten.
file.desired_rendition().fill() = file.rendition().fill() = WT_Fill();
default_font.serialize(file); // Ook op de default zetten.
file.desired_rendition().font() = file.rendition().font() = default_font;
if (!this->m_unicode.length())
{
default_font.serialize(file); // Ook op de default zetten.
file.desired_rendition().font() = file.rendition().font() = default_font;
}
file.heuristics().set_apply_transform(WD_False); // Hebben we al rechtstreeks op de contour gedaan
m_SLNKContour.serialize(file, node_num, true, forFind, scale);

View File

@@ -14,7 +14,8 @@ public:
CSLNKSymbolDefinition *symbdef,
WT_Integer32 &node_num,
double hintScale, BOOL forFind,
double scale);
double scale,
int ttfdescent = 0);
WT_Result calculateBoundary (myWT_File *wtFile);
~CSLNKSymbolImpl(void);
@@ -22,6 +23,7 @@ public:
double m_dwgX, m_dwgY;
CString m_symbolName;
WT_String m_unicode;
int m_Rotation;
double m_Scale;
CSLNKContourImpl m_SLNKContour;

View File

@@ -26,6 +26,7 @@ CWhip2PNG::CWhip2PNG()
m_forcePaper = FALSE;
m_forceBW = FALSE;
m_markers = 0;
m_flags = 0;
m_forceGray = FALSE;
m_Maximize = FALSE;
m_dwgScale = 0.0;
@@ -565,7 +566,7 @@ void CWhip2PNG::InitDC(HDC &myDC)
m_iWhip2DC.Load(myDC, epli,
m_WhipPath, m_RegExp,
myRound(m_sizeX*m_dScale), myRound(m_sizeY*m_dScale),
VARIANT_TRUE /*center*/, m_Maximize, m_dwgScale);
VARIANT_TRUE /*center*/, m_Maximize, m_dwgScale, m_flags);
// Als m_dwgScale was gespecificeerd moeten we wel een goede bitmapgrootte kiezen
if (m_dwgScale > 0.0)
@@ -662,6 +663,20 @@ STDMETHODIMP CWhip2PNG::put_markers(LONG newVal)
return S_OK;
}
STDMETHODIMP CWhip2PNG::get_flags(LONG* pVal)
{
(*pVal) = m_flags;
return S_OK;
}
STDMETHODIMP CWhip2PNG::put_flags(LONG newVal)
{
m_flags = newVal;
return S_OK;
}
STDMETHODIMP CWhip2PNG::get_forceGray(VARIANT_BOOL* pVal)
{
(*pVal) = m_forceGray;

View File

@@ -100,6 +100,7 @@ private:
COLORREF m_paperColor; BOOL m_forcePaper;
BOOL m_forceBW;
LONG m_markers;
LONG m_flags;
BOOL m_forceGray;
BOOL m_Maximize;
double m_dwgScale;
@@ -118,6 +119,8 @@ public:
STDMETHOD(put_forceBW)(VARIANT_BOOL newVal);
STDMETHOD(get_markers)(LONG* pVal);
STDMETHOD(put_markers)(LONG newVal);
STDMETHOD(get_flags)(LONG* pVal);
STDMETHOD(put_flags)(LONG newVal);
STDMETHOD(get_forceGray)(VARIANT_BOOL* pVal);
STDMETHOD(put_forceGray)(VARIANT_BOOL newVal);
STDMETHOD(get_LayerCount)(LONG* pVal);

View File

@@ -77,6 +77,8 @@ CWhipFile::CWhipFile()
m_FontName.set("Arial");
m_FontHeight = 400.0;
m_FontHeightSymbols = 200.0;
m_SymbolFontName.set("Font Awesome 5 Pro Regular");
m_SymbolFontHeight = 1000.0;
m_reContouren.Parse(".*", FALSE);
m_reLabels.Parse(".*", FALSE);
@@ -88,6 +90,8 @@ CWhipFile::CWhipFile()
m_activeLayerName = "";
m_vdpi = 0;
m_builder_len = 0;
m_flags = 0;
m_forcePlan = FALSE;
// Predefine fixed symbols
// Merk op dat m_contunits hier nog gewoon de default identity matrix is
@@ -259,17 +263,6 @@ STDMETHODIMP CWhipFile::SetFilterLayers(BSTR reLayers)
return S_OK;
}
// LUDE#30224
// Vectorworks tekeningen blijken wel eens een (negatieve) z-component in de units te hebben
// Met forse tegenzin corrigeer ik dat door hem hier op 1.0 te zetten
// Merk op: alle AutoCAD dwf's die ik ooit zag hebben hem al op 1.0 staan
WT_Units fixUnits(const WT_Units orgunits)
{
WT_Matrix matrix = orgunits.application_to_dwf_transform();
matrix(2, 2) = 1.0;
return WT_Units(matrix, orgunits.units());
}
void CWhipFile::read_for_contours()
{
WT_Result result;
@@ -303,7 +296,7 @@ void CWhipFile::read_for_contours()
// Nu zijn ze wel een keer bekend, we hebben ze later weer nodig
// m_contunits=m_W2DFile.rendition().drawing_info().units();werkt niet goed met paperspace
// Deze doet het in de praktijk altijd wel?
m_contunits = fixUnits(m_W2DFile.rendition().viewport().viewport_units());
m_contunits = myWT_File::fixUnits(m_W2DFile.rendition().viewport().viewport_units(), m_flags);
m_view=m_W2DFile.rendition().rendering_options().view();
@@ -405,7 +398,10 @@ void CWhipFile::processLabels()
}
}
if (!found)
{
m_UnmatchedLabels.Add(text);
myTRACE("\nLabel %s has no matching contour", text.string().ascii());
}
}
return;
@@ -534,10 +530,10 @@ WT_Result CWhipFile::my_process_outlineEllipse(WT_Outline_Ellipse & outlineEllip
if (MAX_BUILDER < deze->m_builder_len + 5) // overflow
{
deze->m_builder_len = 0; // reset builder
return WT_Result::Success;
return WT_Result::Success;
}
WT_Units units = fixUnits(file.rendition().viewport().viewport_units());
WT_Units units = myWT_File::fixUnits(file.rendition().viewport().viewport_units(), deze->m_flags);
WT_Point3D dwgPt = units.transform(outlineEllipse.position());
@@ -615,7 +611,7 @@ WT_Result CWhipFile::my_process_polyline(WT_Polyline & polyline, WT_File & file)
//WT_Units units=file.rendition().drawing_info().units(); werkt niet goed met paperspace
// Waarom zetten we hier m_contunits eigenlijk nog niet gewoon direct?
WT_Units units = fixUnits(file.rendition().viewport().viewport_units());
WT_Units units = myWT_File::fixUnits(file.rendition().viewport().viewport_units(), deze->m_flags);
// if (polyline.count() == 3 && polyline.points()[0].m_x == 2147470970 && polyline.points()[0].m_y == 22603)
// DebugBreak();
@@ -793,8 +789,11 @@ WT_Result CWhipFile::my_process_text (WT_Text & text, WT_File & file)
if (!deze->m_labelLayerActive)
return WT_Result::Success; // Wrong layer
if (text.string().is_ascii() && strlen(text.string().ascii()) > 0)
deze->m_SLNKLabels.Add(text);
WT_Text roomnr(text);
roomnr.string().set(text.string().length(), text.string()); // maak kopie, indien mogelijk wordt dat vanzelf ascii
if (roomnr.string().is_ascii() && strlen(roomnr.string().ascii()) > 0)
deze->m_SLNKLabels.Add(roomnr);
return WT_Result::Success;
}
@@ -822,6 +821,14 @@ HRESULT CWhipFile::SerializePlan(WT_File & my_plan_file, myWT_File & my_file, do
CString last_layer;
m_activeLayerName = ""; // reset
WT_Color planclr(m_forcePlanColor >> 16, (m_forcePlanColor & 0xff00) >> 8, m_forcePlanColor & 0xff);
if (m_forcePlan) // plattegrond grijzig maken
{
my_file.desired_rendition().color() = my_file.rendition().color() = planclr;
planclr.serialize(my_file);
}
while ((result = my_plan_file.process_next_object()) == WT_Result::Success)
{
switch(my_plan_file.current_object()->object_type())
@@ -833,6 +840,11 @@ HRESULT CWhipFile::SerializePlan(WT_File & my_plan_file, myWT_File & my_file, do
GenerateContouren(my_plan_file, my_file, scale, true); // Alle 'solid' kleuren
comment(my_file, "== Contouren end (solid=true)");
firstDrawable = false;
if (m_forcePlan) // plattegrond (opnieuw) grijzig maken
{
my_file.desired_rendition().color() = my_file.rendition().color() = planclr;
planclr.serialize(my_file);
}
}
if (my_plan_file.current_object()->object_id() == WT_Object::Origin_ID
&& !my_file.heuristics().allow_binary_data()
@@ -888,7 +900,8 @@ HRESULT CWhipFile::SerializePlan(WT_File & my_plan_file, myWT_File & my_file, do
}
case WT_Object::Color_ID:
{
my_file.desired_rendition().color() = *((WT_Color *)obj);
if (!m_forcePlan) // gewoon originele kleur
my_file.desired_rendition().color() = *((WT_Color *)obj);
break;
}
case WT_Object::Font_ID:
@@ -1016,6 +1029,9 @@ bool CWhipFile::GenerateSymbols(myWT_File &my_file)
for (size_t i=0; i<m_SLNKSymbols.GetCount(); i++)
{
CSLNKSymbolImpl *symbol= m_SLNKSymbols[i];
if (symbol->m_unicode.length()) // die doen we in de tweede slag allemaal tegelijk
continue;
if (symbol->m_symbolName == "" || !m_SLNKSymbolDefinitions.Lookup(symbol->m_symbolName))
symbol->serialize(my_file, m_contunits, NULL,
m_next_node_num,
@@ -1029,6 +1045,58 @@ bool CWhipFile::GenerateSymbols(myWT_File &my_file)
m_hintScale, m_forFind, scale);
}
}
//
// nu de unicode symbolen
//
tempFontDC myDC(m_SymbolFontName);
//TEXTMETRIC tm;
int ttfdescent = 0; // zo ver moet het karakter nog omhoog om het precies in het midden aan te grijpen
//if (GetTextMetrics(myDC, &tm) != 0)
//{
// ttfdescent = MulDiv(tm.tmDescent, FONT_SIZER, tm.tmHeight + 250); // waarom is die 250 nodig om 125 te krijgen? Nu nog hardcoded in SLNKSymbolImpl.cpp
//}
int size = ::GetOutlineTextMetricsW(myDC, 0, NULL); // alleen voor TrueType!
if (size != 0)
{
OUTLINETEXTMETRICW *otm = (OUTLINETEXTMETRICW *)new char[size];
WD_Assert(otm != NULL);
UINT status = GetOutlineTextMetricsW(myDC, size, otm);
WD_Assert(status != 0);
ttfdescent = otm->otmDescent;
delete[] otm;
}
WT_Font myfont;
myfont.font_name().set(m_SymbolFontName);
myfont.height() = myRound(m_SymbolFontHeight); // 1000 sluit aan bij onze ingebouwde symbolen
myfont.rotation() = 0;
myfont.width_scale() = 0;
myfont.flags() = 0;
my_file.desired_rendition().font() = myfont;
myfont.serialize(my_file);
for (size_t i = 0; i<m_SLNKSymbols.GetCount(); i++)
{
CSLNKSymbolImpl *symbol = m_SLNKSymbols[i];
if (symbol->m_unicode.length()) // die doen we nu
{
CString s; s.Format("About to insert symbol %d %s (%s)", m_next_node_num, symbol->m_SLNKContour.m_Key, symbol->m_symbolName);
comment(my_file, s);
symbol->serialize(my_file, m_contunits, m_SLNKSymbolDefinitions[symbol->m_symbolName],
m_next_node_num,
m_hintScale, m_forFind, scale, ttfdescent);
}
}
// Onze labels kunnen later door een achtergrondkleur een polygon hebben
// Zorg dat die niet binnen een node valt
WT_Object_Node my_node(my_file, 0);
my_file.desired_rendition().object_node() = my_node;
return true;
}
@@ -1137,6 +1205,11 @@ bool CWhipFile::GenerateContouren(WT_File &my_planfile, myWT_File &my_file,
my_file.desired_rendition().font() = my_file.rendition().font() = keepFont;
keepFont.serialize(my_file); //
// Onze labels kunnen later door een achtergrondkleur een polygon hebben
// Zorg dat die niet binnen een node valt
WT_Object_Node my_node(my_file, 0);
my_file.desired_rendition().object_node() = my_node;
return true;
}
@@ -1344,6 +1417,14 @@ STDMETHODIMP CWhipFile::SetLabelPosition(BYTE p_LabelPos)
return S_OK;
}
STDMETHODIMP CWhipFile::SetSymbolFont(BSTR FontName, DOUBLE FontHeight /* = 1000 */)
{
m_SymbolFontName.set(FontName);
m_SymbolFontHeight = FontHeight;
return S_OK;
}
STDMETHODIMP CWhipFile::get_AddSymbol(DOUBLE dwgX, DOUBLE dwgY, BSTR symbolName, ISLNKSymbol** pVal)
{
CString name(symbolName);
@@ -1367,15 +1448,29 @@ STDMETHODIMP CWhipFile::get_AddSymbol(DOUBLE dwgX, DOUBLE dwgY, BSTR symbolName,
if(FAILED(hr)) return hr;
theSymbol->SetImpl(mySymbol); // Heel belangrijk: zet de implementatie waar we een interface op bieden
if (!m_SLNKSymbolDefinitions.Lookup(name))
if (name[0] == '@') // unicode karakter @0000F134 voor fa-fire-extinguisher
{
long bytes = strtol(name.Mid(1), NULL, 16);
mySymbol->m_unicode.set(4, (WT_Unsigned_Integer16 *) &bytes);
name = "*SQUARE"; // voor de extents
}
else if (!m_SLNKSymbolDefinitions.Lookup(name))
name = "*STAR"; // Die vinden we altijd ja
ATLASSERT(m_SLNKSymbolDefinitions.Lookup(name));
mySymbol->m_symbolName = name;
mySymbol->m_SLNKContour.set(m_SLNKSymbolDefinitions[name]->m_BoundingContour.count(),
m_SLNKSymbolDefinitions[name]->m_BoundingContour.points(), true); // TODO: Is copy wel nodig?==>Ja, we gaan ze later transformeren!
// De voorgedefinieerde symbolen hebben alleen maar een contour. Die activeren we hier
if (name[0] == '*')
if (mySymbol->m_unicode.length())
{
mySymbol->m_SLNKContour.m_Color = WT_Color(0, 0, 0, 0); // de square zelf willen we niet zien
#ifdef _DEBUG
mySymbol->m_SLNKContour.m_outlineColor = WT_Color(255, 0, 0, 64); // Even met outline
#endif
}
else if (name[0] == '*')
{
// Default rood
mySymbol->m_SLNKContour.m_Color = WT_Color(255,0,0,255);
@@ -1594,6 +1689,22 @@ STDMETHODIMP CWhipFile::put_minMergeDistance(DOUBLE newVal)
return S_OK;
}
STDMETHODIMP CWhipFile::get_flags(LONG* pVal)
{
(*pVal) = m_flags;
return S_OK;
}
STDMETHODIMP CWhipFile::put_flags(LONG newVal)
{
m_flags = newVal;
return S_OK;
}
STDMETHODIMP CWhipFile::get_AddContour(ISLNKContour** pVal)
{
// Je mag eigenlijk geen echt lege contour doorgeven, daar assert de pointset.cpp op?
@@ -1618,3 +1729,32 @@ STDMETHODIMP CWhipFile::get_DwgLimits(IBoundingBox** pVal)
{
return m_dwgLimits->QueryInterface(IID_IBoundingBox, (void**)pVal);
}
STDMETHODIMP CWhipFile::get_UnmatchedLabels(BSTR* pUnmatched)
{
CString result = "";
for (size_t lbl = 0; lbl < m_UnmatchedLabels.GetCount(); lbl++)
{
WT_Text text = m_UnmatchedLabels[lbl];
if (result != "")
result += "\n";
result += text.string().ascii();
}
(*pUnmatched) = result.AllocSysString();
return S_OK;
}
STDMETHODIMP CWhipFile::get_forcePlanColor(LONG* pVal)
{
(*pVal) = m_forcePlanColor;
return S_OK;
}
STDMETHODIMP CWhipFile::put_forcePlanColor(LONG newVal)
{
m_forcePlanColor = newVal;
m_forcePlan = TRUE;
return S_OK;
}

View File

@@ -69,6 +69,7 @@ public:
STDMETHOD(SaveAs2)(BSTR WhipPath, VARIANT_BOOL ascii);
STDMETHOD(HighlightUnrecognized)();
STDMETHOD(SetLabelFont)(BSTR FontName, DOUBLE FontHeight, DOUBLE FontHeightSymbols);
STDMETHOD(SetSymbolFont)(BSTR FontName, DOUBLE FontHeight);
STDMETHOD(SetLabelPosition)(BYTE LabelPos);
STDMETHOD(get_AddSymbol)(DOUBLE dwgX, DOUBLE dwgY, BSTR symbolName, ISLNKSymbol** pVal);
STDMETHOD(DefineSymbol)(BSTR symbolName, VARIANT EPlotStream, ISLNKContour** pContour);
@@ -79,17 +80,19 @@ public:
STDMETHOD(SetFilterLayers)(BSTR reLayers);
STDMETHOD(get_FindInContour)(DOUBLE dwgX, DOUBLE dwgY, BSTR* pVal);
STDMETHOD(get_AddContour)(ISLNKContour** pVal);
STDMETHOD(get_UnmatchedLabels)(BSTR* pUnmatched);
private:
WT_String m_FontName;
double m_FontHeight, m_FontHeightSymbols;
WT_String m_FontName, m_SymbolFontName;
double m_FontHeight, m_FontHeightSymbols, m_SymbolFontHeight;
CComQIPtr<IEPlotSection> m_iEPlotSection; // Om scope levend te houden
CComQIPtr<IBoundingBox> m_dwgLimits;
myWT_File m_W2DFile;
long m_vdpi;
WT_View m_view; // Initial view
COLORREF m_forcePlanColor; BOOL m_forcePlan;
WT_Logical_Point m_builder[MAX_BUILDER+1]; // om lijnstukken aan elkaar te plakken. 1000 lijkt me genoeg
int m_builder_len;
@@ -126,8 +129,12 @@ public:
STDMETHOD(put_minContSize)(DOUBLE newVal);
STDMETHOD(get_minMergeDistance)(DOUBLE* pVal);
STDMETHOD(put_minMergeDistance)(DOUBLE newVal);
STDMETHOD(get_flags)(LONG* pVal);
STDMETHOD(put_flags)(LONG newVal);
STDMETHOD(get_vectorDpi)(LONG* pVal);
STDMETHOD(get_DwgLimits)(IBoundingBox** pVal);
STDMETHOD(get_forcePlanColor)(LONG* pVal);
STDMETHOD(put_forcePlanColor)(LONG newVal);
// Voorheen WhipFileState
public:
@@ -172,6 +179,7 @@ public:
CAtlArray<CSLNKSymbolImpl *> m_SLNKSymbols;
CAtlMap<CString, CSLNKSymbolDefinition *> m_SLNKSymbolDefinitions;
CAtlArray<WT_Text> m_SLNKLabels;
CAtlArray<WT_Text> m_UnmatchedLabels;
WT_Units m_contunits;
CString m_activeLayerName;
@@ -180,6 +188,7 @@ public:
double m_hintScale; // Kunnen we gebruiken om symbolen te 'geeken'
double m_minContSize; // Minimale oppervlakte om als contour te erkend worden
double m_minMergeDistance; // Minimale afstand om lijnsegmenten te mergen
long m_flags;
BOOL m_forFind; // Extra info die we kunnen misbruiken

View File

@@ -21,28 +21,28 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{C8E16319-530C-47D5-BED8-B18AB41FC01F}</ProjectGuid>
<Keyword>MFCProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

View File

@@ -22,26 +22,26 @@
<ProjectName>jpeg</ProjectName>
<ProjectGuid>{95E4E28A-C7FB-4764-BA53-48E3394511EF}</ProjectGuid>
<Keyword>MFCProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -21,28 +21,28 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{6C1E65C3-D0FA-488F-8B5A-4790B905117D}</ProjectGuid>
<Keyword>MFCProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -609,6 +609,8 @@ CSize CSLNKContourImpl::DrawOneLabel(WT_File &my_file,
else
{ // Use UNICODE for example for Micha<68>l
CStringW s(token);
//s = L"Buro euro \u20AC pin \U0001F4CD star: \u2733 snowman: \u2603 facepalm \U0001F926";
//s = L"FontAwesome pin \U0000e002 fire \U0000F134";
txt.set(s.GetLength(), s);
}
@@ -633,7 +635,7 @@ CSize CSLNKContourImpl::DrawOneLabel(WT_File &my_file,
delta = MulDiv(tm.tmDescent, thisLineHeight, FONT_SIZER);
}
int padding = MulDiv(tm.tmDescent, l_fontheight, FONT_SIZER * 2); // halve fontheight padding
int padding = thisLineHeight / 10; // 1/10 fontheight padding
WT_Polygon my_poly(4, rect, WD_False);
int ww = MulDiv(rc.right, thisLineHeight, FONT_SIZER); // 'width' zou voor elke regel dezelfde breedte geven
my_poly.points()[0] = rotatedpoint(radian, - padding, - padding - delta); // linksonder

View File

@@ -22,32 +22,32 @@
<ProjectGuid>{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}</ProjectGuid>
<RootNamespace>SLNKDWF</RootNamespace>
<Keyword>AtlProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -22,32 +22,32 @@
<ProjectGuid>{6EA5FCEC-1DB0-4542-8E41-9423021BD460}</ProjectGuid>
<RootNamespace>SLNKDWF</RootNamespace>
<Keyword>AtlProj</Keyword>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -148,7 +148,7 @@
</Command>
</PreLinkEvent>
<Lib>
<AdditionalDependencies>cximage.lib;jpeg.lib;png.lib;tiff.lib;dwfcore.1.7.0.lib;dwftk.7.7.0.lib;whiptk.7.13.601.lib;msimg32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>cximage.lib;jpeg.lib;png.lib;dwfcore.1.7.0.lib;dwftk.7.7.0.lib;whiptk.7.13.601.lib;msimg32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>cximage/lib/x64/$(Configuration);$(DWFTKPATH)\lib\x64\static\$(Configuration)\vc14.0;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<PostBuildEvent>
@@ -246,7 +246,7 @@
</Command>
</PreLinkEvent>
<Lib>
<AdditionalDependencies>cximage.lib;jpeg.lib;png.lib;tiff.lib;dwfcore.1.7.0.lib;dwftk.7.7.0.lib;whiptk.7.13.601.lib;msimg32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>cximage.lib;jpeg.lib;png.lib;dwfcore.1.7.0.lib;dwftk.7.7.0.lib;whiptk.7.13.601.lib;msimg32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>cximage/lib/x64/$(Configuration);$(DWFTKPATH)\lib\x64\static\$(Configuration)\vc14.0;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<PostBuildEvent>

View File

@@ -20,11 +20,12 @@ int CWhip2DCImpl::Load(HDC hDC, CEPlotSectionImpl *EPlotStream,
const CString &WhipPath,
const CString & RegExp, long sizeX, long sizeY,
VARIANT_BOOL centerImage, VARIANT_BOOL maximize,/*=FALSE*/
double dwgScale/*=0.0*/)
double dwgScale/*=0.0*/, long flags/*=0*/)
{
m_State.Reset();
m_WhipPath = WhipPath;
m_State.m_flags = flags;
m_State.myDC = hDC;
m_State.m_Layernames.RemoveAll();
m_State.m_centerImage = centerImage;
@@ -283,7 +284,7 @@ int CWhip2DCImpl::Paint(VARIANT_BOOL forceBW, LONG markers /* = 0 */)
throw myCString("\nCWhip2DCImpl::Paint: unable to open file '%s'", m_WhipPath.ascii());
}
// For when user wants to use DPtoDWF
m_State.m_Units = my_input_file.rendition().viewport().viewport_units();
m_State.m_Units = myWT_File::fixUnits(my_input_file.rendition().viewport().viewport_units(), m_State.m_flags);
#if 0
{
@@ -414,7 +415,7 @@ int CWhip2DCImpl::FindTexts(const CString &findText)
myTRACE("\nSorry, kan file niet openen: %s", m_WhipPath);
// For when user wants to use DPtoDWF
m_State.m_Units = my_input_file.rendition().viewport().viewport_units();
m_State.m_Units = myWT_File::fixUnits(my_input_file.rendition().viewport().viewport_units(), m_State.m_flags);
my_input_file.close(); // closing Input file.
@@ -507,7 +508,7 @@ int CWhip2DCImpl::Find(LONG findX, LONG findY,
myTRACE("\nSorry, kan file niet openen: %s", m_WhipPath);
// For when user wants to use DPtoDWF
m_State.m_Units = my_input_file.rendition().viewport().viewport_units();
m_State.m_Units = myWT_File::fixUnits(my_input_file.rendition().viewport().viewport_units(), m_State.m_flags);
my_input_file.close(); // closing Input file.
@@ -1038,7 +1039,8 @@ CString CWhip2DCImpl::PolyToMap(WT_Polygon & polygon,
// ttl = objKey; // Is dit wel zo logisch/wenselijk?
ttl.Replace("\\n", "\n");
Title.Format("title=\"%s\"", ttl);
if (ttl.GetLength())
Title.Format(" title=\"%s\"", ttl);
CString smbl = "";
if (objKey != "")
@@ -1050,8 +1052,11 @@ CString CWhip2DCImpl::PolyToMap(WT_Polygon & polygon,
smbl.Format(" SLNKKey=\"%s\"", objKey);
}
if (smbl == "" && Title == "" && Href == "") // Area zonder iets interessants gewoon achterwege laten
return "";
CString Builder;
Builder.Format("\n<area%s %s shape=\"%s\" %s%s>",
Builder.Format("\n<area%s%s shape=\"%s\" %s%s>",
smbl, Title, shape, Coords, Href);
return Builder;
};
@@ -1101,7 +1106,7 @@ WT_Result CWhip2DCImpl::my_process_polygon_find (WT_Polygon & polygon, WT_File &
{
m_State->foundNode = file.rendition().object_node();
CSLNKContourImpl::EdgeAngle(m_State->DWFfindXY, polygon, m_State->foundEdgeAngle, m_State->foundEdgeDistance);
double scale = file.rendition().viewport().viewport_units().application_to_dwf_transform()(0,0);
double scale = myWT_File::fixUnits(file.rendition().viewport().viewport_units(), m_State->m_flags).application_to_dwf_transform()(0,0);
m_State->foundEdgeDistance /= scale;
WT_Integer32 layer_num = file.rendition().layer().layer_num();

View File

@@ -125,7 +125,7 @@ public:
int Load(HDC hDC, CEPlotSectionImpl *EPlotSection, const CString &WhipPath,
const CString &RegExp, long sizeX, long sizeY,
VARIANT_BOOL centerImage, VARIANT_BOOL maximize=FALSE,
double dwgScale=0.0);
double dwgScale=0.0, long flags=0);
int Paint(VARIANT_BOOL forceBW, LONG markers = 0);
int Find(LONG findX, LONG findY, BYTE AsMap,
CString &pContourKey, CString &pContourLayer,

View File

@@ -31,6 +31,7 @@ void CWhip2DCState::Reset()
m_font = NULL;
m_forcePaper = false;
m_Maximize = false;
m_flags = 0;
}
CWhip2DCState::~CWhip2DCState()
@@ -123,6 +124,12 @@ void CWhip2DCState::LPToDWG(CPoint pt, double &resX, double &resY)
(m_MinMax.maxpt().m_y-m_MinMax.minpt().m_y);
double DWGx = dwgPtmin.m_x + (DWFx-m_MinMax.minpt().m_x)*xScale;
double DWGy = dwgPtmin.m_y + (DWFy-m_MinMax.minpt().m_y)*yScale;
#ifdef _DEBUG
// Moet onder normale omstandigheden gelijk zijn aan DWGx en DWGy
WT_Point3D dwgPt = m_Units.transform(LPToDWF(pt));
#endif
resX = DWGx;
resY = DWGy;
}

View File

@@ -84,6 +84,7 @@ public:
BOOL m_Maximize;
BOOL m_centerImage;
double m_mul; // schaal onze DWF-coordinaten naar bitmap coordinaten
long m_flags;
CSize m_Size;
BOOL findIt;

View File

@@ -87,6 +87,29 @@ WT_Result myWT_File::my_WSseek (WT_File & file, int distance, int &amount_seeke
return WT_Result::Success;
};
WT_Units myWT_File::fixUnits(const WT_Units orgunits, long flags)
{
WT_Matrix matrix = orgunits.application_to_dwf_transform();
// LUDE#30224/BLOS#76236
// Vectorworks tekeningen blijken wel eens een (negatieve) z-component in de units te hebben
// Met forse tegenzin corrigeer ik dat door hem hier op 1.0 te zetten
// Merk op: alle AutoCAD dwf's die ik ooit zag hebben hem al op 1.0 staan
matrix(2, 2) = 1.0;
// ZLMV#78395
// Ze hadden AutoCAD LT tekeningen waar de (0,1) en (1,0) niet (nagenoeg) op '0' stonden
// Met forse tegenzin corrigeer ik dat door het hier op 0.0 te zetten
if (flags & 0x01)
{
matrix(0, 1) = 0.0;
matrix(1, 0) = 0.0;
}
return WT_Units(matrix, orgunits.units());
}
#ifndef DWFTK_READ_ONLY
WT_Result myWT_File::my_WSwrite (WT_File & file,int size,void const * buffer)
{

View File

@@ -23,6 +23,7 @@ public:
};
const unsigned int PaperColor() { return m_color; };
static WT_Units fixUnits(const WT_Units orgunits, long flags);
#ifndef DWFTK_READ_ONLY
bool SaveAsAscii(const CString &destpath, EPlot_Progress_Action action = NULL);
#endif

View File

@@ -21,32 +21,32 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}</ProjectGuid>
<RootNamespace>SLNKDWFViewer</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -21,26 +21,26 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{6DFC9788-904C-4724-A734-06634061EF00}</ProjectGuid>
<RootNamespace>WINCDMDWF</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>false</UseOfAtl>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfAtl>false</UseOfAtl>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -0,0 +1,166 @@
//
// Copyright (c) 2003-2006 by Autodesk, Inc.
//
// By using this code, you are agreeing to the terms and conditions of
// the License Agreement included in the documentation for this code.
//
// AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED,
// AS TO THE CORRECTNESS OF THIS CODE OR ANY DERIVATIVE
// WORKS WHICH INCORPORATE IT.
//
// AUTODESK PROVIDES THE CODE ON AN "AS-IS" BASIS
// AND EXPLICITLY DISCLAIMS ANY LIABILITY, INCLUDING
// CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
// OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer Software
// Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
// Data and Computer Software), as applicable.
//
#ifndef _DWFCORE_ARCHIVE_H
#define _DWFCORE_ARCHIVE_H
#include "dwfcore/paging/PagingFwd.h"
#include "dwfcore/paging/Adapter.h"
#include <cassert>
#include <string>
///
///\file dwfcore/paging/Archive.h
/// This header contains the declaration for archive concepts. An in/out archive can serialize a object into a data tBlock.
/// Each specialization of the in/out archive can duo to one single or group types
///
namespace DWFCore
{
/** This namespace is internal
*/
namespace detail
{
/** helper for implement IsPodType ;
*/
template<typename T>
struct IsPodTypeHelper
{
union
{
T t_;
char i_;
};
};
/** type trait, implemented for check POD( plain old data) type.
*/
template<typename T>
struct IsPodType
{
enum { size = sizeof(IsPodTypeHelper<T>)};
};
}
/** This class intends to load the data tBlock via DWFInputAdapter interface first, and then create the object and return to caller
\note the default implementation can't duo to any user defined types except POD (plain old data) types.
DWFArchive defined a CONCEPT and concept is a term of GP(generic programming).
A concept contains a set of requirements that describe a family of abstractions.
More information:http://www.generic-programming.org/
*/
//POD implementation;
///\param T the type to be loaded
template<typename T>
class DWFArchive
{
///if T is not a POD type, it will cause a compilation error.
static const int kCheck = detail::IsPodType<T>::size;
public:
typedef T tValueType;
typedef T* tPointer;
typedef const T* tConstPointer;
typedef typename DWFPagingAdapter::tHandleType tHandleType;
/** load the data tBlock of the object indicated by hHandle, and create the object with the data.
\pre hHandle != DWFInputAdapter::kInvalidHandle
\pre pObject != 0
\param rInputAdapter InputAdapter for load from
\param hHandle indicator of the object
\param pObject point to uninitialized object.
\post the object pointed by pObject was constructed.
\throw any
*/
static void load(DWFInputAdapter& rInputAdapter, tHandleType hHandle, tPointer pObject)
{
assert(hHandle != DWFInputAdapter::kInvalidHandle);
assert(pObject != 0);
DWFInputAdapter::tBufferType buf;
rInputAdapter.load(hHandle, buf);
if (buf.size() != sizeof(tValueType))
{
_DWFCORE_THROW( DWFUnexpectedException, /*NOXLATE*/L"The Adapter returned invalid data, data source may be invalid" );
}
memcpy(pObject, &buf[0], buf.size()); //because T is a pod type, so here can use memcpy safely
}
/** it intends to serialize the object and save the data tBlock via DWFOutputAdapter interface.
\pre t != 0
\param t tPointer of the object will to be saved
\param old hHandle of the object before saved
\return new hHandle of the object after saved.
\post return != invalid_handle
\throw any
*/
static tHandleType save(DWFOutputAdapter& rOutputAdapter, tConstPointer t, tHandleType old)
{
DWFInputAdapter::tBufferType buf(sizeof(tValueType));
memcpy(&buf[0], t, sizeof(tValueType));
return rOutputAdapter.save(buf, old);
}
};
/** The specialization of DWFArchive for std::basic_string
the descriptions of template parameters can see std::basic_string
*/
template<typename T, typename Traits, typename Alloc>
class DWFArchive<std::basic_string<T, Traits, Alloc> >
{
public:
typedef std::basic_string<T, Traits, Alloc> tValueType;
typedef tValueType* tPointer;
typedef const tValueType* tConstPointer;
typedef typename DWFPagingAdapter::tHandleType tHandleType;
///\copydoc DWFArchive<T>::load(DWFInputAdapter& rInputAdapter, tHandleType hHandle, tPointer pObject)
static void load(DWFInputAdapter& rInputAdapter, tHandleType hHandle, tPointer pObject)
{
assert(hHandle != DWFInputAdapter::kInvalidHandle);
assert(pObject != 0);
DWFInputAdapter::tBufferType buf;
rInputAdapter.load(hHandle, buf);//only load the raw data of basic_string
if (buf.size() % sizeof(T) != 0)
{
_DWFCORE_THROW( DWFUnexpectedException, /*NOXLATE*/L"The Adapter returned invalid data, data source may be damaged" );
}
tPointer first = (tPointer)&*buf.begin();
//restore the object. we can restore any object if the object's public method support these operation.
::new (pObject) tValueType(first, first + buf.size() / sizeof(tValueType));
}
///\copydoc DWFArchive<T>::save(DWFInputAdapter& rOutputAdapter, tConstPointer p, tHandleType old)
static tHandleType save(DWFOutputAdapter& rOutputAdapter, tConstPointer p, tHandleType old)
{
DWFInputAdapter::tBufferType buf(p->size() * sizeof(tValueType));
std::copy(p->begin(), p->end(), (tPointer)&buf[0] ); //we have no need to store everything of the object, we just store enough information for restoration.
return rOutputAdapter.save(buf, old);
}
};
}
#endif //end _DWFCORE_ARCHIVE_H

View File

@@ -22,32 +22,32 @@
<ProjectName>WincmdContent</ProjectName>
<ProjectGuid>{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}</ProjectGuid>
<RootNamespace>filesys</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -21,7 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{18EC7157-E263-458C-A41C-52E9538A642F}</ProjectGuid>
<RootNamespace>filesys</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -29,26 +29,26 @@
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -22,28 +22,28 @@
<ProjectName>WincmdViewer</ProjectName>
<ProjectGuid>{92F5EB69-069C-43EA-97E7-2F6507AA5873}</ProjectGuid>
<RootNamespace>WINCDMDWF</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfAtl>false</UseOfAtl>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfAtl>false</UseOfAtl>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@@ -1,4 +1,31 @@
V4.27 09-09-2021
V4.41 23-09-2025
- UWVA#90681 Achtergrond van QR-codes instelbaar maken via BgGrayColor
V4.40 17-06-2024
- Visual Studio 2022
- SZDB#82496 plaatjes verkleinen met Resample2 ipv. Resample
- CIZN#82871 tekeningen met zwarte lijnen forceren (whipfile.forcePlanColor)
V4.30 23-08-2022
ZLMV#78395 Whip2DC ook correctie voor niet orthogonale Units
Whip2PNG.flags en Whipfile.flags ingevoerd. Whip2PNG.flags bitje +1 om bovenstaande te activeren
V4.29 30-01-2023
BLOS#76236 ArchiCad - ook Whip2DC z-co<63>rdinaat correctie van LUDE#30224 laten doen
V4.28 04-01-2022
BLOS#75830 ArchiCad - Tekstlabel in unicode
V4.27 14-12-2021
FCLT#63646 Graphics verbeteringen property 'UnmatchedLabels' tijdje geleden al toegevoegd.
V4.27 28-10-2021
FCLT#69128 Fontawesome iconen kunnen gebruiken als Graphics symbolen
V4.27 18-10-2021
- FCLT#69004 Label achtergrondkleur en alpha via [cff00ff,00ff00,128]
V4.27 15-10-2021
- FCLT#63646 Lijndikte van symbolen kunnen zetten
- FCLT#68480 Geen TIFF ondersteuning meer
- FCLT#69004 Labels pas op papercolor reageren (in plaats van contour kleur)

6
signDLL.bat Normal file
View File

@@ -0,0 +1,6 @@
if x%2==x GOTO bad
"c:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe" sign /fd sha256 /f ".\code_sign_aareonnl.pfx" /p %1 /d "Facilitor SLNKDWF" /du https://aareon.nl /t http://timestamp.digicert.com %2
GOTO end
:bad
ECHO Usage: %0 wachtwoord arxfile
:end