SLNKDWF 2.00
svn path=/Slnkdwf/trunk/; revision=12481
This commit is contained in:
BIN
FCLTDWF.Doc
Normal file
BIN
FCLTDWF.Doc
Normal file
Binary file not shown.
0
Redistribute/.gitignore
vendored
0
Redistribute/.gitignore
vendored
29
Redistribute/Dirinfo
Normal file
29
Redistribute/Dirinfo
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Programma's gemaakt met Visual C++ 2005 zijn afhankelijk van
|
||||||
|
|
||||||
|
MSVCR80.DLL en
|
||||||
|
MSVCP80.DLL
|
||||||
|
|
||||||
|
Daarvan zijn mij twee versies bekend
|
||||||
|
8.0.50608.0
|
||||||
|
8.0.50727.762
|
||||||
|
|
||||||
|
De originele Visual C++ 2005 genereert afhankelijkheid naar de 8.0.50608.0 versie van de DLL's.
|
||||||
|
Na Servicepack 1 is er een afhankelijkheid naar versie 8.0.50727.762
|
||||||
|
|
||||||
|
De versienummer afhankelijkheid wordt geforceerd door de Manifest die embedded
|
||||||
|
wordt in DLL's en of EXE's.
|
||||||
|
|
||||||
|
'Zo maar' de goede DLL's in C:\Windows\System32 zetten werkt niet en vooral: hoort niet.
|
||||||
|
Je wordt geacht (de goede) vcredist_86.exe te draaien die de DLL's installeert op de goede plek.
|
||||||
|
|
||||||
|
Onder Windows 2000 doet hij dat inderdaad ook nog in C:\Windows\System32
|
||||||
|
|
||||||
|
Onder Windows 2003 en XP worden ze netjes volgens de side-by-side methode
|
||||||
|
geinstalleerd onder C:\Windows\WinSxS
|
||||||
|
|
||||||
|
Als je de nieuwste van de twee installeert dan komt er onder c:\WINdows\winsxs\Policies
|
||||||
|
nog een bestandje wat versie 8.0.50608.0 redirect naar 8.0.50727.762
|
||||||
|
|
||||||
|
"c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\vcredist_x86.exe"
|
||||||
|
|
||||||
|
gdiplus.dll is included in Windows XP and Windows Server 2003
|
||||||
BIN
Redistribute/vcredist_x86.exe
Normal file
BIN
Redistribute/vcredist_x86.exe
Normal file
Binary file not shown.
BIN
Redistribute/vcredist_x86_SP1_8.0.50727.762.exe
Normal file
BIN
Redistribute/vcredist_x86_SP1_8.0.50727.762.exe
Normal file
Binary file not shown.
0
RemoveAbout/.gitignore
vendored
0
RemoveAbout/.gitignore
vendored
188
RemoveAbout/RemoveAbout.vcproj
Normal file
188
RemoveAbout/RemoveAbout.vcproj
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
Name="RemoveAbout"
|
||||||
|
ProjectGUID="{89BE476D-6C02-4514-BFCE-256106D98713}"
|
||||||
|
RootNamespace="RemoveAbout"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Forceer correcte _TIME_"
|
||||||
|
CommandLine="if exist $(TargetDir)\..\SlnkdwfCom\Release\about.obj del $(TargetDir)\..\SlnkdwfCom\Release\about.obj"
|
||||||
|
Outputs="."
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
65
RemoveAbout/RemoveAbout.vcproj.DIJKORAAD.jgl.user
Normal file
65
RemoveAbout/RemoveAbout.vcproj.DIJKORAAD.jgl.user
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioUserFile
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
ShowAllFiles="false"
|
||||||
|
>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
Command="$(TargetPath)"
|
||||||
|
WorkingDirectory=""
|
||||||
|
CommandArguments=""
|
||||||
|
Attach="false"
|
||||||
|
DebuggerType="3"
|
||||||
|
Remote="1"
|
||||||
|
RemoteMachine="PC53_JGL"
|
||||||
|
RemoteCommand=""
|
||||||
|
HttpUrl=""
|
||||||
|
PDBPath=""
|
||||||
|
SQLDebugging=""
|
||||||
|
Environment=""
|
||||||
|
EnvironmentMerge="true"
|
||||||
|
DebuggerFlavor=""
|
||||||
|
MPIRunCommand=""
|
||||||
|
MPIRunArguments=""
|
||||||
|
MPIRunWorkingDirectory=""
|
||||||
|
ApplicationCommand=""
|
||||||
|
ApplicationArguments=""
|
||||||
|
ShimCommand=""
|
||||||
|
MPIAcceptMode=""
|
||||||
|
MPIAcceptFilter=""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
Command="$(TargetPath)"
|
||||||
|
WorkingDirectory=""
|
||||||
|
CommandArguments=""
|
||||||
|
Attach="false"
|
||||||
|
DebuggerType="3"
|
||||||
|
Remote="1"
|
||||||
|
RemoteMachine="PC53_JGL"
|
||||||
|
RemoteCommand=""
|
||||||
|
HttpUrl=""
|
||||||
|
PDBPath=""
|
||||||
|
SQLDebugging=""
|
||||||
|
Environment=""
|
||||||
|
EnvironmentMerge="true"
|
||||||
|
DebuggerFlavor=""
|
||||||
|
MPIRunCommand=""
|
||||||
|
MPIRunArguments=""
|
||||||
|
MPIRunWorkingDirectory=""
|
||||||
|
ApplicationCommand=""
|
||||||
|
ApplicationArguments=""
|
||||||
|
ShimCommand=""
|
||||||
|
MPIAcceptMode=""
|
||||||
|
MPIAcceptFilter=""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
</VisualStudioUserFile>
|
||||||
95
SLNKDWF.sln
Normal file
95
SLNKDWF.sln
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||||
|
# Visual Studio 2005
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SLNKDWFViewer", "Standalone\SLNKDWFViewer.vcproj", "{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{6DFC9788-904C-4724-A734-06634061EF00} = {6DFC9788-904C-4724-A734-06634061EF00}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer", "Viewer\Viewer.vcproj", "{6DFC9788-904C-4724-A734-06634061EF00}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9} = {CF524F70-4DDD-4040-803B-41B5DE7B1CF9}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WincmdViewer", "WincmdViewer\WINCDMDWF.vcproj", "{92F5EB69-069C-43EA-97E7-2F6507AA5873}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{6DFC9788-904C-4724-A734-06634061EF00} = {6DFC9788-904C-4724-A734-06634061EF00}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WincmdContent", "WincmdContent\filesys.vcproj", "{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9} = {CF524F70-4DDD-4040-803B-41B5DE7B1CF9}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WincmdPacker", "WincmdPacker\WincmdPacker.vcproj", "{18EC7157-E263-458C-A41C-52E9538A642F}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{6EA5FCEC-1DB0-4542-8E41-9423021BD460} = {6EA5FCEC-1DB0-4542-8E41-9423021BD460}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SLNKDWFStaticRO", "SlnkDWFImpl\SLNKDWFStaticRO.vcproj", "{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SLNKDWFCom", "SlnkDWFCom\SLNKDWF.vcproj", "{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{89BE476D-6C02-4514-BFCE-256106D98713} = {89BE476D-6C02-4514-BFCE-256106D98713}
|
||||||
|
{6EA5FCEC-1DB0-4542-8E41-9423021BD460} = {6EA5FCEC-1DB0-4542-8E41-9423021BD460}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SLNKDWFStaticRW", "SlnkDWFImpl\SLNKDWFStaticRW.vcproj", "{6EA5FCEC-1DB0-4542-8E41-9423021BD460}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "SlnkDWFImpl\CxImage\tiff\Tiff.vcproj", "{B61F3CD8-D974-4127-8335-557650DA8B5E}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B0573FCD-8E98-421C-8BA3-F47CEB1F1047}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RemoveAbout", "RemoveAbout\RemoveAbout.vcproj", "{89BE476D-6C02-4514-BFCE-256106D98713}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{B2601E72-4FF4-4B9C-A89F-C2E7DACF36FD}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{6DFC9788-904C-4724-A734-06634061EF00}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{6DFC9788-904C-4724-A734-06634061EF00}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{6DFC9788-904C-4724-A734-06634061EF00}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6DFC9788-904C-4724-A734-06634061EF00}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{92F5EB69-069C-43EA-97E7-2F6507AA5873}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{2F492A95-A23D-45C9-BBD9-E5B9325B22C1}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{18EC7157-E263-458C-A41C-52E9538A642F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{18EC7157-E263-458C-A41C-52E9538A642F}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{18EC7157-E263-458C-A41C-52E9538A642F}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{18EC7157-E263-458C-A41C-52E9538A642F}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{CF524F70-4DDD-4040-803B-41B5DE7B1CF9}.Release|Win32.Build.0 = Release|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}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}.Release|Win32.Build.0 = Release|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}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6EA5FCEC-1DB0-4542-8E41-9423021BD460}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{B61F3CD8-D974-4127-8335-557650DA8B5E}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{89BE476D-6C02-4514-BFCE-256106D98713}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{89BE476D-6C02-4514-BFCE-256106D98713}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{89BE476D-6C02-4514-BFCE-256106D98713}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{89BE476D-6C02-4514-BFCE-256106D98713}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
0
SlnkDWFCom/.gitignore
vendored
0
SlnkDWFCom/.gitignore
vendored
96
SlnkDWFCom/About.cpp
Normal file
96
SlnkDWFCom/About.cpp
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
// About.cpp : Implementation of CAbout
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "About.h"
|
||||||
|
#include "SLNKDWFVersion.h"
|
||||||
|
|
||||||
|
#define SECURITY_WIN32
|
||||||
|
#include "Security.h"
|
||||||
|
|
||||||
|
// CAbout
|
||||||
|
extern HINSTANCE g_hInstance;
|
||||||
|
|
||||||
|
// In release mode verwijderen we altijd About.obj om hercompile te forceren
|
||||||
|
CString buildDATE(__DATE__);
|
||||||
|
CString buildTIME(__TIME__);
|
||||||
|
|
||||||
|
STDMETHODIMP CAbout::get_All(BSTR* pVal)
|
||||||
|
{
|
||||||
|
char module[_MAX_PATH]; // HMODULE
|
||||||
|
GetModuleFileName(g_hInstance, module, sizeof(module)/sizeof(char));
|
||||||
|
char name[_MAX_PATH]; // HMODULE
|
||||||
|
ULONG cnt = sizeof(name)/sizeof(char);
|
||||||
|
if (!GetUserNameEx(NameSamCompatible, name, &cnt))
|
||||||
|
{
|
||||||
|
myTRACE("\nGetUserNameEx failed (%d): %s", GetLastError(), myGetLastErrorMsg());
|
||||||
|
}
|
||||||
|
|
||||||
|
CString result;
|
||||||
|
result.Format(" SLNKDWF: built on %s, %s"
|
||||||
|
"\n DLL: %s"
|
||||||
|
"\nUsercontext: %s", buildDATE, buildTIME, module, name);
|
||||||
|
(*pVal) = result.AllocSysString();
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CAbout::get_DLLPath(BSTR* pVal)
|
||||||
|
{
|
||||||
|
char module[_MAX_PATH]; // HMODULE
|
||||||
|
GetModuleFileName(g_hInstance, module, sizeof(module));
|
||||||
|
|
||||||
|
CString result;
|
||||||
|
result.Format("%s", module);
|
||||||
|
(*pVal) = result.AllocSysString();
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CAbout::get_Buildtime(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CString result;
|
||||||
|
result.Format("%s, %s", buildDATE, buildTIME);
|
||||||
|
(*pVal) = result.AllocSysString();
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CAbout::get_UserContext(BSTR* pVal)
|
||||||
|
{
|
||||||
|
char name[_MAX_PATH]; // HMODULE
|
||||||
|
ULONG cnt = sizeof(name)/sizeof(char);
|
||||||
|
CString result;
|
||||||
|
if (!GetUserNameEx(NameSamCompatible, name, &cnt))
|
||||||
|
{
|
||||||
|
myTRACE("\nGetUserNameEx failed (%d): %s", GetLastError(), myGetLastErrorMsg());
|
||||||
|
result = "Unable to detect user";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
result = name;
|
||||||
|
|
||||||
|
(*pVal) = result.AllocSysString();
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CAbout::get_VersionMajor(LONG* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = SLNK_MAJOR_VERSION;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CAbout::get_VersionMinor(LONG* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = SLNK_MINOR_VERSION;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CAbout::get_VersionString(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CString result = SLNK_BUILDVERSION;
|
||||||
|
(*pVal) = result.AllocSysString();
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
52
SlnkDWFCom/About.h
Normal file
52
SlnkDWFCom/About.h
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
// About.h : Declaration of the CAbout
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
|
||||||
|
|
||||||
|
// CAbout
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CAbout :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CAbout, &CLSID_About>,
|
||||||
|
public IDispatchImpl<IAbout, &IID_IAbout, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CAbout()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DECLARE_REGISTRY_RESOURCEID(IDR_ABOUT)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CAbout)
|
||||||
|
COM_INTERFACE_ENTRY(IAbout)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
STDMETHOD(get_All)(BSTR* pVal);
|
||||||
|
STDMETHOD(get_DLLPath)(BSTR* pVal);
|
||||||
|
STDMETHOD(get_Buildtime)(BSTR* pVal);
|
||||||
|
STDMETHOD(get_UserContext)(BSTR* pVal);
|
||||||
|
STDMETHOD(get_VersionMajor)(LONG* pVal);
|
||||||
|
STDMETHOD(get_VersionMinor)(LONG* pVal);
|
||||||
|
STDMETHOD(get_VersionString)(BSTR* pVal);
|
||||||
|
};
|
||||||
|
|
||||||
|
OBJECT_ENTRY_AUTO(__uuidof(About), CAbout)
|
||||||
27
SlnkDWFCom/About.rgs
Normal file
27
SlnkDWFCom/About.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.About.1 = s 'About Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{2BA64B82-1A96-4F15-9815-40B291B505EB}'
|
||||||
|
}
|
||||||
|
SLNKDWF.About = s 'About Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{2BA64B82-1A96-4F15-9815-40B291B505EB}'
|
||||||
|
CurVer = s 'SLNKDWF.About.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {2BA64B82-1A96-4F15-9815-40B291B505EB} = s 'About Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.About.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.About'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
17
SlnkDWFCom/BoundingBox.cpp
Normal file
17
SlnkDWFCom/BoundingBox.cpp
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
// BoundingBox.cpp : Implementation of CBoundingBox
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "BoundingBox.h"
|
||||||
|
|
||||||
|
|
||||||
|
// CBoundingBox
|
||||||
|
|
||||||
|
STDMETHODIMP CBoundingBox::get_min(IDWGPoint** pVal)
|
||||||
|
{
|
||||||
|
return m_minPoint->QueryInterface(IID_IDWGPoint, (void**)pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CBoundingBox::get_max(IDWGPoint** pVal)
|
||||||
|
{
|
||||||
|
return m_maxPoint->QueryInterface(IID_IDWGPoint, (void**)pVal);
|
||||||
|
};
|
||||||
75
SlnkDWFCom/BoundingBox.h
Normal file
75
SlnkDWFCom/BoundingBox.h
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
// BoundingBox.h : Declaration of the CBoundingBox
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
#include "DWGPoint.h"
|
||||||
|
|
||||||
|
|
||||||
|
// CBoundingBox
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CBoundingBox :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CBoundingBox, &CLSID_BoundingBox>,
|
||||||
|
public IDispatchImpl<IBoundingBox, &IID_IBoundingBox, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CBoundingBox()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//REMOVED DECLARE_REGISTRY_RESOURCEID(IDR_BOUNDINGBOX)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CBoundingBox)
|
||||||
|
COM_INTERFACE_ENTRY(IBoundingBox)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Maak object m_minPoint
|
||||||
|
//
|
||||||
|
CComObject<CDWGPoint> *pDWGPoint;
|
||||||
|
HRESULT hr = CComObject<CDWGPoint>::CreateInstance(&pDWGPoint);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
pDWGPoint->AddRef();
|
||||||
|
hr = pDWGPoint->QueryInterface(IID_IDWGPoint, (void **)&m_minPoint);
|
||||||
|
pDWGPoint->Release();
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Maak object m_maxPoint
|
||||||
|
//
|
||||||
|
hr = CComObject<CDWGPoint>::CreateInstance(&pDWGPoint);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
pDWGPoint->AddRef();
|
||||||
|
hr = pDWGPoint->QueryInterface(IID_IDWGPoint, (void **)&m_maxPoint);
|
||||||
|
pDWGPoint->Release();
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
CComQIPtr<IDWGPoint> m_minPoint;
|
||||||
|
CComQIPtr<IDWGPoint> m_maxPoint;
|
||||||
|
|
||||||
|
public:
|
||||||
|
STDMETHOD(get_min)(IDWGPoint** pVal);
|
||||||
|
STDMETHOD(get_max)(IDWGPoint** pVal);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//REMOVED OBJECT_ENTRY_AUTO(__uuidof(BoundingBox), CBoundingBox)
|
||||||
27
SlnkDWFCom/BoundingBox.rgs
Normal file
27
SlnkDWFCom/BoundingBox.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.BoundingBox.1 = s 'BoundingBox Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{FCEF1E56-36FF-4F66-BEA5-FD08D860524F}'
|
||||||
|
}
|
||||||
|
SLNKDWF.BoundingBox = s 'BoundingBox Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{FCEF1E56-36FF-4F66-BEA5-FD08D860524F}'
|
||||||
|
CurVer = s 'SLNKDWF.BoundingBox.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {FCEF1E56-36FF-4F66-BEA5-FD08D860524F} = s 'BoundingBox Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.BoundingBox.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.BoundingBox'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
83
SlnkDWFCom/DWFFile.cpp
Normal file
83
SlnkDWFCom/DWFFile.cpp
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
// DWFFile.cpp : Implementation of CDWFFile
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "assert.h"
|
||||||
|
#include "DWFFile.h"
|
||||||
|
|
||||||
|
#include "myEPlotSection.h"
|
||||||
|
|
||||||
|
// CDWFFile
|
||||||
|
|
||||||
|
STDMETHODIMP CDWFFile::InterfaceSupportsErrorInfo(REFIID riid)
|
||||||
|
{
|
||||||
|
static const IID* arr[] =
|
||||||
|
{
|
||||||
|
&IID_IDWFFile
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
||||||
|
{
|
||||||
|
if (InlineIsEqualGUID(*arr[i],riid))
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
return S_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
//CDWFFile::~CDWFFile()
|
||||||
|
//{
|
||||||
|
// // It seems we never get here? Use FinalRelease
|
||||||
|
//};
|
||||||
|
|
||||||
|
HRESULT CDWFFile::FinalConstruct()
|
||||||
|
{
|
||||||
|
m_EPlotSections.SetParent(this);
|
||||||
|
m_EPlotSections.SetOuterUnknown(GetControllingUnknown());
|
||||||
|
return m_EPlotSections.FinalConstruct();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Omdat de tellingen gekoppeld zijn weten we zeker dat de refcount van
|
||||||
|
// onze eigen objecten ook 0 zal zijn en is het dus veilig ze weg te gooien (toch...?)
|
||||||
|
void CDWFFile::FinalRelease()
|
||||||
|
{
|
||||||
|
m_EPlotSections.FinalRelease();
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CDWFFile::Open(BSTR DWFPath)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (CDWFFileImpl::Open(CString(DWFPath)))
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
catch (CString& e)
|
||||||
|
{
|
||||||
|
return myAtlReportError (GetObjectCLSID(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CDWFFile::get_PropertiesXML(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CString s;
|
||||||
|
if (CDWFFileImpl::get_PropertiesXML(s))
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(s);
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CDWFFile::get_EPlotSections(IEPlotSections **ppEPlotSections)
|
||||||
|
{
|
||||||
|
// if (!m_isOpen)
|
||||||
|
// return myAtlReportError (GetObjectCLSID(), "\nDWF File is not opened");
|
||||||
|
|
||||||
|
return m_EPlotSections.QueryInterface(ppEPlotSections);
|
||||||
|
}
|
||||||
55
SlnkDWFCom/DWFFile.h
Normal file
55
SlnkDWFCom/DWFFile.h
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
// DWFFile.h : Declaration of the CDWFFile
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "DWFFileImpl.h"
|
||||||
|
|
||||||
|
#include "ComObjectEmbed.h"
|
||||||
|
#include "EPlotSections.h"
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
|
||||||
|
// CDWFFile
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CDWFFile :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CDWFFile, &CLSID_myDWFFile>,
|
||||||
|
public ISupportErrorInfo,
|
||||||
|
public IDispatchImpl<IDWFFile, &IID_IDWFFile, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>,
|
||||||
|
public CDWFFileImpl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CDWFFile()
|
||||||
|
{
|
||||||
|
m_EPlotSections.InitImpl(&(CDWFFileImpl::m_EPlotSections));
|
||||||
|
}
|
||||||
|
|
||||||
|
DECLARE_REGISTRY_RESOURCEID(IDR_DWFFILE)
|
||||||
|
DECLARE_GET_CONTROLLING_UNKNOWN() //ADDED
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CDWFFile)
|
||||||
|
COM_INTERFACE_ENTRY(IDWFFile)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
// ISupportsErrorInfo
|
||||||
|
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct();
|
||||||
|
|
||||||
|
void FinalRelease();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
CComObjectEmbed<CEPlotSections> m_EPlotSections;
|
||||||
|
|
||||||
|
public:
|
||||||
|
STDMETHOD(Open)(BSTR DWFPath);
|
||||||
|
STDMETHOD(get_PropertiesXML)(BSTR* pVal);
|
||||||
|
STDMETHOD(get_EPlotSections)(IEPlotSections **ppEPlotSections);
|
||||||
|
};
|
||||||
|
|
||||||
|
OBJECT_ENTRY_AUTO(__uuidof(myDWFFile), CDWFFile)
|
||||||
27
SlnkDWFCom/DWFFile.rgs
Normal file
27
SlnkDWFCom/DWFFile.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.DWFFile.1 = s 'DWFFile Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{BE2BCD58-4971-49E6-9A70-CDDD5C01224D}'
|
||||||
|
}
|
||||||
|
SLNKDWF.DWFFile = s 'DWFFile Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{BE2BCD58-4971-49E6-9A70-CDDD5C01224D}'
|
||||||
|
CurVer = s 'SLNKDWF.DWFFile.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {BE2BCD58-4971-49E6-9A70-CDDD5C01224D} = s 'DWFFile Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.DWFFile.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.DWFFile'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
32
SlnkDWFCom/DWGPoint.cpp
Normal file
32
SlnkDWFCom/DWGPoint.cpp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
// DWGPoint.cpp : Implementation of CDWGPoint
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "DWGPoint.h"
|
||||||
|
|
||||||
|
|
||||||
|
// CDWGPoint
|
||||||
|
|
||||||
|
STDMETHODIMP CDWGPoint::get_DwgX(DOUBLE* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_DwgX;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CDWGPoint::put_DwgX(DOUBLE newVal)
|
||||||
|
{
|
||||||
|
m_DwgX = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
STDMETHODIMP CDWGPoint::get_DwgY(DOUBLE* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_DwgY;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CDWGPoint::put_DwgY(DOUBLE newVal)
|
||||||
|
{
|
||||||
|
m_DwgY = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
51
SlnkDWFCom/DWGPoint.h
Normal file
51
SlnkDWFCom/DWGPoint.h
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
// DWGPoint.h : Declaration of the CDWGPoint
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
|
||||||
|
|
||||||
|
// CDWGPoint
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CDWGPoint :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CDWGPoint, &CLSID_DWGPoint>,
|
||||||
|
public IDispatchImpl<IDWGPoint, &IID_IDWGPoint, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CDWGPoint()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//REMOVED DECLARE_REGISTRY_RESOURCEID(IDR_DWGPOINT)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CDWGPoint)
|
||||||
|
COM_INTERFACE_ENTRY(IDWGPoint)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
double m_DwgX, m_DwgY;
|
||||||
|
|
||||||
|
public:
|
||||||
|
STDMETHOD(get_DwgX)(DOUBLE* pVal);
|
||||||
|
STDMETHOD(put_DwgX)(DOUBLE newVal);
|
||||||
|
STDMETHOD(get_DwgY)(DOUBLE* pVal);
|
||||||
|
STDMETHOD(put_DwgY)(DOUBLE newVal);
|
||||||
|
};
|
||||||
|
|
||||||
|
//REMOVED OBJECT_ENTRY_AUTO(__uuidof(DWGPoint), CDWGPoint)
|
||||||
27
SlnkDWFCom/DWGPoint.rgs
Normal file
27
SlnkDWFCom/DWGPoint.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.DWGPoint.1 = s 'DWGPoint Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{96301A8D-1DC9-4900-B89D-C745C4CAEFF4}'
|
||||||
|
}
|
||||||
|
SLNKDWF.DWGPoint = s 'DWGPoint Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{96301A8D-1DC9-4900-B89D-C745C4CAEFF4}'
|
||||||
|
CurVer = s 'SLNKDWF.DWGPoint.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {96301A8D-1DC9-4900-B89D-C745C4CAEFF4} = s 'DWGPoint Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.DWGPoint.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.DWGPoint'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
27
SlnkDWFCom/EPlotSection.rgs
Normal file
27
SlnkDWFCom/EPlotSection.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.EPlotSection.1 = s 'EPlotSection Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{F2599AE6-8A08-4B5E-9C68-BD975229F0D1}'
|
||||||
|
}
|
||||||
|
SLNKDWF.EPlotSection = s 'EPlotSection Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{F2599AE6-8A08-4B5E-9C68-BD975229F0D1}'
|
||||||
|
CurVer = s 'SLNKDWF.EPlotSection.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {F2599AE6-8A08-4B5E-9C68-BD975229F0D1} = s 'EPlotSection Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.EPlotSection.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.EPlotSection'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
59
SlnkDWFCom/EPlotSections.h
Normal file
59
SlnkDWFCom/EPlotSections.h
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
// EPlotSections.h : Declaration of the CEPlotSections
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
|
||||||
|
#include "EPlotSectionsImpl.h"
|
||||||
|
|
||||||
|
#include "ComObjectEmbed.h"
|
||||||
|
#include "myEPlotSection.h"
|
||||||
|
|
||||||
|
// CEPlotSections
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CEPlotSections :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CEPlotSections, &CLSID_EPlotSections>,
|
||||||
|
public ISupportErrorInfo,
|
||||||
|
public IDispatchImpl<IEPlotSections, &IID_IEPlotSections, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CEPlotSections()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DECLARE_GET_CONTROLLING_UNKNOWN() //ADDED
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CEPlotSections)
|
||||||
|
COM_INTERFACE_ENTRY(IEPlotSections)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
// ISupportsErrorInfo
|
||||||
|
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease() ;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
IDWFFile *m_pParent; // Non-addreffed!
|
||||||
|
CEPlotSectionsImpl *m_pSectionsImpl; // Pointer naar onderliggende sections
|
||||||
|
CAtlArray<CComObjectEmbed<CEPlotSection>> m_EPlotSections;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void InitImpl(CEPlotSectionsImpl *epl);
|
||||||
|
void SetParent(IDWFFile *pParent);
|
||||||
|
BOOL ProcessManifest(DWFToolkit::DWFManifest& rManifest, CString sourceDescription);
|
||||||
|
|
||||||
|
STDMETHODIMP get_Parent(IDWFFile **ppParent);
|
||||||
|
STDMETHOD(get_Count)(LONG* pVal);
|
||||||
|
STDMETHOD(get_Item)(LONG i, IDispatch** pVal);
|
||||||
|
};
|
||||||
27
SlnkDWFCom/EPlotSections.rgs
Normal file
27
SlnkDWFCom/EPlotSections.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.EPlotSections.1 = s 'EPlotSections Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{7B2E7661-9B9A-4217-A19E-745EFFF8E86D}'
|
||||||
|
}
|
||||||
|
SLNKDWF.EPlotSections = s 'EPlotSections Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{7B2E7661-9B9A-4217-A19E-745EFFF8E86D}'
|
||||||
|
CurVer = s 'SLNKDWF.EPlotSections.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {7B2E7661-9B9A-4217-A19E-745EFFF8E86D} = s 'EPlotSections Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.EPlotSections.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.EPlotSections'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
135
SlnkDWFCom/Metafile.cpp
Normal file
135
SlnkDWFCom/Metafile.cpp
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* File : Metafile.cpp (c) 1997-2002, Furix
|
||||||
|
*
|
||||||
|
* Author : J. Groot Lipman
|
||||||
|
* Project : BetterWMF
|
||||||
|
* Version : 4.00
|
||||||
|
*
|
||||||
|
* Function : Core file of BetterWMF. Contains all functions to convert a
|
||||||
|
* WMF-file or Clipboard object to a better one
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
#include "metafile.h"
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Static variables for CMetafile. Only temporary used for/in static playback
|
||||||
|
* procedures
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ==========================================================================
|
||||||
|
/*
|
||||||
|
|
||||||
|
FUNCTION : WriteMetaFileAsPlaceable
|
||||||
|
|
||||||
|
PARAMETERS : HMETAFILE - a handle to the metafile
|
||||||
|
LPCSTR lpstrOutFileName - filename to write to
|
||||||
|
|
||||||
|
PURPOSE : Write a metafile in placeable format
|
||||||
|
|
||||||
|
RETURNS : BOOL - TRUE is Success, FALSE is failure
|
||||||
|
|
||||||
|
COMMENTS : Fills out and writes a placeable header, followed by the
|
||||||
|
metafile bits, to the file.
|
||||||
|
|
||||||
|
HISTORY : 4/17/95 - Created
|
||||||
|
|
||||||
|
*/
|
||||||
|
BOOL CMetafile::WriteMetaFileAsPlaceable( HMETAFILE hOld, CSize Size, double Inch, LPCSTR lpstrOutFileName)
|
||||||
|
{
|
||||||
|
FILE *OutFile;
|
||||||
|
//OFSTRUCT outof;
|
||||||
|
|
||||||
|
DWORD dwSize;
|
||||||
|
LPBYTE pBits;
|
||||||
|
|
||||||
|
ALDUSMFHEADER pAldusMFHdr;
|
||||||
|
// Fill out the placeable header
|
||||||
|
pAldusMFHdr.key = ALDUS_KEY;
|
||||||
|
pAldusMFHdr.hmf = NULL;
|
||||||
|
pAldusMFHdr.inch = (unsigned short)Inch;
|
||||||
|
;
|
||||||
|
pAldusMFHdr.reserved = 0;
|
||||||
|
pAldusMFHdr.bbox.left = (short)0;
|
||||||
|
pAldusMFHdr.bbox.top = (short)0;
|
||||||
|
pAldusMFHdr.bbox.right = (short)Size.cx;
|
||||||
|
pAldusMFHdr.bbox.bottom = (short)Size.cy;
|
||||||
|
pAldusMFHdr.checksum = CalculateAPMCheckSum( pAldusMFHdr );
|
||||||
|
|
||||||
|
// Get the bits
|
||||||
|
if( (dwSize = GetMetaFileBitsEx( hOld, 0, NULL )) == 0 )
|
||||||
|
{
|
||||||
|
DeleteMetaFile( hOld );
|
||||||
|
// myErrorBox(NULL, "Failed to Get MetaFile Bits Size");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
// Allocate that much memory
|
||||||
|
if( (pBits = (LPBYTE) malloc( dwSize )) == NULL )
|
||||||
|
{
|
||||||
|
DeleteMetaFile( hOld );
|
||||||
|
// myErrorBox(NULL, "Failed to Allocate Memory for Metafile Bits");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
// Get the metafile bits
|
||||||
|
if( GetMetaFileBitsEx( hOld, dwSize, pBits ) == 0 )
|
||||||
|
{
|
||||||
|
free( pBits );
|
||||||
|
DeleteMetaFile( hOld );
|
||||||
|
// myErrorBox(NULL, "Failed to Get MetaFile Bits");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Error checking
|
||||||
|
// Open the file
|
||||||
|
OutFile = fopen( lpstrOutFileName, "wb" );
|
||||||
|
|
||||||
|
// Write the header
|
||||||
|
fwrite(&pAldusMFHdr, 1, sizeof( APMFILEHEADER ), OutFile);
|
||||||
|
|
||||||
|
// Write the bits
|
||||||
|
fwrite(pBits, 1, dwSize, OutFile );
|
||||||
|
|
||||||
|
// Close the file
|
||||||
|
fclose(OutFile);
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
free( pBits );
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
// End WriteMetaFileAsPlaceable
|
||||||
|
// ==========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
// ==========================================================================
|
||||||
|
/*
|
||||||
|
|
||||||
|
FUNCTION : CalculateAPMCheckSum
|
||||||
|
|
||||||
|
PARAMETERS : APMFILEHEADER apmfh - A placeable header
|
||||||
|
|
||||||
|
PURPOSE : Calculates the checksum for a placeable header
|
||||||
|
|
||||||
|
RETURNS : WORD - the checksum
|
||||||
|
|
||||||
|
COMMENTS : The checksum is derived by XORing each word.
|
||||||
|
|
||||||
|
HISTORY : 4/17/95 - Created
|
||||||
|
|
||||||
|
*/
|
||||||
|
WORD CMetafile::CalculateAPMCheckSum( ALDUSMFHEADER pAldusMFHdr )
|
||||||
|
{
|
||||||
|
LPWORD lpWord;
|
||||||
|
WORD wResult, i;
|
||||||
|
|
||||||
|
// Start with the first word
|
||||||
|
wResult = *(lpWord = (LPWORD)(&pAldusMFHdr));
|
||||||
|
// XOR in each of the other 9 words
|
||||||
|
for(i=1;i<=9;i++)
|
||||||
|
{
|
||||||
|
wResult ^= lpWord[i];
|
||||||
|
}
|
||||||
|
return wResult;
|
||||||
|
}
|
||||||
|
// End CalculateAPMCheckSum
|
||||||
|
// ==========================================================================
|
||||||
39
SlnkDWFCom/Metafile.h
Normal file
39
SlnkDWFCom/Metafile.h
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#ifndef __METAFILE_H_
|
||||||
|
#define __METAFILE_H_
|
||||||
|
|
||||||
|
#pragma pack(1)
|
||||||
|
//
|
||||||
|
//placeable metafile data definitions
|
||||||
|
//
|
||||||
|
typedef struct tagOLDRECT
|
||||||
|
{
|
||||||
|
short left;
|
||||||
|
short top;
|
||||||
|
short right;
|
||||||
|
short bottom;
|
||||||
|
} OLDRECT;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DWORD key;
|
||||||
|
WORD hmf;
|
||||||
|
OLDRECT bbox;
|
||||||
|
WORD inch;
|
||||||
|
DWORD reserved;
|
||||||
|
WORD checksum;
|
||||||
|
} ALDUSMFHEADER, * LPALDUSMFHEADER, APMFILEHEADER;
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
|
#define OFFSET_TO_META sizeof (ALDUSMFHEADER)
|
||||||
|
#define METAHEADER_SIZE sizeof (METAHEADER)
|
||||||
|
#define ALDUS_KEY 0x9AC6CDD7
|
||||||
|
|
||||||
|
class CMetafile
|
||||||
|
{
|
||||||
|
// Operations
|
||||||
|
public:
|
||||||
|
static BOOL WriteMetaFileAsPlaceable( HMETAFILE hOld, CSize Size, double Inch, LPCSTR lpstrOutFileName);
|
||||||
|
static WORD CalculateAPMCheckSum( ALDUSMFHEADER pAldusMFHdr );
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __METAFILE_H_
|
||||||
50
SlnkDWFCom/Options.cpp
Normal file
50
SlnkDWFCom/Options.cpp
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
// Options.cpp : Implementation of COptions
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "Options.h"
|
||||||
|
|
||||||
|
CSLNKOptions g_SLNKOptions; // The one and only
|
||||||
|
|
||||||
|
// Set all default values
|
||||||
|
CSLNKOptions::CSLNKOptions()
|
||||||
|
{
|
||||||
|
m_MinContSize = 0.20e6; // Minimale grootte voor een contour om herkend te worden
|
||||||
|
m_SkipContLeader = FALSE; // ARKEY tekeningen hebben een leading lijntje voor de contour
|
||||||
|
}
|
||||||
|
// COptions
|
||||||
|
|
||||||
|
STDMETHODIMP COptions::InterfaceSupportsErrorInfo(REFIID riid)
|
||||||
|
{
|
||||||
|
static const IID* arr[] =
|
||||||
|
{
|
||||||
|
&IID_IOptions
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
||||||
|
{
|
||||||
|
if (InlineIsEqualGUID(*arr[i],riid))
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
return S_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP COptions::SetOption(BSTR optionName, VARIANT OptionValue)
|
||||||
|
{
|
||||||
|
CComVariant val(OptionValue);
|
||||||
|
CString nm(optionName);
|
||||||
|
nm.MakeUpper();
|
||||||
|
|
||||||
|
if (nm=="MINCONTSIZE")
|
||||||
|
{
|
||||||
|
HRESULT hr = val.ChangeType(VT_R8);
|
||||||
|
if (FAILED(hr)) return hr;
|
||||||
|
g_SLNKOptions.m_MinContSize = val.dblVal;
|
||||||
|
}
|
||||||
|
if (nm=="SKIPCONTLEADER")
|
||||||
|
{
|
||||||
|
HRESULT hr = val.ChangeType(VT_BOOL);
|
||||||
|
if (FAILED(hr)) return hr;
|
||||||
|
g_SLNKOptions.m_SkipContLeader = val.boolVal;
|
||||||
|
}
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
66
SlnkDWFCom/Options.h
Normal file
66
SlnkDWFCom/Options.h
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
// Options.h : Declaration of the COptions
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
|
||||||
|
#error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
class CSLNKOptions
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CSLNKOptions();
|
||||||
|
|
||||||
|
double m_MinContSize; // In DWG Units
|
||||||
|
BOOL m_SkipContLeader; //
|
||||||
|
};
|
||||||
|
extern CSLNKOptions g_SLNKOptions; // The one and only
|
||||||
|
|
||||||
|
// COptions
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE COptions :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<COptions, &CLSID_Options>,
|
||||||
|
public ISupportErrorInfo,
|
||||||
|
public IDispatchImpl<IOptions, &IID_IOptions, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
COptions()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DECLARE_REGISTRY_RESOURCEID(IDR_OPTIONS)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(COptions)
|
||||||
|
COM_INTERFACE_ENTRY(IOptions)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
// ISupportsErrorInfo
|
||||||
|
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
STDMETHOD(SetOption)(BSTR optionName, VARIANT OptionValue);
|
||||||
|
};
|
||||||
|
|
||||||
|
OBJECT_ENTRY_AUTO(__uuidof(Options), COptions)
|
||||||
26
SlnkDWFCom/Options.rgs
Normal file
26
SlnkDWFCom/Options.rgs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.Options.1 = s 'Options Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{168678A9-6FA7-49C3-B839-DFDF07E0A79A}'
|
||||||
|
}
|
||||||
|
SLNKDWF.Options = s 'Options Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{168678A9-6FA7-49C3-B839-DFDF07E0A79A}'
|
||||||
|
CurVer = s 'SLNKDWF.Options.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {168678A9-6FA7-49C3-B839-DFDF07E0A79A} = s 'Options Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.Options.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.Options'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
138
SlnkDWFCom/SLNKContour.cpp
Normal file
138
SlnkDWFCom/SLNKContour.cpp
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
// SLNKContour.cpp : Implementation of CSLNKContour
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "SLNKContour.h"
|
||||||
|
#include "Whipfile.h"
|
||||||
|
|
||||||
|
// Merk op dat sommige functies ook nog in WhipFile zijn gedefinieerd. Die moeten daar weg omdat we
|
||||||
|
// tegenwoordig (mei 2007) via WhipFile.Contour("label") een Contour object opleveren waar je alles
|
||||||
|
// maar op doet, of beter nog mettertijd WhipFile.Contours.Item("label")
|
||||||
|
// Voor backward compatibiliteit laten we de Whipfile nog maar even intact
|
||||||
|
|
||||||
|
// CSLNKContour
|
||||||
|
|
||||||
|
void CSLNKContour::SetImpl(CSLNKContourImpl * pSLNKContour)
|
||||||
|
{
|
||||||
|
m_SLNKContour = pSLNKContour;
|
||||||
|
if (m_SLNKContour->m_fromSymbol) return; // Die zijn vast nog niet getransformeerd
|
||||||
|
|
||||||
|
WT_Logical_Box bx = pSLNKContour->bounds();
|
||||||
|
|
||||||
|
WT_Point3D dwgPt;
|
||||||
|
CComQIPtr<IDWGPoint> pt;
|
||||||
|
|
||||||
|
dwgPt = pSLNKContour->m_parentWhipFileState->m_contunits.transform(bx.minpt());
|
||||||
|
m_dwgBounding->get_min(&pt);
|
||||||
|
pt->put_DwgX(dwgPt.m_x);
|
||||||
|
pt->put_DwgY(dwgPt.m_y);
|
||||||
|
pt.Release();
|
||||||
|
|
||||||
|
dwgPt = pSLNKContour->m_parentWhipFileState->m_contunits.transform(bx.maxpt());
|
||||||
|
m_dwgBounding->get_max(&pt);
|
||||||
|
pt->put_DwgX(dwgPt.m_x);
|
||||||
|
pt->put_DwgY(dwgPt.m_y);
|
||||||
|
pt.Release();
|
||||||
|
|
||||||
|
WT_Logical_Point lp = CSLNKContourImpl::Centroid(*pSLNKContour);
|
||||||
|
dwgPt = pSLNKContour->m_parentWhipFileState->m_contunits.transform(lp);
|
||||||
|
m_dwgCenter->put_DwgX(dwgPt.m_x);
|
||||||
|
m_dwgCenter->put_DwgY(dwgPt.m_y);
|
||||||
|
};
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::SetColor(ULONG rgb, BYTE Alpha /*=0*/)
|
||||||
|
{
|
||||||
|
int b=rgb%256;
|
||||||
|
int g=(rgb>>8)%256;
|
||||||
|
int r=(rgb>>16)%256;
|
||||||
|
m_SLNKContour->m_Color.set(r, g, b, Alpha);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// De FriendlyName verschijnt uiteindelijk als tooltip
|
||||||
|
STDMETHODIMP CSLNKContour::SetUrl(BSTR Url, BSTR FriendlyName)
|
||||||
|
{
|
||||||
|
CString fName(FriendlyName);
|
||||||
|
if (fName=="")
|
||||||
|
fName=m_SLNKContour->m_contLabel.ascii();
|
||||||
|
|
||||||
|
// Merk op: \n lijkt \012 te zijn?
|
||||||
|
fName.Replace("\012", "\\n"); // Anders corrupte (ascii?) DWF
|
||||||
|
fName.Replace("\015", "\\n"); // Anders corrupte (ascii?) DWF
|
||||||
|
|
||||||
|
if (WT_String::is_ascii(fName.GetLength(), fName))
|
||||||
|
m_SLNKContour->m_Url.set( WD_URL_Optimize, (LPCSTR)CString(Url), (LPCSTR)fName);
|
||||||
|
else
|
||||||
|
{ // Use UNICODE for example for Micha<68>l
|
||||||
|
CStringW s(fName);
|
||||||
|
m_SLNKContour->m_Url.set( WD_URL_Optimize, Url, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::get_Area(DOUBLE* pVal)
|
||||||
|
{
|
||||||
|
*pVal = m_SLNKContour->m_DWGArea;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::get_Extents(IBoundingBox** pVal)
|
||||||
|
{
|
||||||
|
if (m_SLNKContour->m_fromSymbol)
|
||||||
|
return E_NOTIMPL; // (nog) niet op symbolen
|
||||||
|
|
||||||
|
return m_dwgBounding->QueryInterface(IID_IBoundingBox, (void**)pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::get_Center(IDWGPoint** pVal)
|
||||||
|
{
|
||||||
|
if (m_SLNKContour->m_fromSymbol)
|
||||||
|
return E_NOTIMPL; // (nog) niet op symbolen
|
||||||
|
return m_dwgCenter->QueryInterface(IID_IDWGPoint, (void**)pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::get_Key(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(m_SLNKContour->m_Key);
|
||||||
|
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::put_Key(BSTR newVal)
|
||||||
|
{
|
||||||
|
CString key(newVal);
|
||||||
|
m_SLNKContour->m_Key = key;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::get_Label(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(m_SLNKContour->m_ExtraLabel);
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::put_Label(BSTR newVal)
|
||||||
|
{
|
||||||
|
CString key(newVal);
|
||||||
|
m_SLNKContour->m_ExtraLabel = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::get_Hatch(BYTE* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_SLNKContour->m_Pattern;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKContour::put_Hatch(BYTE newVal)
|
||||||
|
{
|
||||||
|
WT_Fill_Pattern patt = WT_Fill_Pattern((WT_Fill_Pattern::WT_Pattern_ID)newVal);
|
||||||
|
m_SLNKContour->m_Pattern.set(patt);
|
||||||
|
//contour->m_Pattern.pattern_scale() = 1.0;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
104
SlnkDWFCom/SLNKContour.h
Normal file
104
SlnkDWFCom/SLNKContour.h
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
// SLNKContour.h : Declaration of the CSLNKContour
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
#include "SLNKContourImpl.h"
|
||||||
|
#include "BoundingBox.h"
|
||||||
|
|
||||||
|
#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
|
||||||
|
#error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// CSLNKContour
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CSLNKContour :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CSLNKContour, &CLSID_SLNKContour>,
|
||||||
|
public IDispatchImpl<ISLNKContour, &IID_ISLNKContour, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CSLNKContour()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//REMOVED DECLARE_REGISTRY_RESOURCEID(IDR_SLNKCONTOUR)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CSLNKContour)
|
||||||
|
COM_INTERFACE_ENTRY(ISLNKContour)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Maak object m_dwgBounding
|
||||||
|
//
|
||||||
|
CComObject<CBoundingBox> *pBoundingBox;
|
||||||
|
HRESULT hr = CComObject<CBoundingBox>::CreateInstance(&pBoundingBox);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
pBoundingBox->AddRef();
|
||||||
|
hr = pBoundingBox->QueryInterface(IID_IBoundingBox, (void **)&m_dwgBounding);
|
||||||
|
pBoundingBox->Release();
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Maak object m_dwgCenter
|
||||||
|
//
|
||||||
|
CComObject<CDWGPoint> *pDWGPoint;
|
||||||
|
hr = CComObject<CDWGPoint>::CreateInstance(&pDWGPoint);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
pDWGPoint->AddRef();
|
||||||
|
hr = pDWGPoint->QueryInterface(IID_IDWGPoint, (void **)&m_dwgCenter);
|
||||||
|
pDWGPoint->Release();
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deze SLNKContour wijst naar een CSLNKContourImpl in een WhipFile object. We moeten voorkomen
|
||||||
|
// dat deze te snel uit de scope wegvalt. Dat doen we mbv SetParent
|
||||||
|
// Omgekeerd is geen probleem: de WhipFile verwijst niet(!) naar de CSLNKContour en heeft er dus
|
||||||
|
// geen last van dat die wegvalt (van zijn SLNKContourImpl objecten is hij gewoon eigenaar)
|
||||||
|
|
||||||
|
void SetParent(IWhipFile *pParent)
|
||||||
|
{
|
||||||
|
HRESULT hr = pParent->QueryInterface(IID_IWhipFile, (void **)&m_parent_iWhipFile);
|
||||||
|
};
|
||||||
|
void SetImpl(CSLNKContourImpl * pSLNKContour);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CSLNKContourImpl * m_SLNKContour;
|
||||||
|
CComQIPtr<IDWGPoint> m_dwgCenter;
|
||||||
|
CComQIPtr<IBoundingBox> m_dwgBounding;
|
||||||
|
CComQIPtr<IWhipFile> m_parent_iWhipFile; // Om scope levend te houden
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
STDMETHOD(SetColor)(ULONG rgb, BYTE Alpha);
|
||||||
|
STDMETHOD(SetUrl) (BSTR Url, BSTR FriendlyName);
|
||||||
|
STDMETHOD(get_Area)(DOUBLE* pVal);
|
||||||
|
STDMETHOD(get_Extents)(IBoundingBox** pVal);
|
||||||
|
STDMETHOD(get_Center)(IDWGPoint** pVal);
|
||||||
|
STDMETHOD(get_Key)(BSTR* pVal);
|
||||||
|
STDMETHOD(put_Key)(BSTR newVal);
|
||||||
|
STDMETHOD(get_Label)(BSTR* pVal);
|
||||||
|
STDMETHOD(put_Label)(BSTR newVal);
|
||||||
|
STDMETHOD(get_Hatch)(BYTE* pVal);
|
||||||
|
STDMETHOD(put_Hatch)(BYTE newVal);
|
||||||
|
};
|
||||||
|
|
||||||
|
//REMOVED OBJECT_ENTRY_AUTO(__uuidof(SLNKContour), CSLNKContour)
|
||||||
26
SlnkDWFCom/SLNKContour.rgs
Normal file
26
SlnkDWFCom/SLNKContour.rgs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWFCom.SLNKContour.1 = s 'SLNKContour Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{476C0F28-5860-485D-BEBD-D03F68E1C930}'
|
||||||
|
}
|
||||||
|
SLNKDWFCom.SLNKContour = s 'SLNKContour Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{476C0F28-5860-485D-BEBD-D03F68E1C930}'
|
||||||
|
CurVer = s 'SLNKDWFCom.SLNKContour.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {476C0F28-5860-485D-BEBD-D03F68E1C930} = s 'SLNKContour Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWFCom.SLNKContour.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWFCom.SLNKContour'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
115
SlnkDWFCom/SLNKDWF.cpp
Normal file
115
SlnkDWFCom/SLNKDWF.cpp
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
// SLNKDWF.cpp : Implementation of DLL Exports.
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
#include "resource.h"
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
#include "dlldatax.h"
|
||||||
|
|
||||||
|
// Detect Memory Leaks
|
||||||
|
#ifdef _DEBUG
|
||||||
|
//CMemLeakDetect memLeakDetect;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
HINSTANCE g_hInstance;
|
||||||
|
extern CString buildDATE;
|
||||||
|
extern CString buildTIME;
|
||||||
|
|
||||||
|
class CSLNKDWFModule : public CAtlDllModuleT< CSLNKDWFModule >
|
||||||
|
{
|
||||||
|
public :
|
||||||
|
DECLARE_LIBID(LIBID_SLNKDWFLib)
|
||||||
|
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_SLNKDWF, "{71B32202-1B68-4E92-9C86-8F53FB298011}")
|
||||||
|
};
|
||||||
|
|
||||||
|
CSLNKDWFModule _AtlModule;
|
||||||
|
|
||||||
|
|
||||||
|
// DLL Entry Point
|
||||||
|
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
||||||
|
{
|
||||||
|
g_hInstance = hInstance;
|
||||||
|
char module[_MAX_PATH]; // HMODULE
|
||||||
|
|
||||||
|
GetModuleFileName(g_hInstance, module, sizeof(module));
|
||||||
|
|
||||||
|
char *txt;
|
||||||
|
switch (dwReason)
|
||||||
|
{
|
||||||
|
case DLL_PROCESS_ATTACH: txt = "DLL_PROCESS_ATTACH"; break;
|
||||||
|
case DLL_PROCESS_DETACH: txt = "DLL_PROCESS_DETACH"; break;
|
||||||
|
case DLL_THREAD_ATTACH: txt = "DLL_THREAD_ATTACH"; break;
|
||||||
|
case DLL_THREAD_DETACH: txt = "DLL_THREAD_DETACH"; break;
|
||||||
|
default: txt = "UNKNOWN reason";
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD pid = GetCurrentProcessId();
|
||||||
|
if (dwReason == DLL_PROCESS_ATTACH)
|
||||||
|
myDoTRACE("\nLoading SLNKDWF: built on %s, %s"
|
||||||
|
"\n DLL: %s"
|
||||||
|
"\n PID: %d"
|
||||||
|
// "\n Handle: %x\n"
|
||||||
|
, buildDATE, buildTIME, module, pid, hInstance);
|
||||||
|
// else
|
||||||
|
// myDoTRACE("\nUn/Loading SLNKDWF handle %x, reason %s", hInstance, txt);
|
||||||
|
|
||||||
|
#ifdef _MERGE_PROXYSTUB
|
||||||
|
if (!PrxDllMain(hInstance, dwReason, lpReserved))
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
|
hInstance;
|
||||||
|
return _AtlModule.DllMain(dwReason, lpReserved);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Used to determine whether the DLL can be unloaded by OLE
|
||||||
|
STDAPI DllCanUnloadNow(void)
|
||||||
|
{
|
||||||
|
#ifdef _MERGE_PROXYSTUB
|
||||||
|
HRESULT hr = PrxDllCanUnloadNow();
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
#endif
|
||||||
|
return _AtlModule.DllCanUnloadNow();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Returns a class factory to create an object of the requested type
|
||||||
|
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
|
||||||
|
{
|
||||||
|
#ifdef _MERGE_PROXYSTUB
|
||||||
|
if (PrxDllGetClassObject(rclsid, riid, ppv) == S_OK)
|
||||||
|
return S_OK;
|
||||||
|
#endif
|
||||||
|
return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// DllRegisterServer - Adds entries to the system registry
|
||||||
|
STDAPI DllRegisterServer(void)
|
||||||
|
{
|
||||||
|
// registers object, typelib and all interfaces in typelib
|
||||||
|
HRESULT hr = _AtlModule.DllRegisterServer();
|
||||||
|
#ifdef _MERGE_PROXYSTUB
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
hr = PrxDllRegisterServer();
|
||||||
|
#endif
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// DllUnregisterServer - Removes entries from the system registry
|
||||||
|
STDAPI DllUnregisterServer(void)
|
||||||
|
{
|
||||||
|
HRESULT hr = _AtlModule.DllUnregisterServer();
|
||||||
|
#ifdef _MERGE_PROXYSTUB
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
hr = PrxDllRegisterServer();
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
hr = PrxDllUnregisterServer();
|
||||||
|
#endif
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
9
SlnkDWFCom/SLNKDWF.def
Normal file
9
SlnkDWFCom/SLNKDWF.def
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
; SLNKDWF.def : Declares the module parameters.
|
||||||
|
|
||||||
|
LIBRARY "SLNKDWF.DLL"
|
||||||
|
|
||||||
|
EXPORTS
|
||||||
|
DllCanUnloadNow PRIVATE
|
||||||
|
DllGetClassObject PRIVATE
|
||||||
|
DllRegisterServer PRIVATE
|
||||||
|
DllUnregisterServer PRIVATE
|
||||||
364
SlnkDWFCom/SLNKDWF.idl
Normal file
364
SlnkDWFCom/SLNKDWF.idl
Normal file
@@ -0,0 +1,364 @@
|
|||||||
|
// SLNKDWF.idl : IDL source for SLNKDWF
|
||||||
|
//
|
||||||
|
|
||||||
|
// This file will be processed by the MIDL tool to
|
||||||
|
// produce the type library (SLNKDWF.tlb) and marshalling code.
|
||||||
|
|
||||||
|
#include "olectl.h"
|
||||||
|
import "oaidl.idl";
|
||||||
|
import "ocidl.idl";
|
||||||
|
|
||||||
|
|
||||||
|
interface IEPlotSection;
|
||||||
|
interface IEPlotSections;
|
||||||
|
interface ISLNKEvent;
|
||||||
|
interface IBoundingBox;
|
||||||
|
interface IDWGPoint;
|
||||||
|
//interface IChild;
|
||||||
|
//interface ISubChild;
|
||||||
|
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(3C57EFD2-B1A1-4B70-A6B2-14D05401F458),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IDWFFile Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IDWFFile : IDispatch{
|
||||||
|
[id(1), helpstring("method Open")] HRESULT Open(BSTR DWFPath);
|
||||||
|
[propget, id(9), helpstring("property PropertiesXML")] HRESULT PropertiesXML([out, retval] BSTR* pVal);
|
||||||
|
[propget, id(10), helpstring("property EPlotSections")] HRESULT EPlotSections([out,retval] IEPlotSections **ppEPlotSections);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(B0C6AC9F-3D1E-4489-9CE9-436A220ED12F),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IWhipFile Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IWhipFile : IDispatch{
|
||||||
|
[id(1), helpstring("method Load")] HRESULT Load([in] BSTR WhipPath);
|
||||||
|
[id(2), helpstring("method LoadStream")] HRESULT LoadStream([in] VARIANT EPlotStream);
|
||||||
|
[id(3), helpstring("method SaveAs")] HRESULT SaveAs([in] BSTR WhipPath);
|
||||||
|
[id(4), helpstring("method SetLabel")] HRESULT SetLabel([in] BSTR IdentLabel, [in] BSTR ExtraLabel);
|
||||||
|
[id(5), helpstring("method SetColor")] HRESULT SetColor([in] BSTR IdentLabel, [in] ULONG rgb, [in, defaultvalue(0)] BYTE Alpha);
|
||||||
|
[id(8), helpstring("method SetLabelFont")] HRESULT SetLabelFont([in] BSTR FontName, [in] DOUBLE FontHeight, [in, defaultvalue(0)] DOUBLE FontHeightSymbols);
|
||||||
|
[id(9), helpstring("method SetLabelPosition")] HRESULT SetLabelPosition([in, defaultvalue(1)] BYTE LabelPos);
|
||||||
|
[propget, id(10), helpstring("method ContoursXML")] HRESULT ContoursXML([out, retval] BSTR* pVal);
|
||||||
|
[id(12), helpstring("method SetLayers")] HRESULT SetLayers([in] BSTR reContouren, [in] BSTR reLabels);
|
||||||
|
[propget, id(14), helpstring("property AddSymbol")] HRESULT AddSymbol([in] DOUBLE dwgX, [in] DOUBLE dwgY, BSTR symbolName, [out, retval] IUnknown** pVal);
|
||||||
|
[id(15), helpstring("method DefineSymbol")] HRESULT DefineSymbol([in] BSTR symbolName, [in] VARIANT EPlotStream);
|
||||||
|
[id(16), helpstring("method DefineBitmapSymbol")] HRESULT DefineBitmapSymbol([in] BSTR symbolName, [in] BSTR symbolPath, [in] DOUBLE height);
|
||||||
|
[propget, id(17), helpstring("property Contour")] HRESULT Contour([in] BSTR IdentLabel, [out, retval] IUnknown** pVal);
|
||||||
|
[id(18), helpstring("method SetFilterLayers")] HRESULT SetFilterLayers([in] BSTR reLayers);
|
||||||
|
[propget, id(19), helpstring("property hintScale")] HRESULT hintScale([out, retval] DOUBLE* pVal);
|
||||||
|
[propput, id(19), helpstring("property hintScale")] HRESULT hintScale([in] DOUBLE newVal);
|
||||||
|
[propget, id(20), helpstring("property FindInContour")] HRESULT FindInContour([in] DOUBLE dwgX, [in] DOUBLE dwgY, [out, retval] BSTR* pVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(FB9CAA9B-CA0A-4BF0-AA2C-47579BEFA214),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IWhip2PNG Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IWhip2PNG : IDispatch{
|
||||||
|
[id(1), helpstring("method Load")] HRESULT Load([in] BSTR WhipPath);
|
||||||
|
[id(2), helpstring("method SaveAsPng")] HRESULT SaveAsPNG([in] BSTR PNGPath);
|
||||||
|
[id(3), helpstring("method SaveAsWMF")] HRESULT SaveAsWMF([in] BSTR WMFPath);
|
||||||
|
[id(4), helpstring("method Find")] HRESULT Find([in] LONG findX, [in] LONG findY, [out, retval] BSTR* foundLabel);
|
||||||
|
[id(5), helpstring("method SetDimensions")] HRESULT SetDimensions([in] LONG sizeX,
|
||||||
|
[in] LONG sizeY, [in] LONG offsetX, [in] LONG offsetY, [in] DOUBLE dScale, [in, defaultvalue(0)] LONG lRotation);
|
||||||
|
[id(6), helpstring("method GetAsMap")] HRESULT GetAsMap( [out, retval] BSTR* AsMap);
|
||||||
|
// [id(7), helpstring("method FindCoords")] HRESULT FindCoords([in] LONG findX, [in] LONG findY, [out] VARIANT* dwgX, [out] VARIANT* dwgY);
|
||||||
|
[propget, id(8), helpstring("property AtlRegExp")] HRESULT AtlRegExp([in] BSTR RegExp, [in] BSTR TestExp, [out, retval] BSTR* pVal);
|
||||||
|
[id(9), helpstring("method TextAsPNG")] HRESULT TextAsPNG(BSTR Message, [out, retval] VARIANT *ImageData);
|
||||||
|
[id(10), helpstring("property GetAsPNG")] HRESULT GetAsPNG([out, retval] VARIANT *ImageData);
|
||||||
|
[id(11), helpstring("property GetAsTransGIF")] HRESULT GetAsTransGIF([out, retval] VARIANT *ImageData);
|
||||||
|
[id(12), helpstring("method LoadStream")] HRESULT LoadStream([in] VARIANT DWFStream);
|
||||||
|
[id(13), helpstring("method SetLayers")] HRESULT SetLayers([in] BSTR RegExp);
|
||||||
|
[propget, id(14), helpstring("property forceBW2")] HRESULT forceBW([out, retval] VARIANT_BOOL* pVal);
|
||||||
|
[propput, id(14), helpstring("property forceBW2")] HRESULT forceBW([in] VARIANT_BOOL newVal);
|
||||||
|
[propget, id(15), helpstring("property SLNKEvent")] HRESULT SLNKEvent([out, retval] ISLNKEvent** pVal);
|
||||||
|
[propget, id(16), helpstring("property paperColor")] HRESULT paperColor([out, retval] LONG* pVal);
|
||||||
|
[propput, id(16), helpstring("property paperColor")] HRESULT paperColor([in] LONG newVal);
|
||||||
|
[id(17), helpstring("method ReplaceColor")] HRESULT ReplaceColor([in] LONG paperColor, [in] LONG oldColor, [in] LONG newColor);
|
||||||
|
[propget, id(18), helpstring("property Maximize")] HRESULT Maximize([out, retval] VARIANT_BOOL* pVal);
|
||||||
|
[propput, id(18), helpstring("property Maximize")] HRESULT Maximize([in] VARIANT_BOOL newVal);
|
||||||
|
[propget, id(19), helpstring("property dwgScale")] HRESULT dwgScale([out, retval] DOUBLE* pVal);
|
||||||
|
[propput, id(19), helpstring("property dwgScale")] HRESULT dwgScale([in] DOUBLE newVal);
|
||||||
|
[propget, id(21), helpstring("property forceGray")] HRESULT forceGray([out, retval] VARIANT_BOOL* pVal);
|
||||||
|
[propput, id(21), helpstring("property forceGray")] HRESULT forceGray([in] VARIANT_BOOL newVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(68FBB9BF-FD4C-42D4-9670-459CCF7480BE),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IAbout Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IAbout : IDispatch{
|
||||||
|
[propget, id(1), helpstring("property All")] HRESULT All([out, retval] BSTR* pVal);
|
||||||
|
[propget, id(2), helpstring("property DLLPath")] HRESULT DLLPath([out, retval] BSTR* pVal);
|
||||||
|
[propget, id(3), helpstring("property Buildtime")] HRESULT Buildtime([out, retval] BSTR* pVal);
|
||||||
|
[propget, id(4), helpstring("property UserContext")] HRESULT UserContext([out, retval] BSTR* pVal);
|
||||||
|
[propget, id(5), helpstring("property VersionMajor")] HRESULT VersionMajor([out, retval] LONG* pVal);
|
||||||
|
[propget, id(6), helpstring("property VersionMinor")] HRESULT VersionMinor([out, retval] LONG* pVal);
|
||||||
|
[propget, id(7), helpstring("property VersionString")] HRESULT VersionString([out, retval] BSTR* pVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(99560CEF-C2CE-4CB3-AE7F-6AD6CE72CC97),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IEPlotSection Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IEPlotSection : IDispatch{
|
||||||
|
// [id(1), helpstring("method Init"),hidden] HRESULT Init([in] long *ptr);
|
||||||
|
// [id(2), helpstring("method GetEPlotSection"),hidden] HRESULT GetEPlotSection([out] long **ptr);
|
||||||
|
[propget, helpstring("My Parent")] HRESULT Parent([out, retval] IEPlotSections **ppParent);
|
||||||
|
[propget, id(3), helpstring("property Name")] HRESULT Name([out, retval] BSTR* pVal);
|
||||||
|
[propget, id(4), helpstring("property Title")] HRESULT Title([out, retval] BSTR* pVal);
|
||||||
|
[local]
|
||||||
|
[id(6), helpstring("method Read")] HRESULT
|
||||||
|
Read([out, size_is(cb), length_is(*pcbRead)]void *pv, [in]ULONG cb, [out]ULONG *pcbRead);
|
||||||
|
[local]
|
||||||
|
[id(7), helpstring("method Write")] HRESULT
|
||||||
|
Write([in, size_is(cb)] const void *pv, [in]ULONG cb, [out]ULONG *pcbWritten);
|
||||||
|
[propget, id(8), helpstring("property PaperColor")] HRESULT PaperColor([out, retval] ULONG* pVal);
|
||||||
|
[id(9), helpstring("method Open")] HRESULT Open([in]BOOL bForWrite);
|
||||||
|
[id(10), helpstring("method Close")] HRESULT Close(void);
|
||||||
|
[propget, id(11), helpstring("property SourceDescription")] HRESULT SourceDescription([out, retval] BSTR* pVal);
|
||||||
|
[propget, id(12), helpstring("property PropertiesXML")] HRESULT PropertiesXML([out, retval] BSTR* pVal);
|
||||||
|
[propget, id(13), helpstring("property PaperClipWidth")] HRESULT PaperClipWidth([out, retval] DOUBLE* pVal);
|
||||||
|
[propget, id(14), helpstring("property EPlotSectionImpl"), hidden] HRESULT EPlotSectionImpl([out, retval] /*CEPlotSectionImpl*/BYTE ** pVal);
|
||||||
|
[propput, id(14), helpstring("property EPlotSectionImpl"), hidden] HRESULT EPlotSectionImpl([in] /*CEPlotSectionImpl*/ BYTE * newVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(32292BE4-2ACB-4BDD-AF3C-DF91ADD4EF36),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IEPlotSections Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IEPlotSections : IDispatch{
|
||||||
|
[propget, helpstring("My Parent")] HRESULT Parent([out, retval] IDWFFile **ppParent);
|
||||||
|
[propget, id(1), helpstring("property Count")] HRESULT Count([out, retval] LONG* pVal);
|
||||||
|
[propget, id(2), helpstring("property Item")] HRESULT Item([in] LONG i, [out, retval] IDispatch** pVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(BA3EEF9F-BEB1-4478-870B-3E274AF8506A),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("ISLNKEvent Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface ISLNKEvent : IDispatch{
|
||||||
|
[propget, id(1), helpstring("property DwgX")] HRESULT DwgX([out, retval] DOUBLE* pVal);
|
||||||
|
[propput, id(1), helpstring("property DwgX")] HRESULT DwgX([in] DOUBLE newVal);
|
||||||
|
[propget, id(2), helpstring("property DwgY")] HRESULT DwgY([out, retval] DOUBLE* pVal);
|
||||||
|
[propput, id(2), helpstring("property DwgY")] HRESULT DwgY([in] DOUBLE newVal);
|
||||||
|
[propget, id(7), helpstring("property ContourLabel")] HRESULT ContourLabel([out, retval] BSTR* pVal);
|
||||||
|
[propput, id(7), helpstring("property ContourLabel")] HRESULT ContourLabel([in] BSTR newVal);
|
||||||
|
[propget, id(8), helpstring("property ContourLayer")] HRESULT ContourLayer([out, retval] BSTR* pVal);
|
||||||
|
[propput, id(8), helpstring("property ContourLayer")] HRESULT ContourLayer([in] BSTR newVal);
|
||||||
|
[propget, id(9), helpstring("property TextLabel")] HRESULT TextLabel([out, retval] BSTR* pVal);
|
||||||
|
[propput, id(9), helpstring("property TextLabel")] HRESULT TextLabel([in] BSTR newVal);
|
||||||
|
[propget, id(10), helpstring("property TextLayer")] HRESULT TextLayer([out, retval] BSTR* pVal);
|
||||||
|
[propput, id(10), helpstring("property TextLayer")] HRESULT TextLayer([in] BSTR newVal);
|
||||||
|
[propget, id(11), helpstring("property found")] HRESULT found([out, retval] IDWGPoint** pVal);
|
||||||
|
[propget, id(12), helpstring("property dwgExtents")] HRESULT dwgExtents([out, retval] IBoundingBox** pVal);
|
||||||
|
[propget, id(13), helpstring("property viewExtents")] HRESULT viewExtents([out, retval] IBoundingBox** pVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(102FE53F-3C9A-47C6-9BAD-1434838FF53D),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IBoundingBox Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IBoundingBox : IDispatch{
|
||||||
|
[propget, id(1), helpstring("property min")] HRESULT min([out, retval] IDWGPoint** pVal);
|
||||||
|
[propget, id(2), helpstring("property max")] HRESULT max([out, retval] IDWGPoint** pVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(C5678016-EF7B-4476-966E-8AFD4514DB2A),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IDWGPoint Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IDWGPoint : IDispatch{
|
||||||
|
[propget, id(1), helpstring("property DwgX")] HRESULT DwgX([out, retval] DOUBLE* pVal);
|
||||||
|
[propput, id(1), helpstring("property DwgX")] HRESULT DwgX([in] DOUBLE newVal);
|
||||||
|
[propget, id(2), helpstring("property DwgY")] HRESULT DwgY([out, retval] DOUBLE* pVal);
|
||||||
|
[propput, id(2), helpstring("property DwgY")] HRESULT DwgY([in] DOUBLE newVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(A505B2D9-4D41-411F-B2A7-B297AA399278),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("ISLNKContour Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface ISLNKContour : IDispatch{
|
||||||
|
[id(2), helpstring("method SetColor")] HRESULT SetColor([in] ULONG rgb, [in, defaultvalue(0)] BYTE Alpha);
|
||||||
|
[id(3), helpstring("method SetUrl")] HRESULT SetUrl([in] BSTR Url, [in] BSTR FriendlyName);
|
||||||
|
[propget, id(5), helpstring("property Area")] HRESULT Area([out, retval] DOUBLE* pVal);
|
||||||
|
[propget, id(6), helpstring("property Extents")] HRESULT Extents([out, retval] IBoundingBox ** pVal);
|
||||||
|
[propget, id(7), helpstring("property Center")] HRESULT Center([out, retval] IDWGPoint** pVal);
|
||||||
|
[propget, id(8), helpstring("property Key")] HRESULT Key([out, retval] BSTR* pVal);
|
||||||
|
[propput, id(8), helpstring("property Key")] HRESULT Key([in] BSTR newVal);
|
||||||
|
[propget, id(9), helpstring("property Label")] HRESULT Label([out, retval] BSTR* pVal);
|
||||||
|
[propput, id(9), helpstring("property Label")] HRESULT Label([in] BSTR newVal);
|
||||||
|
[propget, id(10), helpstring("property Hatch")] HRESULT Hatch([out, retval] BYTE* pVal);
|
||||||
|
[propput, id(10), helpstring("property Hatch")] HRESULT Hatch([in] BYTE newVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(FE75E3AB-5047-4CB6-A910-FF3156CB7946),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("ISLNKSymbol Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface ISLNKSymbol : IDispatch{
|
||||||
|
[propget, id(2), helpstring("property Scale")] HRESULT Scale([out, retval] DOUBLE* pVal);
|
||||||
|
[propput, id(2), helpstring("property Scale")] HRESULT Scale([in] DOUBLE newVal);
|
||||||
|
[propget, id(3), helpstring("property Rotation")] HRESULT Rotation([out, retval] LONG* pVal);
|
||||||
|
[propput, id(3), helpstring("property Rotation")] HRESULT Rotation([in] LONG newVal);
|
||||||
|
[propget, id(4), helpstring("property Contour")] HRESULT Contour([out, retval] IUnknown** pVal);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
object,
|
||||||
|
uuid(FC848365-3C85-490D-8CC0-DB66D73FA34E),
|
||||||
|
dual,
|
||||||
|
nonextensible,
|
||||||
|
helpstring("IOptions Interface"),
|
||||||
|
pointer_default(unique)
|
||||||
|
]
|
||||||
|
interface IOptions : IDispatch{
|
||||||
|
[id(1), helpstring("method SetOption")] HRESULT SetOption([in] BSTR optionName, VARIANT OptionValue);
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8),
|
||||||
|
version(1.0),
|
||||||
|
helpstring("SLNKDWF 1.0 Type Library")
|
||||||
|
]
|
||||||
|
library SLNKDWFLib
|
||||||
|
{
|
||||||
|
importlib("stdole2.tlb");
|
||||||
|
[
|
||||||
|
uuid(BE2BCD58-4971-49E6-9A70-CDDD5C01224D),
|
||||||
|
helpstring("DWFFile Class")
|
||||||
|
]
|
||||||
|
coclass myDWFFile
|
||||||
|
{
|
||||||
|
[default] interface IDWFFile;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(C2632BD5-3157-45A6-8FFC-57063FF2B169),
|
||||||
|
helpstring("WhipFile Class")
|
||||||
|
]
|
||||||
|
coclass WhipFile
|
||||||
|
{
|
||||||
|
[default] interface IWhipFile;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(783AC7F0-E6E1-4CE1-A38B-FA047D44DC1C),
|
||||||
|
helpstring("Whip2PNG Class")
|
||||||
|
]
|
||||||
|
coclass Whip2PNG
|
||||||
|
{
|
||||||
|
[default] interface IWhip2PNG;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(2BA64B82-1A96-4F15-9815-40B291B505EB),
|
||||||
|
helpstring("About Class")
|
||||||
|
]
|
||||||
|
coclass About
|
||||||
|
{
|
||||||
|
[default] interface IAbout;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(F2599AE6-8A08-4B5E-9C68-BD975229F0D1),
|
||||||
|
helpstring("EPlotSection Class"),
|
||||||
|
noncreatable
|
||||||
|
]
|
||||||
|
coclass EPlotSection
|
||||||
|
{
|
||||||
|
[default] interface IEPlotSection;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(7B2E7661-9B9A-4217-A19E-745EFFF8E86D),
|
||||||
|
helpstring("EPlotSections Class"),
|
||||||
|
noncreatable
|
||||||
|
]
|
||||||
|
coclass EPlotSections
|
||||||
|
{
|
||||||
|
[default] interface IEPlotSections;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(F7226C2D-B5C7-4C72-AA43-6D5013EF7C96),
|
||||||
|
helpstring("SLNKEvent Class"),
|
||||||
|
noncreatable
|
||||||
|
]
|
||||||
|
coclass SLNKEvent
|
||||||
|
{
|
||||||
|
[default] interface ISLNKEvent;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(FCEF1E56-36FF-4F66-BEA5-FD08D860524F),
|
||||||
|
helpstring("BoundingBox Class"),
|
||||||
|
noncreatable
|
||||||
|
]
|
||||||
|
coclass BoundingBox
|
||||||
|
{
|
||||||
|
[default] interface IBoundingBox;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(96301A8D-1DC9-4900-B89D-C745C4CAEFF4),
|
||||||
|
helpstring("DWGPoint Class"),
|
||||||
|
noncreatable
|
||||||
|
]
|
||||||
|
coclass DWGPoint
|
||||||
|
{
|
||||||
|
[default] interface IDWGPoint;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(476C0F28-5860-485D-BEBD-D03F68E1C930),
|
||||||
|
helpstring("SLNKContour Class"),
|
||||||
|
noncreatable
|
||||||
|
]
|
||||||
|
coclass SLNKContour
|
||||||
|
{
|
||||||
|
[default] interface ISLNKContour;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(8CEBC89F-658A-49C8-96E4-852FFFA9B10F),
|
||||||
|
helpstring("SLNKSymbol Class"),
|
||||||
|
noncreatable
|
||||||
|
]
|
||||||
|
coclass SLNKSymbol
|
||||||
|
{
|
||||||
|
[default] interface ISLNKSymbol;
|
||||||
|
};
|
||||||
|
[
|
||||||
|
uuid(168678A9-6FA7-49C3-B839-DFDF07E0A79A),
|
||||||
|
helpstring("Options Class")
|
||||||
|
]
|
||||||
|
coclass Options
|
||||||
|
{
|
||||||
|
[default] interface IOptions;
|
||||||
|
};
|
||||||
|
};
|
||||||
11
SlnkDWFCom/SLNKDWF.rgs
Normal file
11
SlnkDWFCom/SLNKDWF.rgs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
NoRemove AppID
|
||||||
|
{
|
||||||
|
'%APPID%' = s 'SLNKDWF'
|
||||||
|
'SLNKDWF.DLL'
|
||||||
|
{
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
533
SlnkDWFCom/SLNKDWF.vcproj
Normal file
533
SlnkDWFCom/SLNKDWF.vcproj
Normal file
@@ -0,0 +1,533 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
Name="SLNKDWFCom"
|
||||||
|
ProjectGUID="{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}"
|
||||||
|
RootNamespace="SLNKDWF"
|
||||||
|
Keyword="AtlProj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="Debug"
|
||||||
|
IntermediateDirectory="Debug"
|
||||||
|
ConfigurationType="2"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||||
|
UseOfATL="1"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
MkTypLibCompatible="false"
|
||||||
|
TargetEnvironment="1"
|
||||||
|
GenerateStublessProxies="true"
|
||||||
|
TypeLibraryName="$(IntDir)/SLNKDWF.tlb"
|
||||||
|
HeaderFileName="SLNKDWF.h"
|
||||||
|
DLLDataFileName=""
|
||||||
|
InterfaceIdentifierFileName="SLNKDWF_i.c"
|
||||||
|
ProxyFileName="SLNKDWF_p.c"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="d:\library\Dwf702\develop\global\src\dwf;d:\Library\Dwf702\develop\global\src\;..\SlnkDWFImpl"
|
||||||
|
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_MERGE_PROXYSTUB;_CRT_SECURE_NO_DEPRECATE"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
TreatWChar_tAsBuiltInType="false"
|
||||||
|
UsePrecompiledHeader="2"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
Culture="1033"
|
||||||
|
AdditionalIncludeDirectories="$(IntDir)"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
Description="Unload IIS..."
|
||||||
|
CommandLine="UnloadIIS.bat"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
IgnoreImportLibrary="true"
|
||||||
|
AdditionalDependencies="..\SlnkdwfImpl\DebugRW\SLNKDWFStaticRW.lib Secur32.lib"
|
||||||
|
OutputFile="c:\SLNKDWF.dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="d:\Library\Dwf702\develop\global\lib\static\debug\vc8.0"
|
||||||
|
IgnoreDefaultLibraryNames=""
|
||||||
|
ModuleDefinitionFile=".\SLNKDWF.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
GenerateMapFile="false"
|
||||||
|
SubSystem="2"
|
||||||
|
ImportLibrary="$(OutDir)/SLNKDWF.lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Performing registration"
|
||||||
|
CommandLine="regsvr32 /s /c "$(TargetPath)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="Release"
|
||||||
|
IntermediateDirectory="Release"
|
||||||
|
ConfigurationType="2"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
|
||||||
|
UseOfATL="1"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
PreprocessorDefinitions="NDEBUG"
|
||||||
|
MkTypLibCompatible="false"
|
||||||
|
TargetEnvironment="1"
|
||||||
|
GenerateStublessProxies="true"
|
||||||
|
TypeLibraryName="$(IntDir)/SLNKDWF.tlb"
|
||||||
|
HeaderFileName="SLNKDWF.h"
|
||||||
|
DLLDataFileName=""
|
||||||
|
InterfaceIdentifierFileName="SLNKDWF_i.c"
|
||||||
|
ProxyFileName="SLNKDWF_p.c"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
InlineFunctionExpansion="2"
|
||||||
|
EnableIntrinsicFunctions="true"
|
||||||
|
FavorSizeOrSpeed="1"
|
||||||
|
OmitFramePointers="true"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
AdditionalIncludeDirectories="d:\library\Dwf702\develop\global\src\dwf;d:\Library\Dwf702\develop\global\src\;..\SlnkDWFImpl"
|
||||||
|
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_MERGE_PROXYSTUB;_CRT_SECURE_NO_DEPRECATE"
|
||||||
|
GeneratePreprocessedFile="0"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
TreatWChar_tAsBuiltInType="false"
|
||||||
|
UsePrecompiledHeader="2"
|
||||||
|
AssemblerOutput="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="NDEBUG"
|
||||||
|
Culture="1033"
|
||||||
|
AdditionalIncludeDirectories="$(IntDir)"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
Description="Unloading IIS..."
|
||||||
|
CommandLine="unloadIIS.bat"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
IgnoreImportLibrary="true"
|
||||||
|
AdditionalDependencies="..\SlnkdwfImpl\ReleaseRW\SLNKDWFStaticRW.lib Secur32.lib"
|
||||||
|
OutputFile="c:\SLNKDWF.dll"
|
||||||
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="d:\library\Dwf702\develop\global\lib\static\release\vc8.0;.\CxImage\"
|
||||||
|
ModuleDefinitionFile=".\SLNKDWF.def"
|
||||||
|
GenerateDebugInformation="false"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
LinkTimeCodeGeneration="1"
|
||||||
|
ImportLibrary="$(OutDir)/FCLTDWF.lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManifestTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCAppVerifierTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebDeploymentTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
Description="Performing registration"
|
||||||
|
CommandLine="regsvr32 /s /c "$(TargetPath)""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="About.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="BoundingBox.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\dlldatax.c"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="DWFFile.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="DWGPoint.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="EPlotSections.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Metafile.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="myEPlotSection.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Options.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\SLNKContour.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKDWF.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKDWF.def"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKDWF.idl"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKEvent.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKSymbol.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\SLNKSymbolDefImpl.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\SLNKSymbolImpl.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="stdafx.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Whip2PNG.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="WhipFile.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="About.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="About.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ASPObject.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ASPObject.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="BoundingBox.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="BoundingBox.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="dlldatax.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="DWFFile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="DWGPoint.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="DWGPoint.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="EPlotSection.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="EPlotSections.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="EPlotSections.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Jglutil.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="myControl.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="myEPlotSection.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Resource.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\SLNKContour.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKDWF.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKDWFVersion.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKEvent.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKEvent.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="stdafx.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Whip2DC.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Whip2DC.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Whip2DCState.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Whip2PNG.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="WhipFile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="WriterTest.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="DWFFile.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\slnkcont.bin"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\SLNKContour.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKdwf.rc"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Whip2PNG.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="WhipFile.rgs"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Generated Files"
|
||||||
|
SourceControlFiles="false"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="SLNKDWF_i.c"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
18
SlnkDWFCom/SLNKDWFVersion.h
Normal file
18
SlnkDWFCom/SLNKDWFVersion.h
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Zorg dat versies alfabetisch altijd op elkaar volgen!
|
||||||
|
#define SLNK_MAJOR_VERSION 2
|
||||||
|
#define SLNK_MINOR_VERSION 00
|
||||||
|
#define SLNK_BUILD_VERSION 0
|
||||||
|
|
||||||
|
// Define resource strings
|
||||||
|
#define ECHO(a) #a
|
||||||
|
#define STRINGIZE_SLNK_BUILD(major, minor, build) ECHO(major) "," ECHO(minor) ",0," ECHO(build)
|
||||||
|
#define STRINGIZE_SLNK_FULL(major, minor) ECHO(major) "." ECHO(minor)
|
||||||
|
|
||||||
|
// Deze wordt gebruikt in SLNKDWF.RC2 en eindigt in Version Tab van de properties
|
||||||
|
// Daar conformeren we aan de standaard(?)
|
||||||
|
#define SLNK_BUILDVERSION STRINGIZE_SLNK_BUILD(SLNK_MAJOR_VERSION, SLNK_MINOR_VERSION, SLNK_BUILD_VERSION)
|
||||||
|
|
||||||
|
// Deze wordt in splashscherm getoond en in About-scherm
|
||||||
|
// Bovendien wordt DonShowSplashVersion hiervan afgeleid
|
||||||
|
// Ergo: Voor de eenvoud niet de BUILD_VERSION tonen aan eindgebruikers
|
||||||
|
#define SLNK_FULLVERSION STRINGIZE_SLNK_FULL(SLNK_MAJOR_VERSION, SLNK_MINOR_VERSION)
|
||||||
95
SlnkDWFCom/SLNKEvent.cpp
Normal file
95
SlnkDWFCom/SLNKEvent.cpp
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
// SLNKEvent.cpp : Implementation of CSLNKEvent
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "SLNKEvent.h"
|
||||||
|
|
||||||
|
|
||||||
|
// CSLNKEvent
|
||||||
|
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_DwgX(DOUBLE* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_DwgX;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::put_DwgX(DOUBLE newVal)
|
||||||
|
{
|
||||||
|
m_DwgX = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_DwgY(DOUBLE* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_DwgY;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::put_DwgY(DOUBLE newVal)
|
||||||
|
{
|
||||||
|
m_DwgY = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_ContourLabel(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(m_ContourLabel);
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::put_ContourLabel(BSTR newVal)
|
||||||
|
{
|
||||||
|
m_ContourLabel = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_ContourLayer(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(m_ContourLayer);
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::put_ContourLayer(BSTR newVal)
|
||||||
|
{
|
||||||
|
m_ContourLayer = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_TextLabel(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(m_TextLabel);
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::put_TextLabel(BSTR newVal)
|
||||||
|
{
|
||||||
|
m_TextLabel = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_TextLayer(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(m_TextLayer);
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::put_TextLayer(BSTR newVal)
|
||||||
|
{
|
||||||
|
m_TextLayer = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_found(IDWGPoint** pVal)
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_dwgExtents(IBoundingBox** pVal)
|
||||||
|
{
|
||||||
|
return m_dwgBounding->QueryInterface(IID_IBoundingBox, (void**)pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKEvent::get_viewExtents(IBoundingBox** pVal)
|
||||||
|
{
|
||||||
|
return m_viewBounding->QueryInterface(IID_IBoundingBox, (void**)pVal);
|
||||||
|
}
|
||||||
93
SlnkDWFCom/SLNKEvent.h
Normal file
93
SlnkDWFCom/SLNKEvent.h
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
// SLNKEvent.h : Declaration of the CSLNKEvent
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
#include "BoundingBox.h"
|
||||||
|
|
||||||
|
|
||||||
|
// CSLNKEvent
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CSLNKEvent :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CSLNKEvent, &CLSID_SLNKEvent>,
|
||||||
|
public IDispatchImpl<ISLNKEvent, &IID_ISLNKEvent, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CSLNKEvent()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//REMOVED DECLARE_REGISTRY_RESOURCEID(IDR_SLNKEVENT)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CSLNKEvent)
|
||||||
|
COM_INTERFACE_ENTRY(ISLNKEvent)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Maak object m_dwgBounding
|
||||||
|
//
|
||||||
|
CComObject<CBoundingBox> *pBoundingBox;
|
||||||
|
HRESULT hr = CComObject<CBoundingBox>::CreateInstance(&pBoundingBox);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
pBoundingBox->AddRef();
|
||||||
|
hr = pBoundingBox->QueryInterface(IID_IBoundingBox, (void **)&m_dwgBounding);
|
||||||
|
pBoundingBox->Release();
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Maak object m_viewBounding
|
||||||
|
//
|
||||||
|
hr = CComObject<CBoundingBox>::CreateInstance(&pBoundingBox);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
pBoundingBox->AddRef();
|
||||||
|
hr = pBoundingBox->QueryInterface(IID_IBoundingBox, (void **)&m_viewBounding);
|
||||||
|
pBoundingBox->Release();
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
CComQIPtr<IBoundingBox> m_dwgBounding;
|
||||||
|
CComQIPtr<IBoundingBox> m_viewBounding;
|
||||||
|
|
||||||
|
double m_DwgX, m_DwgY;
|
||||||
|
double m_minDwgX, m_maxDwgY;
|
||||||
|
double m_maxDwgX, m_minDwgY;
|
||||||
|
CString m_ContourLabel, m_ContourLayer;
|
||||||
|
CString m_TextLabel, m_TextLayer;
|
||||||
|
public:
|
||||||
|
|
||||||
|
STDMETHOD(get_DwgX)(DOUBLE* pVal);
|
||||||
|
STDMETHOD(put_DwgX)(DOUBLE newVal);
|
||||||
|
STDMETHOD(get_DwgY)(DOUBLE* pVal);
|
||||||
|
STDMETHOD(put_DwgY)(DOUBLE newVal);
|
||||||
|
STDMETHOD(get_ContourLabel)(BSTR* pVal);
|
||||||
|
STDMETHOD(put_ContourLabel)(BSTR newVal);
|
||||||
|
STDMETHOD(get_ContourLayer)(BSTR* pVal);
|
||||||
|
STDMETHOD(put_ContourLayer)(BSTR newVal);
|
||||||
|
STDMETHOD(get_TextLabel)(BSTR* pVal);
|
||||||
|
STDMETHOD(put_TextLabel)(BSTR newVal);
|
||||||
|
STDMETHOD(get_TextLayer)(BSTR* pVal);
|
||||||
|
STDMETHOD(put_TextLayer)(BSTR newVal);
|
||||||
|
STDMETHOD(get_found)(IDWGPoint** pVal);
|
||||||
|
STDMETHOD(get_dwgExtents)(IBoundingBox** pVal);
|
||||||
|
STDMETHOD(get_viewExtents)(IBoundingBox** pVal);
|
||||||
|
};
|
||||||
|
|
||||||
|
//REMOVED OBJECT_ENTRY_AUTO(__uuidof(SLNKEvent), CSLNKEvent)
|
||||||
27
SlnkDWFCom/SLNKEvent.rgs
Normal file
27
SlnkDWFCom/SLNKEvent.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.SLNKEvent.1 = s 'SLNKEvent Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{F7226C2D-B5C7-4C72-AA43-6D5013EF7C96}'
|
||||||
|
}
|
||||||
|
SLNKDWF.SLNKEvent = s 'SLNKEvent Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{F7226C2D-B5C7-4C72-AA43-6D5013EF7C96}'
|
||||||
|
CurVer = s 'SLNKDWF.SLNKEvent.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {F7226C2D-B5C7-4C72-AA43-6D5013EF7C96} = s 'SLNKEvent Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.SLNKEvent.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.SLNKEvent'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
75
SlnkDWFCom/SLNKSymbol.cpp
Normal file
75
SlnkDWFCom/SLNKSymbol.cpp
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
// SLNKSymbol.cpp : Implementation of CSLNKSymbol
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "SLNKSymbol.h"
|
||||||
|
#include "SLNKContour.h"
|
||||||
|
|
||||||
|
// CSLNKSymbol
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKSymbol::InterfaceSupportsErrorInfo(REFIID riid)
|
||||||
|
{
|
||||||
|
static const IID* arr[] =
|
||||||
|
{
|
||||||
|
&IID_IWhipFile
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
||||||
|
{
|
||||||
|
if (InlineIsEqualGUID(*arr[i],riid))
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
return S_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CSLNKSymbol::SetImpl(CSLNKSymbolImpl * pSLNKSymbol)
|
||||||
|
{
|
||||||
|
m_SLNKSymbol = pSLNKSymbol;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKSymbol::get_Scale(DOUBLE* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_SLNKSymbol->m_Scale;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKSymbol::put_Scale(DOUBLE newVal)
|
||||||
|
{
|
||||||
|
m_SLNKSymbol->m_Scale = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKSymbol::get_Rotation(LONG* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_SLNKSymbol->m_Rotation;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKSymbol::put_Rotation(LONG newVal)
|
||||||
|
{
|
||||||
|
long rotation = (newVal%360+360)%360; // Normaliseren
|
||||||
|
if (rotation%90 != 0)
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "ERROR Symbol rotation must be 0/90/180/270.");
|
||||||
|
|
||||||
|
m_SLNKSymbol->m_Rotation = newVal;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CSLNKSymbol::get_Contour(IUnknown** pVal)
|
||||||
|
{
|
||||||
|
CSLNKContourImpl *contour= &m_SLNKSymbol->m_SLNKContour;
|
||||||
|
|
||||||
|
CComObject<CSLNKContour> *theContour;
|
||||||
|
HRESULT hr = CComObject<CSLNKContour>::CreateInstance(&theContour);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
theContour->AddRef();
|
||||||
|
hr = theContour->QueryInterface(IID_ISLNKContour, (void **)pVal);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
theContour->SetParent(m_parent_iWhipFile); // Zelfde parent maar
|
||||||
|
theContour->Release();
|
||||||
|
theContour->SetImpl(contour); // Heel belangrijk: zet de implementatie waar we een interface op bieden
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
26
SlnkDWFCom/SLNKSymbol.rgs
Normal file
26
SlnkDWFCom/SLNKSymbol.rgs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWFCom.SLNKSymbol.1 = s 'SLNKSymbol Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{8CEBC89F-658A-49C8-96E4-852FFFA9B10F}'
|
||||||
|
}
|
||||||
|
SLNKDWFCom.SLNKSymbol = s 'SLNKSymbol Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{8CEBC89F-658A-49C8-96E4-852FFFA9B10F}'
|
||||||
|
CurVer = s 'SLNKDWFCom.SLNKSymbol.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {8CEBC89F-658A-49C8-96E4-852FFFA9B10F} = s 'SLNKSymbol Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWFCom.SLNKSymbol.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWFCom.SLNKSymbol'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
427
SlnkDWFCom/SLNKSymbolDefImpl.cpp
Normal file
427
SlnkDWFCom/SLNKSymbolDefImpl.cpp
Normal file
@@ -0,0 +1,427 @@
|
|||||||
|
#include "StdAfx.h"
|
||||||
|
#include "myEPlotSection.h"
|
||||||
|
#include "SLNKSymbolDefImpl.h"
|
||||||
|
#include "../SLNKDWFImpl/CxImage\CxImage\ximage.h"
|
||||||
|
#include "../SLNKDWFImpl/Whip2DCImpl.h"
|
||||||
|
#include "SLNKContourImpl.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
// Bij EPlotsection (external DWF)
|
||||||
|
CSLNKSymbolDefinition::CSLNKSymbolDefinition(CComQIPtr<IEPlotSection> EPlotSection)
|
||||||
|
{
|
||||||
|
m_iEPlotSection = EPlotSection;
|
||||||
|
|
||||||
|
CEPlotSectionImpl *epli;
|
||||||
|
m_iEPlotSection->get_EPlotSectionImpl((BYTE **)&epli);
|
||||||
|
m_wtFile.set_eplotsection(epli);
|
||||||
|
m_AsBitmap = NULL;
|
||||||
|
m_BuiltIn = false;
|
||||||
|
calculateBoundary();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Bij Contour list (builtin symbol)
|
||||||
|
CSLNKSymbolDefinition::CSLNKSymbolDefinition(int count, WT_Logical_Point const *points)
|
||||||
|
{
|
||||||
|
m_BuiltIn = true;
|
||||||
|
m_wtFile.set_eplotsection(NULL);
|
||||||
|
this->m_dwgScale = 1.0;
|
||||||
|
m_AsBitmap = NULL;
|
||||||
|
m_BoundingContour.set(count, points, false);
|
||||||
|
m_Origin = CSLNKContourImpl::Centroid(m_BoundingContour);
|
||||||
|
};
|
||||||
|
|
||||||
|
// By bitmap
|
||||||
|
CSLNKSymbolDefinition::CSLNKSymbolDefinition(CString const filepath, double const height)
|
||||||
|
{
|
||||||
|
m_wtFile.set_eplotsection(NULL);
|
||||||
|
m_AsBitmap = NULL;
|
||||||
|
m_BuiltIn = false;
|
||||||
|
CxImage img;
|
||||||
|
if (!img.Load(filepath))
|
||||||
|
{ // Rood kruisje?
|
||||||
|
img.Create(32, 32, 24);
|
||||||
|
img.Clear(255); // Wit
|
||||||
|
img.DrawLine(0,31,0,31,RGB(255,0,0));
|
||||||
|
img.DrawLine(0,31,31,0,RGB(255,0,0));
|
||||||
|
};
|
||||||
|
BYTE *m_Buffer=NULL;
|
||||||
|
long m_size;
|
||||||
|
img.Encode(m_Buffer, m_size, CXIMAGE_FORMAT_PNG);
|
||||||
|
|
||||||
|
this->m_dwgScale = (double)img.GetHeight()/ height;
|
||||||
|
|
||||||
|
//myDoTRACE("\nCreates symbol bitmap (%d,%d)->PNG %d byte (W2D was %d)", pixeldx,pixeldy,m_size, epli->size());
|
||||||
|
|
||||||
|
m_AsBitmap = new
|
||||||
|
WT_PNG_Group4_Image(
|
||||||
|
(int)img.GetHeight(), /*rows*/
|
||||||
|
(int)img.GetWidth(), /*cols*/
|
||||||
|
WT_PNG_Group4_Image::PNG,
|
||||||
|
3,
|
||||||
|
NULL,
|
||||||
|
m_size,
|
||||||
|
(WT_Byte*)m_Buffer,
|
||||||
|
WT_Logical_Point(0,0),
|
||||||
|
WT_Logical_Point(img.GetWidth(),img.GetHeight()),
|
||||||
|
WD_False); // Geen copy, we verwijderen zelf expliciet
|
||||||
|
|
||||||
|
WT_Logical_Point pts4[4] = { WT_Logical_Point(0, 0),
|
||||||
|
WT_Logical_Point(img.GetWidth(), 0),
|
||||||
|
WT_Logical_Point(img.GetWidth(), img.GetHeight()),
|
||||||
|
WT_Logical_Point(0, img.GetHeight())};
|
||||||
|
m_BoundingContour.set(4, pts4, true);
|
||||||
|
m_Origin = CSLNKContourImpl::Centroid(m_BoundingContour);
|
||||||
|
};
|
||||||
|
|
||||||
|
CSLNKSymbolDefinition::~CSLNKSymbolDefinition(void)
|
||||||
|
{
|
||||||
|
if (m_AsBitmap)
|
||||||
|
{
|
||||||
|
CxImage xx;xx.FreeMemory((void *)m_AsBitmap->data()); // We hebben een copy gedaan dus dit mag/moet
|
||||||
|
delete m_AsBitmap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bepaal een bounding contour van ons symbool. Die is eventueel later leuk te gebruiken voor een HitTest
|
||||||
|
// v0: bounding box
|
||||||
|
// v1: bounding octagon
|
||||||
|
// Algoritm: search google for Bounding Octagon
|
||||||
|
// http://geometryalgorithms.com/Archive/algorithm_0107/algorithm_0107.htm
|
||||||
|
// (v2: bounding convex hull waarschijnlijk overkill)
|
||||||
|
#include <assert.h>
|
||||||
|
WT_Result CSLNKSymbolDefinition::calculateBoundary ()
|
||||||
|
{
|
||||||
|
WT_Result result;
|
||||||
|
|
||||||
|
m_wtFile.set_file_mode(WT_File::File_Read);
|
||||||
|
result = m_wtFile.open();
|
||||||
|
if (result != WT_Result::Success)
|
||||||
|
return result;
|
||||||
|
|
||||||
|
// Door de enorm grote dwf-coordinaten lopen we een integer overflow risico tijdens
|
||||||
|
// onze bepaling van Pmin en Pmax (die min en max van x+y bepalen) en in theorie
|
||||||
|
// ook van Qmin en Qmax (die over het verschil x-y gaan) hoewel dat in de praktijk rond 0 zal liggen
|
||||||
|
// Daarom rekenen we systematisch met de helft. Dat moet risico's voorkomen en de afrondfout nemen
|
||||||
|
// we voor lief
|
||||||
|
// Merk op dat de resulterende Octagon kleiner is dan de de bounding box, die zeker binnen de coordinaat
|
||||||
|
// ruimte valt dus voor het eindresultaat is er geen risico. Alleen oppassen voor tussenresultaten dus
|
||||||
|
// Ging concreet mis met 41610ev_symbols.dwf
|
||||||
|
WT_Integer32 Xmin, Xmax, Ymin, Ymax;
|
||||||
|
WT_Integer32 Pmin2, Pmax2, Qmin2, Qmax2;
|
||||||
|
// Signal invalid
|
||||||
|
Xmin = Ymin = Pmin2 = Qmin2 = INT_MAX;
|
||||||
|
Xmax = Ymax = Pmax2 = Qmax2 = INT_MIN;
|
||||||
|
|
||||||
|
BOOL ViewportDone = FALSE; // We doen alleen de eerste viewport.
|
||||||
|
// Gaf problemen bij symbolen die vanuit paperspace waren geexporteerd
|
||||||
|
// Do the actual reading.
|
||||||
|
while ((result = m_wtFile.process_next_object()) == WT_Result::Success)
|
||||||
|
{
|
||||||
|
//myTRACE("Attribute '%s'\n", wtFile->file_stats()->descriptions());
|
||||||
|
switch(m_wtFile.current_object()->object_type())
|
||||||
|
{
|
||||||
|
case WT_Object::Attribute:
|
||||||
|
{
|
||||||
|
const WT_Attribute *obj = (WT_Attribute *)m_wtFile.current_object();
|
||||||
|
if (obj->object_id() == WT_Object::Viewport_ID)
|
||||||
|
{
|
||||||
|
if (ViewportDone)
|
||||||
|
{
|
||||||
|
myTRACE("\nSkipping second viewport in symbol");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ViewportDone = TRUE;
|
||||||
|
WT_Viewport *viewport = (WT_Viewport *)m_wtFile.current_object();
|
||||||
|
WT_Units symbolunits = viewport->viewport_units();
|
||||||
|
m_dwgScale = symbolunits.application_to_dwf_transform()(0,0); // Symbol's dScale
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case WT_Object::Drawable:
|
||||||
|
{
|
||||||
|
WT_Drawable *obj = (WT_Drawable *)m_wtFile.current_object();
|
||||||
|
if (obj->object_id() != WT_Object::Origin_ID)// Belachelijk dat die Drawable is?
|
||||||
|
{
|
||||||
|
WT_Logical_Box bx = obj->bounds(&m_wtFile);
|
||||||
|
Xmin = min(Xmin, bx.minpt().m_x);
|
||||||
|
Ymin = min(Ymin, bx.minpt().m_y);
|
||||||
|
Xmax = max(Xmax, bx.maxpt().m_x);
|
||||||
|
Ymax = max(Ymax, bx.maxpt().m_y);
|
||||||
|
|
||||||
|
// Voor echte (deel)cirkels gaan we de diagonaal bounding box scherper berekenen
|
||||||
|
if (obj->object_id() == WT_Object::Outline_Ellipse_ID || obj->object_id() == WT_Object::Filled_Ellipse_ID)
|
||||||
|
{
|
||||||
|
WT_Ellipse *elp = (WT_Ellipse *)obj;
|
||||||
|
if (elp->minor() == elp->major()) // Anders te ingewikkeld
|
||||||
|
{ // Bepaal het ingeschreven vierkant van de cirkel
|
||||||
|
WT_Integer32 dr = myRound(elp->minor() / sqrt(2.0) + 0.5); // Altijd omhoog afronden
|
||||||
|
WT_Logical_Box bx2;
|
||||||
|
bx2.minpt() = WT_Logical_Point(elp->position().m_x - dr, elp->position().m_y - dr);
|
||||||
|
bx2.maxpt() = WT_Logical_Point(elp->position().m_x + dr, elp->position().m_y + dr);
|
||||||
|
// Houdt er wel rekening mee dat bij partiele cirkels het origineel scherper kan
|
||||||
|
// zijn omdat wij er geen rekening houden dat de cirkel misschien partieel is
|
||||||
|
Pmin2 = min(Pmin2, max(bx.minpt().m_x/2 + bx.minpt().m_y/2,bx2.minpt().m_x/2 + bx2.minpt().m_y/2)); // Linksonder
|
||||||
|
Qmax2 = max(Qmax2, min(bx.maxpt().m_x/2 - bx.minpt().m_y/2,bx2.maxpt().m_x/2 - bx2.minpt().m_y/2)); // Rechtsonder
|
||||||
|
Pmax2 = max(Pmax2, min(bx.maxpt().m_x/2 + bx.maxpt().m_y/2,bx2.maxpt().m_x/2 + bx2.maxpt().m_y/2)); // Rechtsboven
|
||||||
|
Qmin2 = min(Qmin2, max(bx.minpt().m_x/2 - bx.maxpt().m_y/2,bx2.minpt().m_x/2 - bx2.maxpt().m_y/2)); // Linksboven
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// else gewoon 'doorvallen' naar standaard Pmin2 etc.
|
||||||
|
}
|
||||||
|
|
||||||
|
// Voor WT_Pointset gebaseerde objecten kunnen we het ook wel beter
|
||||||
|
if (obj->object_id() == WT_Object::Polygon_ID ||
|
||||||
|
obj->object_id() == WT_Object::Polyline_ID ||
|
||||||
|
obj->object_id() == WT_Object::Polytriangle_ID)
|
||||||
|
{
|
||||||
|
WT_Point_Set *pts;
|
||||||
|
// Rechtstreekse cast naar (WT_Point_Set *) gaf memory violations?
|
||||||
|
switch (obj->object_id())
|
||||||
|
{
|
||||||
|
case WT_Object::Polygon_ID : pts = (WT_Polygon *)m_wtFile.current_object(); break;
|
||||||
|
case WT_Object::Polyline_ID : pts = (WT_Polyline *)m_wtFile.current_object(); break;
|
||||||
|
case WT_Object::Polytriangle_ID: pts = (WT_Polytriangle *)m_wtFile.current_object(); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i=0;i<pts->count(); i++)
|
||||||
|
{
|
||||||
|
WT_Logical_Point &pt = pts->points()[i];
|
||||||
|
Pmin2 = min(Pmin2, pt.m_x/2 + pt.m_y/2); // Linksonder
|
||||||
|
Qmax2 = max(Qmax2, pt.m_x/2 - pt.m_y/2); // Rechtsonder
|
||||||
|
Pmax2 = max(Pmax2, pt.m_x/2 + pt.m_y/2); // Rechtsboven
|
||||||
|
Qmin2 = min(Qmin2, pt.m_x/2 - pt.m_y/2); // Linksboven
|
||||||
|
}
|
||||||
|
break; // we zijn wel klaar
|
||||||
|
}
|
||||||
|
|
||||||
|
Pmin2 = min(Pmin2, bx.minpt().m_x/2 + bx.minpt().m_y/2); // Linksonder
|
||||||
|
Qmax2 = max(Qmax2, bx.maxpt().m_x/2 - bx.minpt().m_y/2); // Rechtsonder
|
||||||
|
Pmax2 = max(Pmax2, bx.maxpt().m_x/2 + bx.maxpt().m_y/2); // Rechtsboven
|
||||||
|
Qmin2 = min(Qmin2, bx.minpt().m_x/2 - bx.maxpt().m_y/2); // Linksboven
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//myTRACE("Skipping '%s'\n", wtFile->file_stats()->descriptions());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (result == WT_Result::End_Of_DWF_Opcode_Found)
|
||||||
|
// dwfresult = DwfResult::Success;
|
||||||
|
|
||||||
|
m_wtFile.close();
|
||||||
|
|
||||||
|
// Rechthoek
|
||||||
|
// WT_Logical_Point pts1[4] = { WT_Logical_Point(Xmin, Ymin),
|
||||||
|
// WT_Logical_Point(Xmax, Ymin),
|
||||||
|
// WT_Logical_Point(Xmax, Ymax),
|
||||||
|
// WT_Logical_Point(Xmin, Ymax)};
|
||||||
|
m_BoundingBox = WT_Logical_Box(Xmin, Ymin, Xmax, Ymax);
|
||||||
|
|
||||||
|
// Diamant heeft overflow risico
|
||||||
|
// WT_Logical_Point pts2[4] = { WT_Logical_Point(Pmin2+Qmin2, Pmin2-Qmin2),
|
||||||
|
// WT_Logical_Point(Pmin2+Qmax2, Pmin2-Qmax2),
|
||||||
|
// WT_Logical_Point(Pmax2+Qmax2, Pmax2-Qmax2),
|
||||||
|
// WT_Logical_Point(Pmax2+Qmin2, Pmax2-Qmin2)};
|
||||||
|
|
||||||
|
// Octagon
|
||||||
|
// Expressievolgorde is telkens belangrijk om overflow te voorkomen
|
||||||
|
WT_Logical_Point pts3[8] = { WT_Logical_Point(Pmin2-Ymin+Pmin2, Ymin),
|
||||||
|
WT_Logical_Point(Qmax2+Ymin+Qmax2, Ymin),
|
||||||
|
WT_Logical_Point(Xmax, Xmax-Qmax2-Qmax2),
|
||||||
|
WT_Logical_Point(Xmax, Pmax2-Xmax+Pmax2),
|
||||||
|
WT_Logical_Point(Pmax2-Ymax+Pmax2, Ymax),
|
||||||
|
WT_Logical_Point(Qmin2+Ymax+Qmin2, Ymax),
|
||||||
|
WT_Logical_Point(Xmin, Xmin-Qmin2-Qmin2),
|
||||||
|
WT_Logical_Point(Xmin, Pmin2-Xmin+Pmin2)};
|
||||||
|
|
||||||
|
m_BoundingContour.set(sizeof(pts3)/sizeof(pts3[0]), pts3, true);
|
||||||
|
m_Origin = CSLNKContourImpl::Centroid(m_BoundingContour);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef NO_BITMAPPEREN
|
||||||
|
WT_Drawable *CSLNKSymbolDefinition::asBitmap(int pixeldx, int pixeldy, long paperColor)
|
||||||
|
{
|
||||||
|
if (m_AsBitmap)
|
||||||
|
{
|
||||||
|
// TODO: Wat als pixeldy != m_AsBitmap->rows()
|
||||||
|
// Dat dwfdx anders is is minder boeiend, dat verschaalt wel
|
||||||
|
WT_PNG_Group4_Image *newBitmap = new
|
||||||
|
WT_PNG_Group4_Image(
|
||||||
|
m_AsBitmap->rows(), /*rows*/
|
||||||
|
m_AsBitmap->columns(), /*cols*/
|
||||||
|
WT_PNG_Group4_Image::PNG,
|
||||||
|
3,
|
||||||
|
NULL,
|
||||||
|
m_AsBitmap->data_size(),
|
||||||
|
(WT_Byte *)m_AsBitmap->data(),
|
||||||
|
m_BoundingBox.minpt(),
|
||||||
|
m_BoundingBox.maxpt(),
|
||||||
|
WD_False); // Don't copy
|
||||||
|
m_AsBitmap = newBitmap;
|
||||||
|
return m_AsBitmap; // Dan zijn we rap klaar. Dat is onze winst
|
||||||
|
}
|
||||||
|
|
||||||
|
// Blijkbaar de eerste keer hier. Tijd om de bitmap te bakken
|
||||||
|
CWhip2DCImpl iWhip2DC;
|
||||||
|
HDC pDC = ::GetDC(0);
|
||||||
|
HDC myDC = CreateCompatibleDC(pDC);
|
||||||
|
//ReleaseDC(pDC);
|
||||||
|
CEPlotSectionImpl *epli = NULL;
|
||||||
|
m_iEPlotSection->get_EPlotSectionImpl((BYTE **)&epli);
|
||||||
|
iWhip2DC.Load(myDC, epli,
|
||||||
|
"", ".*",
|
||||||
|
myRound(pixeldx), myRound(pixeldy),
|
||||||
|
VARIANT_TRUE /*center*/, VARIANT_TRUE /*m_Maximize*/);
|
||||||
|
|
||||||
|
BITMAPINFO bmInfo;
|
||||||
|
memset(&bmInfo.bmiHeader,0,sizeof(BITMAPINFOHEADER));
|
||||||
|
bmInfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
|
||||||
|
bmInfo.bmiHeader.biWidth=pixeldx;
|
||||||
|
bmInfo.bmiHeader.biHeight=pixeldy;
|
||||||
|
bmInfo.bmiHeader.biPlanes=1;
|
||||||
|
bmInfo.bmiHeader.biCompression=BI_RGB; // Geen compressie
|
||||||
|
bmInfo.bmiHeader.biBitCount=24;
|
||||||
|
//create a new bitmap and select it in the memory dc
|
||||||
|
BYTE *pbase;
|
||||||
|
HBITMAP TmpBmp = CreateDIBSection(pDC, &bmInfo,DIB_RGB_COLORS,(void**)&pbase,0,0);
|
||||||
|
HGDIOBJ TmpObj=SelectObject(myDC,TmpBmp);
|
||||||
|
|
||||||
|
iWhip2DC.put_paperColor(paperColor); // Op zich maken we hem transparant maar onze zwart/wit toggle moet wel kloppen
|
||||||
|
SUCCEEDED(iWhip2DC.Paint(VARIANT_FALSE /*m_forceBW*/));
|
||||||
|
CxImage img;
|
||||||
|
img.CreateFromHBITMAP(TmpBmp);
|
||||||
|
|
||||||
|
img.DecreaseBpp(8, FALSE); // Werkt averechts voor kleine plaatjes (pallette is groot?)
|
||||||
|
// Maar CxImage::Draw2 lijkt alleen te werken met palette achtergrond dus het moet maar
|
||||||
|
RGBQUAD back = {GetBValue(paperColor), // RGBQUAD is BGR!!
|
||||||
|
GetGValue(paperColor),
|
||||||
|
GetRValue(paperColor),0};
|
||||||
|
///RGBQUAD back = {0,0,0,0};
|
||||||
|
img.SetTransIndex(img.GetNearestIndex(back));
|
||||||
|
// img.SetTransColor(back); // Voor als we zonder pallette werken
|
||||||
|
|
||||||
|
BYTE *m_Buffer=NULL;
|
||||||
|
long m_size;
|
||||||
|
img.Encode(m_Buffer, m_size, CXIMAGE_FORMAT_PNG);
|
||||||
|
myDoTRACE("\nCreates symbol bitmap (%d,%d)->PNG %d byte (W2D was %d)", pixeldx,pixeldy,m_size, epli->size());
|
||||||
|
|
||||||
|
DeleteObject(TmpBmp);
|
||||||
|
DeleteDC(myDC);
|
||||||
|
ReleaseDC( NULL, pDC ); //Do not forget!
|
||||||
|
|
||||||
|
m_AsBitmap = new
|
||||||
|
WT_PNG_Group4_Image(
|
||||||
|
pixeldy, /*rows*/
|
||||||
|
pixeldy, /*cols*/
|
||||||
|
WT_PNG_Group4_Image::PNG,
|
||||||
|
3,
|
||||||
|
NULL,
|
||||||
|
m_size,
|
||||||
|
(WT_Byte*)m_Buffer,
|
||||||
|
m_BoundingBox.minpt(),
|
||||||
|
m_BoundingBox.maxpt(),
|
||||||
|
WD_False); // Geen copy, we verwijderen zelf expliciet
|
||||||
|
|
||||||
|
return m_AsBitmap;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
WT_Result CSLNKSymbolDefinition::serialize(WT_File & file)
|
||||||
|
{
|
||||||
|
if (m_AsBitmap)
|
||||||
|
{ // Wel even kopietje trekken omdat anders niet opnieuw getransformeerd wordt
|
||||||
|
WT_PNG_Group4_Image(
|
||||||
|
m_AsBitmap->rows(), /*rows*/
|
||||||
|
m_AsBitmap->columns(), /*cols*/
|
||||||
|
WT_PNG_Group4_Image::PNG,
|
||||||
|
3,
|
||||||
|
NULL,
|
||||||
|
m_AsBitmap->data_size(),
|
||||||
|
(WT_Byte *)m_AsBitmap->data(),
|
||||||
|
m_AsBitmap->bounds().minpt(),
|
||||||
|
m_AsBitmap->bounds().maxpt(),
|
||||||
|
WD_False).serialize(file);
|
||||||
|
return WT_Result::Success;
|
||||||
|
}
|
||||||
|
if (m_BuiltIn)
|
||||||
|
return WT_Result::Success;
|
||||||
|
|
||||||
|
WT_Result result;
|
||||||
|
// Open onze symbool DWF
|
||||||
|
m_wtFile.set_file_mode(WT_File::File_Read);
|
||||||
|
result = m_wtFile.open();
|
||||||
|
if (result != WT_Result::Success)
|
||||||
|
return result; // Waarschijnlijk builtin symbol?
|
||||||
|
|
||||||
|
// Op zich is er minder kans op overflow als we het symbool tijden het inlezen
|
||||||
|
// al richting (0,0) zetten. Dan wordt echter niet meer de definitieve transform
|
||||||
|
// uitgevoerd omdat m_transformed op WD_True staat.
|
||||||
|
// WT_Logical_Point lshift(- m_Origin.m_x,- m_Origin.m_y);
|
||||||
|
//
|
||||||
|
// m_wtFile.heuristics().set_transform(WT_Transform (lshift, 0, 0, 0));
|
||||||
|
// m_wtFile.heuristics().set_apply_transform(true);
|
||||||
|
|
||||||
|
// Do the actual reading.
|
||||||
|
// Een apply_transform is door de aanroeper al op file gezet.
|
||||||
|
// Dankzij set_apply_transform gaat de rest miraculeus vanzelf
|
||||||
|
while ((result = m_wtFile.process_next_object()) == WT_Result::Success)
|
||||||
|
{
|
||||||
|
//myTRACE("Attribute '%s'\n", wtFile->file_stats()->descriptions());
|
||||||
|
switch(m_wtFile.current_object()->object_type())
|
||||||
|
{
|
||||||
|
case WT_Object::Drawable:
|
||||||
|
#ifdef _DEBUG
|
||||||
|
if (m_wtFile.current_object()->object_id() == WT_Object::Origin_ID
|
||||||
|
&& !file.heuristics().allow_binary_data()
|
||||||
|
)
|
||||||
|
{ // Origin is niet toegestaan bij ASCII
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
m_wtFile.current_object()->serialize(file);
|
||||||
|
break;
|
||||||
|
case WT_Object::Attribute:
|
||||||
|
{
|
||||||
|
const WT_Attribute *obj = (WT_Attribute *)m_wtFile.current_object();
|
||||||
|
// myTRACE("Attribute '%s'\n", my_plan_file.file_stats()->descriptions());
|
||||||
|
// Hoewel een Attibute gaat hij toch niet via desired_rendition
|
||||||
|
// Omdat we weten dat we net uit uit een DWF komen kunnen we best
|
||||||
|
// wel rechtstreeks serializen
|
||||||
|
// Let wel: desired_rendition is dan niet meer te vertrouwen. Zie @@@
|
||||||
|
if (obj->object_id() == WT_Object::View_ID)
|
||||||
|
{
|
||||||
|
// De view komt VOOR de Viewport dus wordt niet goed vertaald
|
||||||
|
// bovendien doen we er toch niets mee
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (obj->object_id() == WT_Object::Layer_ID)
|
||||||
|
{
|
||||||
|
// Zou toch wel erg complex worden. Werkt ook maar matig
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (obj->object_id() == WT_Object::Color_ID)
|
||||||
|
{ // Misschien een zwart-wit toggle doorvoeren? Of zelfs highlight?
|
||||||
|
// m_iEPlotSection->get_PaperColor()
|
||||||
|
}
|
||||||
|
if (obj->object_id() == WT_Object::Viewport_ID)
|
||||||
|
{
|
||||||
|
break; // Voorkom dat het Viewport object in de DWF komt
|
||||||
|
// Dan krijgen we last omdat we er op clippen
|
||||||
|
// eigenlijk moeten we de originele viewport
|
||||||
|
// terug zetten na afloop
|
||||||
|
}
|
||||||
|
obj->serialize(file);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//myTRACE("Skipping '%s'\n", wtFile->file_stats()->descriptions());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_wtFile.close();
|
||||||
|
return WT_Result::Success;
|
||||||
|
}
|
||||||
27
SlnkDWFCom/SLNKSymbolDefImpl.h
Normal file
27
SlnkDWFCom/SLNKSymbolDefImpl.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Whiptk/whip_toolkit.h"
|
||||||
|
#include "myWT_File.h"
|
||||||
|
|
||||||
|
class CSLNKSymbolDefinition
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CSLNKSymbolDefinition(CComQIPtr<IEPlotSection> EPlotSection);
|
||||||
|
CSLNKSymbolDefinition(int count, WT_Logical_Point const *points) ;
|
||||||
|
CSLNKSymbolDefinition(CString const filepath, double const height);
|
||||||
|
~CSLNKSymbolDefinition(void);
|
||||||
|
|
||||||
|
CComQIPtr<IEPlotSection> m_iEPlotSection; // Om scope levend te houden
|
||||||
|
myWT_File m_wtFile; // Beetje redundant?
|
||||||
|
WT_Logical_Box m_BoundingBox;
|
||||||
|
WT_Polygon m_BoundingContour;
|
||||||
|
WT_Logical_Point m_Origin;
|
||||||
|
double m_dwgScale;
|
||||||
|
WT_Drawable *asBitmap(int pixeldx, int pixeldy, long paperColor);
|
||||||
|
WT_Result serialize(WT_File & file);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool m_BuiltIn;
|
||||||
|
WT_Result calculateBoundary();
|
||||||
|
WT_PNG_Group4_Image *m_AsBitmap;
|
||||||
|
};
|
||||||
188
SlnkDWFCom/SLNKSymbolImpl.cpp
Normal file
188
SlnkDWFCom/SLNKSymbolImpl.cpp
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
#include "StdAfx.h"
|
||||||
|
#include "myEPlotSection.h"
|
||||||
|
#include "SLNKSymbolDefImpl.h"
|
||||||
|
#include "SLNKSymbolImpl.h"
|
||||||
|
#include "../SLNKDWFImpl/CxImage\CxImage\ximage.h"
|
||||||
|
#include "../SLNKDWFImpl/Whip2DCImpl.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
CSLNKSymbolImpl::CSLNKSymbolImpl(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CSLNKSymbolImpl::~CSLNKSymbolImpl(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
CSLNKSymbolImpl::CSLNKSymbolImpl(double dwgX, double dwgY, CWhipFileState *State)
|
||||||
|
{
|
||||||
|
m_dwgX = dwgX;
|
||||||
|
m_dwgY = dwgY;
|
||||||
|
m_symbolName = "";
|
||||||
|
m_Rotation = 0;
|
||||||
|
m_Scale = 1.0;
|
||||||
|
m_SLNKContour.m_parentWhipFileState = State;
|
||||||
|
m_SLNKContour.m_fromSymbol=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
|
||||||
|
CSLNKSymbolDefinition *symbdef, double hintScale)
|
||||||
|
{
|
||||||
|
ATLASSERT(symbdef != NULL);
|
||||||
|
|
||||||
|
WT_Point3D insertion(m_dwgX, m_dwgY);
|
||||||
|
//m_SLNKContour.m_parentWhipFileState->m_contunits
|
||||||
|
|
||||||
|
double dScale = units.application_to_dwf_transform()(0,0); // Drawing's dScale
|
||||||
|
|
||||||
|
WT_Transform wasTransform = file.heuristics().transform();
|
||||||
|
WT_Boolean wasApplyTransform = file.heuristics().apply_transform();
|
||||||
|
|
||||||
|
WT_Logical_Point LPInsertion = units.transform(insertion);
|
||||||
|
// Onze file had mogelijk al een transform staan. Die moeten we wel blijven ondersteunen
|
||||||
|
// (terugzetten komt wel)
|
||||||
|
if (wasApplyTransform)
|
||||||
|
{
|
||||||
|
LPInsertion *= wasTransform;
|
||||||
|
}
|
||||||
|
// WT_Transform ondersteunt wel rotaties 0,90,180 en 270. Dat gaat echter altijd om DWF 0,0
|
||||||
|
// terwijl wij toch echt om ons insertionpoint willen.
|
||||||
|
// Het (b)lijkt oplosbaar door ons punt te tegenroteren
|
||||||
|
WT_Transform tr0;
|
||||||
|
tr0.set_rotation((360-m_Rotation)%360);
|
||||||
|
LPInsertion *= tr0;
|
||||||
|
|
||||||
|
WT_Result result;
|
||||||
|
|
||||||
|
#ifdef _xDEBUG
|
||||||
|
{ // Cirkel onder het symbool tekenen
|
||||||
|
WT_Logical_Point center = units.transform(insertion);
|
||||||
|
// Binnenkant cirkel
|
||||||
|
file.desired_rendition().color() = WT_Color(128, 128, 128, 0); // doorzichtig werkt (nog) niet voor ellipsen
|
||||||
|
WT_Filled_Ellipse(center, 1500, 1500).serialize(file);
|
||||||
|
// Buitenkant cirkel
|
||||||
|
file.desired_rendition().color() = WT_Color(0, 255, 0, 0); // doorzichtig werkt (nog) niet voor ellipsen
|
||||||
|
file.desired_rendition().line_weight() = WT_Line_Weight(100);
|
||||||
|
WT_Outline_Ellipse(center, 1500, 1500).serialize(file);
|
||||||
|
file.desired_rendition().line_weight() = WT_Line_Weight(0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef _DEBUG
|
||||||
|
{ // klein cirkeltje op insertion
|
||||||
|
WT_Logical_Point center = units.transform(insertion);
|
||||||
|
// Binnenkant cirkel
|
||||||
|
file.desired_rendition().color() = WT_Color(0, 0, 128, 0); // doorzichtig werkt (nog) niet voor ellipsen
|
||||||
|
WT_Filled_Ellipse(center, 50, 50).serialize(file);
|
||||||
|
// Buitenkant cirkel
|
||||||
|
file.desired_rendition().color() = WT_Color(0, 128, 0, 0); // doorzichtig werkt (nog) niet voor ellipsen
|
||||||
|
file.desired_rendition().line_weight() = WT_Line_Weight(10);
|
||||||
|
WT_Outline_Ellipse(center, 50, 50).serialize(file);
|
||||||
|
file.desired_rendition().line_weight() = WT_Line_Weight(0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
// Vertrouw de huidige rendition niet! Het eerste lijntje van een symbool kan default wit verwachten (CO206.DWF)
|
||||||
|
// Tijdens het serializen van het symbool hebben we niets met (desired)_rendition te maken
|
||||||
|
WT_Color().serialize(file); // Op de default zetten. TODO: Moet eigenlijk voor alle attributen
|
||||||
|
|
||||||
|
double dx, dy;
|
||||||
|
|
||||||
|
dx = dy = m_Scale * dScale / symbdef->m_dwgScale;
|
||||||
|
// PAS OP: (SDU tekening) je kunt hier in overflow problemen komen
|
||||||
|
// als dx*symbdef->m_Origin.m_x>MAXINT ofwel eigenlijk al als dx>1.0
|
||||||
|
// ofwel als d(rawing)Scale > symbdef->m_dwgScale (en dan heb ik het nog
|
||||||
|
// niet over verschaalde symbolen).
|
||||||
|
if (dx*symbdef->m_Origin.m_x > INT_MAX || dy*symbdef->m_Origin.m_y > INT_MAX)
|
||||||
|
{
|
||||||
|
throw myCString("\nSLNKDWF symbol coordinate overflow. Possible solutions:"
|
||||||
|
"\nDecrease drawing dwf resolution (%.6f)"
|
||||||
|
"\nIncrease symbool dwf resolution (%.6f)"
|
||||||
|
"\nDecrease symbol scale (%.6f)",dScale, symbdef->m_dwgScale, m_Scale
|
||||||
|
);
|
||||||
|
}
|
||||||
|
//myDoTRACE("\nSymbool m_Scale = %.6f, dScale = %.6f, symbdef->m_dwgScale = %.6f==>dx=%.6g", m_Scale, dScale, symbdef->m_dwgScale, dx);
|
||||||
|
// WT_Logical_Point lshift(LPInsertion);
|
||||||
|
|
||||||
|
WT_Logical_Point lshift(LPInsertion.m_x - myRound(dx*symbdef->m_Origin.m_x),
|
||||||
|
LPInsertion.m_y - myRound(dy*symbdef->m_Origin.m_y));
|
||||||
|
|
||||||
|
file.heuristics().set_transform(WT_Transform (lshift, dx, dy, m_Rotation));
|
||||||
|
file.heuristics().set_apply_transform(true);
|
||||||
|
|
||||||
|
#ifdef NO_BITMAPPEREN
|
||||||
|
// Vooralsnog uitgeschakeld: we hebben de (hoognodige) achtergrondkleur niet
|
||||||
|
Merk op dat builtin symbols (star) geen nog geen boundingbox ingevuld hebben
|
||||||
|
int pixeldx = 1000;
|
||||||
|
int pixeldy = 1000;
|
||||||
|
if (hintScale>0)
|
||||||
|
{
|
||||||
|
WT_Logical_Box bx = symbdef->m_BoundingBox;
|
||||||
|
pixeldx = myRound((bx.maxpt().m_x - bx.minpt().m_x)*m_Scale/symbdef->m_dwgScale/hintScale);
|
||||||
|
pixeldy = myRound((bx.maxpt().m_y - bx.minpt().m_y)*m_Scale/symbdef->m_dwgScale/hintScale);
|
||||||
|
//myDoTRACE("\nbx=(%d,%d)-(%d,%d)",bx.minpt().m_x,bx.minpt().m_y,bx.maxpt().m_x,bx.maxpt().m_y);
|
||||||
|
//myDoTRACE(" makes (%d,%d) pixels",pixeldx,pixeldy);
|
||||||
|
}
|
||||||
|
if ( 0 && pixeldx < 100 && pixeldy < 100 ) // Heel weinig pixels
|
||||||
|
{ // Bitmap versie van het symbool gebruiken
|
||||||
|
//double rescale = 1.0; //m_Scale/symbdef->m_dwgScale*dScale;
|
||||||
|
if (pixeldx > 0 && pixeldy > 0)
|
||||||
|
{
|
||||||
|
symbdef->asBitmap(pixeldx, pixeldy, 0xffffff)->serialize(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{ //Gewone vector versie
|
||||||
|
symbdef->serialize(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
WT_Comments cmt;
|
||||||
|
CString s; s.Format("About to insert symbol contour %s", m_symbolName);
|
||||||
|
cmt.set(s);
|
||||||
|
cmt.serialize(file);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//Cirkeltje op symbool zwaartepunt
|
||||||
|
//file.desired_rendition().color() = WT_Color(255, 0, 0, 0);
|
||||||
|
//WT_Filled_Ellipse(symbdef->m_Center, 50, 50).serialize(file);
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
m_SLNKContour.m_outlineAlpha = 255; // Zichtbaar maken
|
||||||
|
#else
|
||||||
|
m_SLNKContour.m_outlineAlpha = 0; // Onzichtbaar maken
|
||||||
|
#endif
|
||||||
|
// En vervolgens nog een mooi bounding contourtje er om heen.
|
||||||
|
// Die is essentieel voor het aanwijzen. Doordat hierboven de alpha op 0 is gezet wordt hij wel transparant
|
||||||
|
WT_Color().serialize(file); // Op de default zetten.
|
||||||
|
file.desired_rendition().color() = file.rendition().color() = WT_Color();
|
||||||
|
m_SLNKContour.serialize(file, true);
|
||||||
|
|
||||||
|
// Nu contour aanpassen. Is handig voor later teksten bijplaatsen
|
||||||
|
// Echter: die willen we exclusief 'wasTranform' hebben. Daarvoor tegencorrigeren we
|
||||||
|
//
|
||||||
|
LPInsertion = units.transform(insertion);
|
||||||
|
WT_Transform tr1;
|
||||||
|
tr1.set_rotation((360-m_Rotation)%360);
|
||||||
|
LPInsertion *= tr1;
|
||||||
|
lshift = WT_Logical_Point(LPInsertion.m_x - myRound(dx*symbdef->m_Origin.m_x),
|
||||||
|
LPInsertion.m_y - myRound(dy*symbdef->m_Origin.m_y));
|
||||||
|
WT_Transform tm(lshift, dx, dy, m_Rotation);
|
||||||
|
m_SLNKContour.transform(tm); // Pas op: de bounds zijn nu misschien nog verkeerd
|
||||||
|
#if 0
|
||||||
|
// Tegencorrectie werkte niet goed met rotatie. Daarom maar zoals hierboven
|
||||||
|
WT_Transform tm(file.heuristics().transform());
|
||||||
|
WT_Logical_Point wasT(wasTransform.m_translate);
|
||||||
|
WT_Transform tr1;
|
||||||
|
tr1.set_rotation((360-m_Rotation)%360);
|
||||||
|
wasT *= tr1;
|
||||||
|
tm.m_translate.m_x -= wasT.m_x;
|
||||||
|
tm.m_translate.m_y -= wasT.m_y;
|
||||||
|
m_SLNKContour.transform(tm); // Pas op: de bounds zijn nu misschien nog verkeerd
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// En transform weer terug
|
||||||
|
file.heuristics().set_transform(wasTransform);
|
||||||
|
file.heuristics().set_apply_transform(wasApplyTransform);
|
||||||
|
// ASSERT: Deze werkt nu ook m_SLNKContour.serialize(file, true, true);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
27
SlnkDWFCom/SLNKSymbolImpl.h
Normal file
27
SlnkDWFCom/SLNKSymbolImpl.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Whiptk/whip_toolkit.h"
|
||||||
|
#include "SLNKContourImpl.h"
|
||||||
|
|
||||||
|
class CSLNKSymbolImpl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CSLNKSymbolImpl(void);
|
||||||
|
|
||||||
|
CSLNKSymbolImpl(double dwgX, double dwgY, CWhipFileState *State);
|
||||||
|
|
||||||
|
WT_Result serialize (WT_File & file, WT_Units & units,
|
||||||
|
CSLNKSymbolDefinition *symbdef,
|
||||||
|
double hintScale);
|
||||||
|
WT_Result calculateBoundary (myWT_File *wtFile);
|
||||||
|
|
||||||
|
~CSLNKSymbolImpl(void);
|
||||||
|
public:
|
||||||
|
double m_dwgX, m_dwgY;
|
||||||
|
//CString m_Label;
|
||||||
|
//CString m_Key;
|
||||||
|
CString m_symbolName;
|
||||||
|
int m_Rotation;
|
||||||
|
double m_Scale;
|
||||||
|
CSLNKContourImpl m_SLNKContour;
|
||||||
|
};
|
||||||
BIN
SlnkDWFCom/SLNKdwf.aps
Normal file
BIN
SlnkDWFCom/SLNKdwf.aps
Normal file
Binary file not shown.
158
SlnkDWFCom/SLNKdwf.rc
Normal file
158
SlnkDWFCom/SLNKdwf.rc
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
// Microsoft Visual C++ generated resource script.
|
||||||
|
//
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "winres.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English (U.S.) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"#include ""winres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"1 TYPELIB ""SLNKDWF.tlb""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Version
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "SLNKDWFVersion.h"
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION SLNK_MAJOR_VERSION, SLNK_MINOR_VERSION, 0, SLNK_BUILD_VERSION
|
||||||
|
PRODUCTVERSION SLNK_MAJOR_VERSION, SLNK_MINOR_VERSION, 0, SLNK_BUILD_VERSION
|
||||||
|
FILEFLAGSMASK 0x1fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x4L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "Dijkoraad IT"
|
||||||
|
VALUE "FileDescription", "Superlink DWF "
|
||||||
|
VALUE "FileVersion", SLNK_BUILDVERSION "\0"
|
||||||
|
VALUE "InternalName", "SLNKDWF.dll"
|
||||||
|
VALUE "LegalCopyright", "(c) Dijkoraad IT 2005-2007. All rights reserved."
|
||||||
|
VALUE "OriginalFilename", "SLNKDWF.dll"
|
||||||
|
VALUE "ProductName", "Superlink"
|
||||||
|
VALUE "ProductVersion", SLNK_BUILDVERSION "\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// REGISTRY
|
||||||
|
//
|
||||||
|
|
||||||
|
IDR_SLNKDWF REGISTRY "SLNKDWF.rgs"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// String Table
|
||||||
|
//
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_PROJNAME "SLNKDWF"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // English (U.S.) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Dutch (Netherlands) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLD)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_DUTCH, SUBLANG_DUTCH
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// REGISTRY
|
||||||
|
//
|
||||||
|
|
||||||
|
IDR_DWFFILE REGISTRY "DWFFile.rgs"
|
||||||
|
IDR_WHIPFILE REGISTRY "WhipFile.rgs"
|
||||||
|
IDR_WHIP2PNG REGISTRY "Whip2PNG.rgs"
|
||||||
|
IDR_ABOUT REGISTRY "About.rgs"
|
||||||
|
IDR_EPLOTSECTION REGISTRY "EPlotSection.rgs"
|
||||||
|
IDR_EPLOTSECTIONS REGISTRY "EPlotSections.rgs"
|
||||||
|
IDR_SLNKEVENT REGISTRY "SLNKEvent.rgs"
|
||||||
|
IDR_BOUNDINGBOX REGISTRY "BoundingBox.rgs"
|
||||||
|
IDR_DWGPOINT REGISTRY "DWGPoint.rgs"
|
||||||
|
IDR_SLNKCONTOUR REGISTRY "SLNKContour.rgs"
|
||||||
|
IDR_SLNKSYMBOL REGISTRY "SLNKSymbol.rgs"
|
||||||
|
IDR_OPTIONS REGISTRY "Options.rgs"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Bitmap
|
||||||
|
//
|
||||||
|
|
||||||
|
#endif // Dutch (Netherlands) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
1 TYPELIB "SLNKDWF.tlb"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
608
SlnkDWFCom/Whip2PNG.cpp
Normal file
608
SlnkDWFCom/Whip2PNG.cpp
Normal file
@@ -0,0 +1,608 @@
|
|||||||
|
// Whip2PNG.cpp : Implementation of CWhip2PNG
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "CxImage\CxImage\ximage.h"
|
||||||
|
|
||||||
|
#include "Whip2DCImpl.h"
|
||||||
|
|
||||||
|
#include "Whip2PNG.h"
|
||||||
|
|
||||||
|
#include "metafile.h"
|
||||||
|
|
||||||
|
CWhip2PNG::CWhip2PNG()
|
||||||
|
{
|
||||||
|
m_sizeX = 800;
|
||||||
|
m_sizeY = 600;
|
||||||
|
m_offsetX = 0;
|
||||||
|
m_offsetY = 0;
|
||||||
|
m_dScale = 1.0;
|
||||||
|
m_lRotation = 0;
|
||||||
|
m_RegExp = ".*";
|
||||||
|
m_forcePaper = FALSE;
|
||||||
|
m_forceBW = FALSE;
|
||||||
|
m_forceGray = FALSE;
|
||||||
|
m_Maximize = FALSE;
|
||||||
|
m_dwgScale = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::Load(BSTR WhipPath)
|
||||||
|
{
|
||||||
|
myDoTRACE("\nCWhip2PNG::Load('%ls')", WhipPath);
|
||||||
|
|
||||||
|
m_WhipPath = WhipPath;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::LoadStream(VARIANT EPlotStream)
|
||||||
|
{
|
||||||
|
myDoTRACE("\nCWhip2PNG::LoadStream()");
|
||||||
|
|
||||||
|
if (EPlotStream.vt!=VT_ERROR)
|
||||||
|
{
|
||||||
|
VARIANT *var2 = &EPlotStream;
|
||||||
|
if (var2->vt==(VT_VARIANT|VT_BYREF)) // ByRef
|
||||||
|
var2 = (VARIANT *)var2->pvarVal;
|
||||||
|
|
||||||
|
if (var2->vt==VT_DISPATCH)
|
||||||
|
{
|
||||||
|
m_iEPlotSection = var2->pdispVal;
|
||||||
|
if (!m_iEPlotSection)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Werkt nog niet echt goed?
|
||||||
|
STDMETHODIMP CWhip2PNG::SaveAsWMF(BSTR WMFPath)
|
||||||
|
{
|
||||||
|
CmyTimer timer("CWhip2PNG::SaveAsWMF");
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
HDC myDC = CreateEnhMetaFile(NULL,CString(WMFPath),NULL,NULL); // In memory
|
||||||
|
InitDC(myDC);
|
||||||
|
|
||||||
|
if (m_forcePaper)
|
||||||
|
HRESULT res = m_iWhip2DC.set_paperColor(m_paperColor);
|
||||||
|
res = m-iWhip2DC->Paint(m_forceBW);
|
||||||
|
HENHMETAFILE hMF = CloseEnhMetaFile(myDC);
|
||||||
|
DeleteEnhMetaFile(hMF);
|
||||||
|
DeleteDC(myDC);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
HDC myDC = CreateMetaFile(NULL); // In memory
|
||||||
|
InitDC(myDC);
|
||||||
|
|
||||||
|
HRESULT res;
|
||||||
|
if (m_forcePaper)
|
||||||
|
res = m_iWhip2DC.put_paperColor(m_paperColor);
|
||||||
|
res = m_iWhip2DC.Paint(m_forceBW);
|
||||||
|
|
||||||
|
HMETAFILE hMF = CloseMetaFile(myDC);
|
||||||
|
CMetafile::WriteMetaFileAsPlaceable(hMF, CSize(m_sizeX, m_sizeY),m_sizeX/4,CString(WMFPath));
|
||||||
|
DeleteMetaFile(hMF);
|
||||||
|
DeleteDC(myDC);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
putDWGInfo(); // Generieke info naar het event
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWhip2PNG::CreateCxImage(CxImage *img)
|
||||||
|
{
|
||||||
|
CmyTimer timer("CWhip2PNG::CreateCXImage");
|
||||||
|
|
||||||
|
bool res = true;
|
||||||
|
|
||||||
|
//----
|
||||||
|
HDC pDC = ::GetDC(0);
|
||||||
|
HDC myDC = CreateCompatibleDC(pDC);
|
||||||
|
//ReleaseDC(pDC);
|
||||||
|
InitDC(myDC); // Stelt ook definitieve m_SizeX en m_SizeY vast
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
|
||||||
|
BITMAPINFO bmInfo;
|
||||||
|
memset(&bmInfo.bmiHeader,0,sizeof(BITMAPINFOHEADER));
|
||||||
|
bmInfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
|
||||||
|
bmInfo.bmiHeader.biWidth=m_sizeX;
|
||||||
|
bmInfo.bmiHeader.biHeight=m_sizeY;
|
||||||
|
bmInfo.bmiHeader.biPlanes=1;
|
||||||
|
bmInfo.bmiHeader.biCompression=BI_RGB; // Geen compressie
|
||||||
|
bmInfo.bmiHeader.biBitCount=24;
|
||||||
|
|
||||||
|
//create a new bitmap and select it in the memory dc
|
||||||
|
BYTE *pbase;
|
||||||
|
HBITMAP TmpBmp = CreateDIBSection(pDC, &bmInfo,DIB_RGB_COLORS,(void**)&pbase,0,0);
|
||||||
|
//----
|
||||||
|
#else
|
||||||
|
// Deze werkt ook wel maar is 10% langzamer? Je zou sneller verwachten?
|
||||||
|
// Bovendien ben je nu afhankelijk van de display instellingen?
|
||||||
|
// En het converteren CreateFromHBITMAP is veel langzamer
|
||||||
|
HBITMAP TmpBmp = CreateCompatibleBitmap ( pDC, m_sizeX, m_sizeY );
|
||||||
|
//BITMAP bm;
|
||||||
|
//GetObject(TmpBmp, sizeof(BITMAP), (LPSTR) &bm);
|
||||||
|
//als bm.bmBits nu NULL is hebben we wel een echte DFB;
|
||||||
|
#endif
|
||||||
|
if (!TmpBmp)
|
||||||
|
{
|
||||||
|
myDoTRACE("\nTmpBmp==NULL when creating (%d, %d)??", m_sizeX, m_sizeY);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
HGDIOBJ TmpObj=SelectObject(myDC,TmpBmp);
|
||||||
|
|
||||||
|
if (m_forcePaper)
|
||||||
|
m_iWhip2DC.put_paperColor(m_paperColor);
|
||||||
|
|
||||||
|
res = res && SUCCEEDED(m_iWhip2DC.Paint(m_forceBW));
|
||||||
|
if (!res)myDoTRACE("Paint faalt??");
|
||||||
|
|
||||||
|
if (!img->CreateFromHBITMAP(TmpBmp))
|
||||||
|
{
|
||||||
|
myDoTRACE("CreateFromHBITMAP faalt??");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (m_lRotation%360 == 90 || m_lRotation%360 == -270)
|
||||||
|
img->RotateLeft();
|
||||||
|
|
||||||
|
if (m_lRotation%360 == -90 || m_lRotation%360 == 270)
|
||||||
|
img->RotateRight();
|
||||||
|
|
||||||
|
if (m_lRotation == -180 || m_lRotation == 180) // Voor te draggen symbolen
|
||||||
|
img->Rotate180();
|
||||||
|
|
||||||
|
putDWGInfo(); // Generieke info naar het event
|
||||||
|
|
||||||
|
DeleteObject(TmpBmp);
|
||||||
|
DeleteDC(myDC);
|
||||||
|
ReleaseDC( NULL, pDC ); //Do not forget!
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Alleen gebruikt in testscripts
|
||||||
|
STDMETHODIMP CWhip2PNG::SaveAsPNG(BSTR PNGPath)
|
||||||
|
{
|
||||||
|
myDoTRACE("\nCWhip2PNG::SaveAsPNG('%ls')", PNGPath);
|
||||||
|
|
||||||
|
CxImage img;
|
||||||
|
bool res = CreateCxImage(&img);
|
||||||
|
if (!res)
|
||||||
|
{
|
||||||
|
CString err; err.Format("Could not CreateCxImage: %s", img.GetLastError());
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "\nCWhip2PNG::SaveAsPNG('%ls')\n%s", (LPCSTR)m_WhipPath, err);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
CmyTimer timer("PNG Save");
|
||||||
|
|
||||||
|
if (!img.Save(CString(PNGPath), CXIMAGE_FORMAT_PNG))
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "\nSaveAsPNG save failed: %s", img.GetLastError());
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Handig om GetIMG.asp errormessages te laten opleveren
|
||||||
|
// Ondersteunt ook m_Maximize: dan wordt de witruimte geminimaliseerd;
|
||||||
|
STDMETHODIMP CWhip2PNG::TextAsPNG(BSTR Message, VARIANT *ImageData)
|
||||||
|
{
|
||||||
|
// Indirect via een tempDC omdat anders de CompatibleBitmap Z/W wordt
|
||||||
|
// TODO: Als de server Windows in 256 kleuren draait, wat krijg je dan?
|
||||||
|
HDC tempDC = CreateDC("DISPLAY",NULL,NULL,NULL);
|
||||||
|
HDC myDC = CreateCompatibleDC ( tempDC );
|
||||||
|
|
||||||
|
CString tok(Message);
|
||||||
|
tok.Replace("~", "\n"); // We ondersteunen ook ~ als newline
|
||||||
|
RECT rc = { 0, 0, m_sizeX, 0};
|
||||||
|
DrawText(myDC, tok, tok.GetLength(), &rc, DT_CALCRECT); // Grootte bepalen
|
||||||
|
|
||||||
|
if (m_Maximize)
|
||||||
|
{
|
||||||
|
m_sizeX = rc.right;
|
||||||
|
m_sizeY = rc.bottom;
|
||||||
|
}
|
||||||
|
HBITMAP memBM = CreateCompatibleBitmap ( tempDC, m_sizeX, m_sizeY );
|
||||||
|
DeleteDC(tempDC);
|
||||||
|
SelectObject(myDC, memBM);
|
||||||
|
HBRUSH tempBrush = CreateSolidBrush(RGB(255,255,255));
|
||||||
|
HBRUSH oldbrush = (HBRUSH) SelectObject(myDC,tempBrush);
|
||||||
|
FillRect(myDC,CRect(0,0,m_sizeX, m_sizeY),tempBrush);
|
||||||
|
SelectObject(myDC,oldbrush);
|
||||||
|
DeleteObject(tempBrush);
|
||||||
|
|
||||||
|
// Nu het echte tekenen
|
||||||
|
rc.top = m_sizeY/2 - rc.bottom/2; // Vertikaal centreren
|
||||||
|
rc.bottom = m_sizeY/2 + rc.bottom/2;
|
||||||
|
DrawText(myDC, tok, tok.GetLength(), &rc, DT_TOP);
|
||||||
|
|
||||||
|
CxImage img;
|
||||||
|
if (!img.CreateFromHBITMAP(memBM))
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "\nTextAsPNG CreateFromHBITMAP failed: %s", img.GetLastError());
|
||||||
|
|
||||||
|
DeleteObject(memBM);
|
||||||
|
DeleteDC(tempDC);
|
||||||
|
DeleteDC(myDC);
|
||||||
|
|
||||||
|
return StreamPNG(img, ImageData, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Als we dan toch door de tekening zijn gegaan is het soms
|
||||||
|
// wel handig informatie over de tekening te hebben
|
||||||
|
// Dat stoppen we grotendeels in m_SLNKEvent
|
||||||
|
void CWhip2PNG::putDWGInfo()
|
||||||
|
{
|
||||||
|
HRESULT res;
|
||||||
|
res = m_iWhip2DC.get_paperColor((LONG*)&m_paperColor); // Weten we nu ook
|
||||||
|
|
||||||
|
double resX, resY;
|
||||||
|
|
||||||
|
res = m_iWhip2DC.DPtoDWG(0, m_sizeY, &resX, &resY);
|
||||||
|
CComQIPtr<IBoundingBox> bbView;
|
||||||
|
m_SLNKEvent->get_viewExtents(&bbView);
|
||||||
|
CComQIPtr<IDWGPoint> pt;
|
||||||
|
bbView->get_min(&pt);
|
||||||
|
pt->put_DwgX(resX);
|
||||||
|
pt->put_DwgY(resY);
|
||||||
|
pt.Release(); // Voor re-use
|
||||||
|
|
||||||
|
res = m_iWhip2DC.DPtoDWG(m_sizeX, 0, &resX, &resY);
|
||||||
|
bbView->get_max(&pt);
|
||||||
|
pt->put_DwgX(resX);
|
||||||
|
pt->put_DwgY(resY);
|
||||||
|
pt.Release();
|
||||||
|
|
||||||
|
double resMX, resMY;
|
||||||
|
res = m_iWhip2DC.DWGExtents(&resX, &resY, &resMX, &resMY);
|
||||||
|
|
||||||
|
CComQIPtr<IBoundingBox> bbDWG;
|
||||||
|
m_SLNKEvent->get_dwgExtents(&bbDWG);
|
||||||
|
bbDWG->get_min(&pt);
|
||||||
|
pt->put_DwgX(resX);
|
||||||
|
pt->put_DwgY(resY);
|
||||||
|
pt.Release();
|
||||||
|
|
||||||
|
bbDWG->get_max(&pt);
|
||||||
|
pt->put_DwgX(resMX);
|
||||||
|
pt->put_DwgY(resMY);
|
||||||
|
pt.Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Zoek een punt dat de gebruiker in de tekening geklikt heeft.
|
||||||
|
// Er wordt alleen een simpele tekst opgeleverd (hetzij aangeklikte truetype tekst
|
||||||
|
// of een Contour label). Meer details zijn via get_SLNKEvent te verkrijgen
|
||||||
|
STDMETHODIMP CWhip2PNG::Find(LONG findX, LONG findY, BSTR* foundLabel)
|
||||||
|
{
|
||||||
|
CmyTimer timer("CWhip2PNG::Find");
|
||||||
|
|
||||||
|
HDC pDC = ::GetDC(0);
|
||||||
|
HDC myDC = CreateCompatibleDC(pDC);
|
||||||
|
//ReleaseDC(pDC);
|
||||||
|
// Er hoeft geen bitmap naar myDC omdat we toch niet painten
|
||||||
|
InitDC(myDC);
|
||||||
|
|
||||||
|
CString ContourLabel, ContourLayer, TextLabel, TextLayer;
|
||||||
|
HRESULT res = m_iWhip2DC.Find(findX, findY,
|
||||||
|
FALSE,
|
||||||
|
ContourLabel, ContourLayer, TextLabel, TextLayer);
|
||||||
|
|
||||||
|
if (TextLabel != "")
|
||||||
|
(*foundLabel) = TextLabel.AllocSysString();
|
||||||
|
else if (ContourLabel != "")
|
||||||
|
(*foundLabel) = ContourLabel.AllocSysString();
|
||||||
|
|
||||||
|
double resX, resY;
|
||||||
|
res = m_iWhip2DC.DPtoDWG(findX, findY, &resX, &resY);
|
||||||
|
m_SLNKEvent->put_DwgX(resX);
|
||||||
|
m_SLNKEvent->put_DwgY(resY);
|
||||||
|
|
||||||
|
m_SLNKEvent->put_ContourLabel(CComBSTR(ContourLabel));
|
||||||
|
m_SLNKEvent->put_ContourLayer(CComBSTR(ContourLayer));
|
||||||
|
m_SLNKEvent->put_TextLabel(CComBSTR(TextLabel));
|
||||||
|
m_SLNKEvent->put_TextLayer(CComBSTR(TextLayer));
|
||||||
|
|
||||||
|
putDWGInfo(); // Generieke info naar het event
|
||||||
|
|
||||||
|
DeleteDC(myDC);
|
||||||
|
ReleaseDC( NULL, pDC ); //Do not forget!
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::SetDimensions(LONG sizeX, LONG sizeY, // PNG image size
|
||||||
|
LONG offsetX, LONG offsetY, // Panning
|
||||||
|
DOUBLE dScale, // Zooming, 1.0 default
|
||||||
|
LONG lRotation) // Rotation, 0 default, multiple of 90
|
||||||
|
{
|
||||||
|
if (sizeX*dScale <=0 ||
|
||||||
|
sizeY*dScale <=0 ||
|
||||||
|
sizeX*dScale >=LONG_MAX+0.5 ||
|
||||||
|
sizeY*dScale >=LONG_MAX+0.5)
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "\nCWhip2PNG::SetDimensions invalid zoom");
|
||||||
|
|
||||||
|
m_sizeX = sizeX;
|
||||||
|
m_sizeY = sizeY;
|
||||||
|
m_offsetX = offsetX;
|
||||||
|
m_offsetY = offsetY;
|
||||||
|
m_dScale = dScale;
|
||||||
|
m_lRotation = lRotation;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::GetAsMap(BSTR* AsMap)
|
||||||
|
{
|
||||||
|
myDoTRACE("\nCWhip2PNG::GetAsMAP()");
|
||||||
|
CmyTimer timer("CWhip2PNG::GetAsMap");
|
||||||
|
|
||||||
|
HDC pDC = ::GetDC(0);
|
||||||
|
HDC myDC = CreateCompatibleDC(pDC);
|
||||||
|
|
||||||
|
// Er hoeft geen bitmap naar myDC omdat we toch niet painten
|
||||||
|
// Let wel: daardoor kunnen we niet optimaliseren met RectVisible?
|
||||||
|
InitDC(myDC);
|
||||||
|
//ReleaseDC(pDC);
|
||||||
|
|
||||||
|
CString result, dummy;
|
||||||
|
HRESULT res = m_iWhip2DC.Find(0, 0,
|
||||||
|
TRUE, /*AsMap*/
|
||||||
|
result, dummy, dummy, dummy);
|
||||||
|
|
||||||
|
// Als we dan toch door de tekening zijn gegaan is dit wel handig om te hebben
|
||||||
|
putDWGInfo(); // Generieke info naar het event
|
||||||
|
|
||||||
|
(*AsMap) = result.AllocSysString();
|
||||||
|
|
||||||
|
DeleteDC(myDC);
|
||||||
|
ReleaseDC( NULL, pDC ); //Do not forget!
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Testfunctie om RegExp's te testen
|
||||||
|
STDMETHODIMP CWhip2PNG::get_AtlRegExp(BSTR RegExp, BSTR TestExp, BSTR* pVal)
|
||||||
|
{
|
||||||
|
CAtlRegExp<> reLayers; // Welke layers moeten aan
|
||||||
|
REParseError status = reLayers.Parse( CString(RegExp), false );
|
||||||
|
if (REPARSE_ERROR_OK != status)
|
||||||
|
{
|
||||||
|
myTRACE("\nSorry, kan reguliere expressie layersOn niet parsen");
|
||||||
|
// Unexpected error.
|
||||||
|
return S_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
CAtlREMatchContext<> mcUrl;
|
||||||
|
//CAtlREMatchContext<> mcUrl2;
|
||||||
|
|
||||||
|
BOOL b1 = reLayers.Match(CString(TestExp), &mcUrl);
|
||||||
|
// b &= (mcUrl.m_uNumGroups > 0);
|
||||||
|
CString res;
|
||||||
|
res.Format("Testing: %ls for %ls: %d", RegExp, TestExp, b1);
|
||||||
|
CComBSTR bstrString(res);
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stream een CImage als PNG (bPNG) of als GIF (!bPNG)
|
||||||
|
HRESULT CWhip2PNG::StreamPNG(CxImage &img, VARIANT *ImageData, BOOL bPNG)
|
||||||
|
{
|
||||||
|
SAFEARRAY *psaData; BYTE *pData;
|
||||||
|
SAFEARRAYBOUND rgsabound[1];
|
||||||
|
|
||||||
|
long size=0;
|
||||||
|
BYTE* pBuffer=0;
|
||||||
|
{
|
||||||
|
{
|
||||||
|
CmyTimer timer("CWhip2PNG::StreamPNG/de PNG encoden");
|
||||||
|
if (!img.Encode(pBuffer,size, bPNG?CXIMAGE_FORMAT_PNG:CXIMAGE_FORMAT_GIF))
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "\nStreamPNG encode failed: %s", img.GetLastError());
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Echt netjes zou zijn om hier een IStream op te leveren?
|
||||||
|
// create safe array and copy image data
|
||||||
|
rgsabound[0].lLbound = 0; rgsabound[0].cElements = size;
|
||||||
|
psaData = SafeArrayCreate(VT_UI1, 1, rgsabound);
|
||||||
|
SafeArrayAccessData(psaData, (void **)&pData);
|
||||||
|
memcpy(pData,pBuffer,size);
|
||||||
|
SafeArrayUnaccessData(psaData);
|
||||||
|
img.FreeMemory (pBuffer);
|
||||||
|
// put data in variant
|
||||||
|
ImageData->vt = (VT_ARRAY | VT_UI1);
|
||||||
|
ImageData->parray = psaData;
|
||||||
|
}
|
||||||
|
myDoTRACE("\nCWhip2PNG::StreamPNG done, sending %d bytes", size);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draggable symbolen
|
||||||
|
STDMETHODIMP CWhip2PNG::GetAsTransGIF(VARIANT *ImageData)
|
||||||
|
{
|
||||||
|
return CWhip2PNG::GetAsXXX(ImageData, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::GetAsPNG(VARIANT *ImageData)
|
||||||
|
{
|
||||||
|
return CWhip2PNG::GetAsXXX(ImageData, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::GetAsXXX(VARIANT *ImageData, BOOL bPNG)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
myDoTRACE("\nCWhip2PNG::GetAsPNG()");
|
||||||
|
|
||||||
|
CxImage img;
|
||||||
|
BOOL res = CreateCxImage(&img);
|
||||||
|
if (!res)
|
||||||
|
{
|
||||||
|
CString err; err.Format("Could not CreateCxImage: %s", img.GetLastError());
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bPNG)
|
||||||
|
{ // Transparante GIF.
|
||||||
|
RGBQUAD back = {GetBValue(m_paperColor), // RGBQUAD is BGR!!
|
||||||
|
GetGValue(m_paperColor),
|
||||||
|
GetRValue(m_paperColor),0};
|
||||||
|
if (m_forceGray)
|
||||||
|
{
|
||||||
|
img.GrayScale();
|
||||||
|
BYTE gray = RGB2GRAY(GetRValue(m_paperColor),
|
||||||
|
GetGValue(m_paperColor),
|
||||||
|
GetBValue(m_paperColor));
|
||||||
|
back.rgbBlue = back.rgbGreen = back.rgbRed = gray;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
}
|
||||||
|
// GIF is 8 bit.
|
||||||
|
img.DecreaseBpp(8, FALSE);
|
||||||
|
img.SetTransIndex(img.GetNearestIndex(back));
|
||||||
|
// GIF kent geen Alpha, IE6 geen PNG transparantie
|
||||||
|
//img.AlphaCreate();
|
||||||
|
//img.AlphaSet(192);
|
||||||
|
}
|
||||||
|
return StreamPNG(img, ImageData, bPNG);
|
||||||
|
}
|
||||||
|
catch (DWFException& ex)
|
||||||
|
{
|
||||||
|
CString err;
|
||||||
|
err.Format("%ls\n%ls\n%s\n%ls(%d)",ex.type(),ex.message(),ex.function(),ex.file(),ex.line());
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "\nCWhip2PNG::GetAsPNG('%s')\n%s", m_WhipPath, err);
|
||||||
|
}
|
||||||
|
catch (CString& err)
|
||||||
|
{
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "\nCWhip2PNG::GetAsPNG('%s')\n%s", m_WhipPath, err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::SetLayers(BSTR RegExp)
|
||||||
|
{
|
||||||
|
m_RegExp = RegExp;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::get_SLNKEvent(ISLNKEvent** pVal)
|
||||||
|
{
|
||||||
|
return m_SLNKEvent->QueryInterface(IID_ISLNKEvent, (void**)pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWhip2PNG::InitDC(HDC &myDC)
|
||||||
|
{
|
||||||
|
SetViewportOrgEx(myDC, m_offsetX, m_offsetY, NULL);
|
||||||
|
CEPlotSectionImpl *epli = NULL;
|
||||||
|
if (m_iEPlotSection) // Via stream?
|
||||||
|
m_iEPlotSection->get_EPlotSectionImpl((BYTE **)&epli);
|
||||||
|
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);
|
||||||
|
|
||||||
|
// Als m_dwgScale was gespecificeerd moeten we wel een goede bitmapgrootte kiezen
|
||||||
|
if (m_dwgScale > 0.0)
|
||||||
|
{
|
||||||
|
CSize newsize = m_iWhip2DC.get_Size();
|
||||||
|
m_sizeX = newsize.cx; // Veronderstel m_dScale = 1.0
|
||||||
|
m_sizeY = newsize.cy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
STDMETHODIMP CWhip2PNG::get_paperColor(LONG* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_paperColor;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::put_paperColor(LONG newVal)
|
||||||
|
{
|
||||||
|
m_paperColor = newVal;
|
||||||
|
m_forcePaper = TRUE;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Zet een vertaal kleur (afhankelijk van papierkleur)
|
||||||
|
STDMETHODIMP CWhip2PNG::ReplaceColor(LONG paperColor, LONG oldColor, LONG newColor)
|
||||||
|
{
|
||||||
|
m_iWhip2DC.ReplaceColor(paperColor, oldColor, newColor);
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::get_Maximize(VARIANT_BOOL* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_Maximize;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::put_Maximize(VARIANT_BOOL newVal)
|
||||||
|
{
|
||||||
|
m_Maximize = newVal;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::get_dwgScale(DOUBLE* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_dwgScale;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::put_dwgScale(DOUBLE newVal)
|
||||||
|
{
|
||||||
|
if (newVal <= 0.0)
|
||||||
|
return myAtlReportError (GetObjectCLSID(), "\nInvalid dwgScale");
|
||||||
|
|
||||||
|
m_dwgScale = newVal;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::get_forceBW(VARIANT_BOOL* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_forceBW;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::put_forceBW(VARIANT_BOOL newVal)
|
||||||
|
{
|
||||||
|
m_forceBW = newVal;
|
||||||
|
if (m_forceBW)
|
||||||
|
{
|
||||||
|
m_paperColor = 0xFFFFFF; // Op wit alvast
|
||||||
|
m_forcePaper = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::get_forceGray(VARIANT_BOOL* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_forceGray;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CWhip2PNG::put_forceGray(VARIANT_BOOL newVal)
|
||||||
|
{
|
||||||
|
m_forceGray = newVal;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
121
SlnkDWFCom/Whip2PNG.h
Normal file
121
SlnkDWFCom/Whip2PNG.h
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
// Whip2PNG.h : Declaration of the CWhip2PNG
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
#include "SLNKEvent.h"
|
||||||
|
|
||||||
|
// CWhip2PNG
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CWhip2PNG :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CWhip2PNG, &CLSID_Whip2PNG>,
|
||||||
|
public IDispatchImpl<IWhip2PNG, &IID_IWhip2PNG, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
DECLARE_REGISTRY_RESOURCEID(IDR_WHIP2PNG)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CWhip2PNG)
|
||||||
|
COM_INTERFACE_ENTRY(IWhip2PNG)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
CComObject<CSLNKEvent> *pSLNKEvent; // For when the user has clicked on the drawing
|
||||||
|
HRESULT hr = CComObject<CSLNKEvent>::CreateInstance(&pSLNKEvent);
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
pSLNKEvent->AddRef();
|
||||||
|
hr = pSLNKEvent->QueryInterface(IID_ISLNKEvent, (void **)&m_SLNKEvent);
|
||||||
|
pSLNKEvent->Release();
|
||||||
|
if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
// CComObject< CWhip2DC >* pWhip2DC;
|
||||||
|
// hr = CComObject<CWhip2DC>::CreateInstance(&pWhip2DC);
|
||||||
|
// if(FAILED(hr)) return hr;
|
||||||
|
|
||||||
|
// pWhip2DC->AddRef();
|
||||||
|
// hr = pWhip2DC->QueryInterface(&m_iWhip2DC);
|
||||||
|
// pWhip2DC->Release();
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
CWhip2PNG(); // Default constructor
|
||||||
|
|
||||||
|
// Een van de volgende twee moet gebruikt worden om de file te laden
|
||||||
|
STDMETHOD(Load)(BSTR WhipPath);
|
||||||
|
STDMETHOD(LoadStream)(VARIANT EPlotStream);
|
||||||
|
|
||||||
|
STDMETHOD(SetDimensions)(LONG sizeX, LONG sizeY, LONG offsetX, LONG offsetY, DOUBLE dScale, LONG lRotation);
|
||||||
|
STDMETHOD(SetLayers)(BSTR RegExp);
|
||||||
|
|
||||||
|
STDMETHOD(SaveAsPNG)(BSTR PNGPath);
|
||||||
|
STDMETHOD(SaveAsWMF)(BSTR WMFPath);
|
||||||
|
|
||||||
|
STDMETHOD(TextAsPNG)(BSTR Message, VARIANT *ImageData);
|
||||||
|
STDMETHOD(GetAsPNG)(VARIANT *ImageData);
|
||||||
|
STDMETHOD(GetAsTransGIF)(VARIANT *ImageData);
|
||||||
|
STDMETHOD(GetAsXXX)(VARIANT *ImageData, BOOL bPNG);
|
||||||
|
|
||||||
|
STDMETHOD(Find)(LONG findX, LONG findY, BSTR* foundLabel);
|
||||||
|
STDMETHOD(GetAsMap)(BSTR* AsMap);
|
||||||
|
STDMETHOD(get_AtlRegExp)(BSTR RegExp, BSTR TestExp, BSTR* pVal);
|
||||||
|
private:
|
||||||
|
bool CreateCxImage(CxImage* img);
|
||||||
|
void InitDC(HDC &myDC);
|
||||||
|
|
||||||
|
HRESULT StreamPNG(CxImage &img, VARIANT *ImageData, BOOL bPNG);
|
||||||
|
|
||||||
|
CComQIPtr<ISLNKEvent> m_SLNKEvent; // For when the user has clicked on the drawing
|
||||||
|
// Will also hold minmax drawing XY?
|
||||||
|
|
||||||
|
//CComQIPtr<IWhip2DC> m_iWhip2DC;
|
||||||
|
CWhip2DCImpl m_iWhip2DC;
|
||||||
|
|
||||||
|
// Een van de volgende twee zal gezet zijn
|
||||||
|
CComQIPtr<IEPlotSection> m_iEPlotSection;
|
||||||
|
CString m_WhipPath;
|
||||||
|
|
||||||
|
void putDWGInfo();
|
||||||
|
|
||||||
|
LONG m_sizeX, m_sizeY;
|
||||||
|
LONG m_offsetX, m_offsetY;
|
||||||
|
double m_dScale;
|
||||||
|
LONG m_lRotation;
|
||||||
|
COLORREF m_paperColor; BOOL m_forcePaper;
|
||||||
|
BOOL m_forceBW;
|
||||||
|
BOOL m_forceGray;
|
||||||
|
BOOL m_Maximize;
|
||||||
|
double m_dwgScale;
|
||||||
|
|
||||||
|
CString m_RegExp;
|
||||||
|
public:
|
||||||
|
STDMETHOD(get_SLNKEvent)(ISLNKEvent** pVal);
|
||||||
|
STDMETHOD(get_paperColor)(LONG* pVal);
|
||||||
|
STDMETHOD(put_paperColor)(LONG newVal);
|
||||||
|
STDMETHOD(ReplaceColor)(LONG paperColor, LONG oldColor, LONG newColor);
|
||||||
|
STDMETHOD(get_Maximize)(VARIANT_BOOL* pVal);
|
||||||
|
STDMETHOD(put_Maximize)(VARIANT_BOOL newVal);
|
||||||
|
STDMETHOD(get_dwgScale)(DOUBLE* pVal);
|
||||||
|
STDMETHOD(put_dwgScale)(DOUBLE newVal);
|
||||||
|
STDMETHOD(get_forceBW)(VARIANT_BOOL* pVal);
|
||||||
|
STDMETHOD(put_forceBW)(VARIANT_BOOL newVal);
|
||||||
|
STDMETHOD(get_forceGray)(VARIANT_BOOL* pVal);
|
||||||
|
STDMETHOD(put_forceGray)(VARIANT_BOOL newVal);
|
||||||
|
};
|
||||||
|
|
||||||
|
OBJECT_ENTRY_AUTO(__uuidof(Whip2PNG), CWhip2PNG)
|
||||||
27
SlnkDWFCom/Whip2PNG.rgs
Normal file
27
SlnkDWFCom/Whip2PNG.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.Whip2PNG.1 = s 'Whip2PNG Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{783AC7F0-E6E1-4CE1-A38B-FA047D44DC1C}'
|
||||||
|
}
|
||||||
|
SLNKDWF.Whip2PNG = s 'Whip2PNG Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{783AC7F0-E6E1-4CE1-A38B-FA047D44DC1C}'
|
||||||
|
CurVer = s 'SLNKDWF.Whip2PNG.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {783AC7F0-E6E1-4CE1-A38B-FA047D44DC1C} = s 'Whip2PNG Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.Whip2PNG.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.Whip2PNG'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1065
SlnkDWFCom/WhipFile.cpp
Normal file
1065
SlnkDWFCom/WhipFile.cpp
Normal file
File diff suppressed because it is too large
Load Diff
193
SlnkDWFCom/WhipFile.h
Normal file
193
SlnkDWFCom/WhipFile.h
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
// WhipFile.h : Declaration of the CWhipFile
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
#include "whiptk\whip_toolkit.h"
|
||||||
|
#include "myWT_File.h"
|
||||||
|
|
||||||
|
using namespace DWFCore;
|
||||||
|
using namespace DWFToolkit;
|
||||||
|
|
||||||
|
#include "SLNKContourImpl.h"
|
||||||
|
#include "SLNKSymbol.h"
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
|
||||||
|
class CWhipFileState
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CWhipFileState()
|
||||||
|
{
|
||||||
|
m_reContouren.Parse(".*", FALSE);
|
||||||
|
m_reLabels.Parse(".*", FALSE);
|
||||||
|
m_reLayers.Parse(".*", FALSE);
|
||||||
|
m_hintScale = -1.0;
|
||||||
|
};
|
||||||
|
BOOL SetLayers(BSTR reContouren, BSTR reLabels)
|
||||||
|
{
|
||||||
|
REParseError status = m_reContouren.Parse( CString(reContouren), false );
|
||||||
|
if (REPARSE_ERROR_OK != status)
|
||||||
|
{
|
||||||
|
myTRACE("\nSorry, kan reguliere expressie contouren niet parsen");
|
||||||
|
// Unexpected error.
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
status = m_reLabels.Parse( CString(reLabels), false );
|
||||||
|
if (REPARSE_ERROR_OK != status)
|
||||||
|
{
|
||||||
|
myTRACE("\nSorry, kan reguliere expressie labelsB niet parsen");
|
||||||
|
// Unexpected error.
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
BOOL SetFilterLayers(BSTR reLayers)
|
||||||
|
{
|
||||||
|
REParseError status = m_reLayers.Parse( CString(reLayers), false );
|
||||||
|
if (REPARSE_ERROR_OK != status)
|
||||||
|
{
|
||||||
|
myTRACE("\nSorry, kan reguliere expressie filterlayers niet parsen");
|
||||||
|
// Unexpected error.
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
~CWhipFileState()
|
||||||
|
{
|
||||||
|
for (size_t i=0; i<m_SLNKContouren.GetCount(); i++)
|
||||||
|
delete m_SLNKContouren[i];
|
||||||
|
|
||||||
|
for (size_t i=0; i<m_SLNKSymbols.GetCount(); i++)
|
||||||
|
delete m_SLNKSymbols[i];
|
||||||
|
|
||||||
|
POSITION pos;
|
||||||
|
CString key;
|
||||||
|
CSLNKSymbolDefinition * value;
|
||||||
|
pos = m_SLNKSymbolDefinitions.GetStartPosition();
|
||||||
|
// Now iterate the map, element by element
|
||||||
|
while (pos != NULL) {
|
||||||
|
key = m_SLNKSymbolDefinitions.GetKeyAt(pos);
|
||||||
|
value = m_SLNKSymbolDefinitions.GetNextValue(pos);
|
||||||
|
delete value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Is dit een contour laag
|
||||||
|
BOOL contMatch(const char* str)
|
||||||
|
{
|
||||||
|
CAtlREMatchContext<> mcUrl;
|
||||||
|
return m_reContouren.Match(str, &mcUrl);
|
||||||
|
}
|
||||||
|
// Is dit een contourlabel laag
|
||||||
|
BOOL labelMatch(const char* str)
|
||||||
|
{
|
||||||
|
CAtlREMatchContext<> mcUrl;
|
||||||
|
return m_reLabels.Match(str, &mcUrl);
|
||||||
|
}
|
||||||
|
// Is dit een 'gewone' laag die in het resultaat moet verschijnen?
|
||||||
|
BOOL layerMatch(const char* str)
|
||||||
|
{
|
||||||
|
CAtlREMatchContext<> mcUrl;
|
||||||
|
return m_reLayers.Match(str, &mcUrl);
|
||||||
|
}
|
||||||
|
CAtlArray<CSLNKContourImpl *> m_SLNKContouren;
|
||||||
|
CAtlArray<CSLNKSymbolImpl *> m_SLNKSymbols;
|
||||||
|
CAtlMap<CString, CSLNKSymbolDefinition *> m_SLNKSymbolDefinitions;
|
||||||
|
CAtlArray<WT_Text> m_SLNKLabels;
|
||||||
|
|
||||||
|
WT_Units m_contunits;
|
||||||
|
BOOL contLayerActive;
|
||||||
|
BOOL labelLayerActive;
|
||||||
|
double m_hintScale; // Kunnen we gebruiken om symbolen te 'geeken'
|
||||||
|
|
||||||
|
private:
|
||||||
|
CAtlRegExp<> m_reContouren;
|
||||||
|
CAtlRegExp<> m_reLabels;
|
||||||
|
CAtlRegExp<> m_reLayers; // Die met SaveAs moeten blijven
|
||||||
|
};
|
||||||
|
|
||||||
|
// CWhipFile
|
||||||
|
class ATL_NO_VTABLE CWhipFile :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CWhipFile, &CLSID_WhipFile>,
|
||||||
|
public ISupportErrorInfo,
|
||||||
|
public IDispatchImpl<IWhipFile, &IID_IWhipFile, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CWhipFile();
|
||||||
|
|
||||||
|
DECLARE_REGISTRY_RESOURCEID(IDR_WHIPFILE)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CWhipFile)
|
||||||
|
COM_INTERFACE_ENTRY(IWhipFile)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
// ISupportsErrorInfo
|
||||||
|
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
STDMETHOD(Load)(BSTR WhipPath);
|
||||||
|
STDMETHOD(LoadStream)(VARIANT EPlotStream);
|
||||||
|
STDMETHOD(SetLayers)(BSTR reContouren, BSTR reLabels);
|
||||||
|
STDMETHOD(SaveAs)(BSTR WhipPath);
|
||||||
|
STDMETHOD(SaveAs2)(BSTR WhipPath);
|
||||||
|
STDMETHOD(SetLabel)(BSTR IdentLabel, BSTR ExtraLabel);
|
||||||
|
STDMETHOD(SetColor)(BSTR IdentLabel, ULONG rgb, BYTE Alpha);
|
||||||
|
STDMETHOD(SetLabelFont)(BSTR FontName, DOUBLE FontHeight, DOUBLE FontHeightSymbols);
|
||||||
|
STDMETHOD(SetLabelPosition)(BYTE LabelPos);
|
||||||
|
STDMETHOD(get_ContoursXML)(BSTR* pVal);
|
||||||
|
STDMETHOD(get_AddSymbol)(DOUBLE dwgX, DOUBLE dwgY, BSTR symbolName, IUnknown** pVal);
|
||||||
|
STDMETHOD(DefineSymbol)(BSTR symbolName, VARIANT EPlotStream);
|
||||||
|
STDMETHOD(DefineBitmapSymbol)(BSTR symbolName, BSTR symbolPath, DOUBLE height);
|
||||||
|
STDMETHOD(get_Contour)(BSTR IdentLabel, IUnknown** pVal);
|
||||||
|
STDMETHOD(SetFilterLayers)(BSTR reLayers);
|
||||||
|
STDMETHOD(get_FindInContour)(DOUBLE dwgX, DOUBLE dwgY, BSTR* pVal);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CWhipFileState m_State;
|
||||||
|
|
||||||
|
WT_String m_FontName;
|
||||||
|
double m_FontHeight, m_FontHeightSymbols;
|
||||||
|
CSLNKContourImpl::LABELPOS m_LabelPos;
|
||||||
|
|
||||||
|
CComQIPtr<IEPlotSection> m_iEPlotSection; // Om scope levend te houden
|
||||||
|
myWT_File m_W2DFile;
|
||||||
|
WT_View m_view; // Initial view
|
||||||
|
HRESULT ProcessContouren();
|
||||||
|
HRESULT SerializePlan(WT_File & my_plan_file, myWT_File & my_file, double scale);
|
||||||
|
|
||||||
|
bool GenerateSymbols(myWT_File &my_file);
|
||||||
|
bool GenerateSymbolLabels(myWT_File &my_file);
|
||||||
|
|
||||||
|
bool GenerateContouren(WT_File &my_planfile, myWT_File &my_file,
|
||||||
|
double scale, BOOL solidOnly);
|
||||||
|
bool GenerateLabels(WT_File &my_planfile, myWT_File &my_file, double scale);
|
||||||
|
|
||||||
|
STDMETHOD(Generate)(myWT_File &my_file);
|
||||||
|
void read_for_contours();
|
||||||
|
void processLabels();
|
||||||
|
static WT_Result my_process_layer (WT_Layer & layer, WT_File & file);
|
||||||
|
//static WT_Result my_process_polygon(WT_Polygon & polygon, WT_File & file);
|
||||||
|
static WT_Result my_process_polyline(WT_Polyline & polyline, WT_File & file);
|
||||||
|
static WT_Result my_process_polytriangle(WT_Polytriangle & polytriangle, WT_File & file);
|
||||||
|
static WT_Result my_process_text (WT_Text & text, WT_File & file);
|
||||||
|
public:
|
||||||
|
STDMETHOD(get_hintScale)(DOUBLE* pVal);
|
||||||
|
STDMETHOD(put_hintScale)(DOUBLE newVal);
|
||||||
|
};
|
||||||
|
|
||||||
|
OBJECT_ENTRY_AUTO(__uuidof(WhipFile), CWhipFile)
|
||||||
27
SlnkDWFCom/WhipFile.rgs
Normal file
27
SlnkDWFCom/WhipFile.rgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWF.WhipFile.1 = s 'WhipFile Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{C2632BD5-3157-45A6-8FFC-57063FF2B169}'
|
||||||
|
}
|
||||||
|
SLNKDWF.WhipFile = s 'WhipFile Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{C2632BD5-3157-45A6-8FFC-57063FF2B169}'
|
||||||
|
CurVer = s 'SLNKDWF.WhipFile.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {C2632BD5-3157-45A6-8FFC-57063FF2B169} = s 'WhipFile Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWF.WhipFile.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWF.WhipFile'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
val AppID = s '%APPID%'
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
50
SlnkDWFCom/comobjectembed.h
Normal file
50
SlnkDWFCom/comobjectembed.h
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#ifndef __COMOBJECTEMBED_H_
|
||||||
|
#define __COMOBJECTEMBED_H_
|
||||||
|
|
||||||
|
|
||||||
|
template <class Base> //Base must be derived from CComObjectRoot
|
||||||
|
class CComObjectEmbed : public Base
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Base _BaseClass;
|
||||||
|
|
||||||
|
CComObjectEmbed() {m_pOuterUnknown = NULL;}
|
||||||
|
CComObjectEmbed(void* pv) {m_pOuterUnknown = (IUnknown*)pv;}
|
||||||
|
void SetOuterUnknown(IUnknown *punkContainer) {m_pOuterUnknown = punkContainer;}
|
||||||
|
|
||||||
|
#ifdef xx_ATL_DEBUG_INTERFACES
|
||||||
|
~CComObjectEmbed()
|
||||||
|
{
|
||||||
|
_Module.DeleteNonAddRefThunk(_GetRawUnknown());
|
||||||
|
_Module.DeleteNonAddRefThunk(m_pOuterUnknown);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
STDMETHOD_(ULONG, AddRef)() {return OuterAddRef();}
|
||||||
|
STDMETHOD_(ULONG, Release)() {return OuterRelease();}
|
||||||
|
STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject)
|
||||||
|
{
|
||||||
|
return _InternalQueryInterface(iid, ppvObject);
|
||||||
|
}
|
||||||
|
template <class Q>
|
||||||
|
HRESULT STDMETHODCALLTYPE QueryInterface(Q** pp)
|
||||||
|
{
|
||||||
|
return QueryInterface(__uuidof(Q), (void**)pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetControllingUnknown may be virtual if the Base class has declared
|
||||||
|
//DECLARE_GET_CONTROLLING_UNKNOWN()
|
||||||
|
IUnknown* GetControllingUnknown()
|
||||||
|
{
|
||||||
|
#ifdef xx_ATL_DEBUG_INTERFACES
|
||||||
|
IUnknown* p;
|
||||||
|
_Module.AddNonAddRefThunk(m_pOuterUnknown, _T("CComObjectEmbed"), &p);
|
||||||
|
return p;
|
||||||
|
#else
|
||||||
|
return m_pOuterUnknown;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* !__COMOBJECTEMBED_H_ */
|
||||||
88
SlnkDWFCom/eplotsections.cpp
Normal file
88
SlnkDWFCom/eplotsections.cpp
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
// EPlotSections.cpp : Implementation of CEPlotSections
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "EPlotSections.h"
|
||||||
|
|
||||||
|
|
||||||
|
// CEPlotSections
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSections::InterfaceSupportsErrorInfo(REFIID riid)
|
||||||
|
{
|
||||||
|
static const IID* arr[] =
|
||||||
|
{
|
||||||
|
&IID_IEPlotSections
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
||||||
|
{
|
||||||
|
if (InlineIsEqualGUID(*arr[i],riid))
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
return S_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Omdat de tellingen gekoppeld zijn weten we zeker dat de refcount van
|
||||||
|
// onze eigen objecten ook 0 zal zijn en is het dus veilig ze weg te gooien (toch...?)
|
||||||
|
void CEPlotSections::FinalRelease()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
for (int i=0; i<(LONG)m_EPlotSections.GetCount(); i++)
|
||||||
|
{
|
||||||
|
CComObjectEmbed<CEPlotSection> *mySection;
|
||||||
|
mySection = &m_EPlotSections.GetAt(i);
|
||||||
|
mySection->FinalRelease();
|
||||||
|
// Gebeurt in de destructor van AtlArray! delete (&m_EPlotSections.GetAt(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEPlotSections::InitImpl(CEPlotSectionsImpl *epl)
|
||||||
|
{
|
||||||
|
m_pSectionsImpl = epl;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSections::get_Parent(IDWFFile **ppParent)
|
||||||
|
{
|
||||||
|
return m_pParent->QueryInterface(IID_IDWFFile, (void**)ppParent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEPlotSections::SetParent(IDWFFile *pParent)
|
||||||
|
{
|
||||||
|
m_pParent = pParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Actually process the EPlotSections and add them to our collection
|
||||||
|
BOOL CEPlotSections::ProcessManifest(DWFManifest& rManifest, CString sourceDescription)
|
||||||
|
{
|
||||||
|
ATLASSERT(false);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSections::get_Count(LONG* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = (LONG)m_pSectionsImpl->get_Count();
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSections::get_Item(LONG i, IDispatch** pVal)
|
||||||
|
{
|
||||||
|
if (i<0 || i>=(LONG)m_pSectionsImpl->get_Count())
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
if (m_EPlotSections.GetCount() == 0)
|
||||||
|
{ // Tijd om de myEplotSectionImpl's te wrappen met onze myEplotSection's
|
||||||
|
for (int j=0; j<m_pSectionsImpl->get_Count(); j++)
|
||||||
|
{
|
||||||
|
CComObjectEmbed<CEPlotSection> *mySection = new CComObjectEmbed<CEPlotSection>; //= new tMyEplot;
|
||||||
|
mySection->SetParent(this);
|
||||||
|
CEPlotSectionImpl *ps;
|
||||||
|
ps = m_pSectionsImpl->get_Item(j);
|
||||||
|
mySection->InitImpl(ps);
|
||||||
|
mySection->SetOuterUnknown(GetControllingUnknown());
|
||||||
|
mySection->FinalConstruct();
|
||||||
|
m_EPlotSections.Add(*mySection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ATLASSERT(i<(LONG)m_EPlotSections.GetCount());
|
||||||
|
|
||||||
|
return (m_EPlotSections.GetAt(i).QueryInterface(pVal));
|
||||||
|
}
|
||||||
121
SlnkDWFCom/myEPlotSection.cpp
Normal file
121
SlnkDWFCom/myEPlotSection.cpp
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
// EPlotSection.cpp : Implementation of CEPlotSection
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "myEPlotSection.h"
|
||||||
|
|
||||||
|
// CEPlotSection
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::InterfaceSupportsErrorInfo(REFIID riid)
|
||||||
|
{
|
||||||
|
static const IID* arr[] =
|
||||||
|
{
|
||||||
|
&IID_IEPlotSection
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
|
||||||
|
{
|
||||||
|
if (InlineIsEqualGUID(*arr[i],riid))
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
return S_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEPlotSection::InitImpl(CEPlotSectionImpl *epl)
|
||||||
|
{
|
||||||
|
m_pSectionImpl = epl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEPlotSection::FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::get_Parent(IEPlotSections **ppParent)
|
||||||
|
{
|
||||||
|
return m_pParent->QueryInterface(IID_IEPlotSections, (void**)ppParent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CEPlotSection::SetParent(IEPlotSections *pParent)
|
||||||
|
{
|
||||||
|
m_pParent = pParent;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::get_Name(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(m_pSectionImpl->get_Name());
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::get_Title(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CComBSTR bstrString(m_pSectionImpl->get_Title());
|
||||||
|
return bstrString.CopyTo(pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::get_PaperColor(ULONG* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_pSectionImpl->get_PaperColor();
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always inches
|
||||||
|
STDMETHODIMP CEPlotSection::get_PaperClipWidth(DOUBLE* pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = m_pSectionImpl->get_PaperClipWidth();
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::Open(BOOL bForWrite)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_pSectionImpl->Open( bForWrite);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
catch (CString &err)
|
||||||
|
{
|
||||||
|
return myAtlReportError (GetObjectCLSID(), err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CEPlotSection::Read( void *pv, ULONG cb, ULONG *pcbRead)
|
||||||
|
{
|
||||||
|
return m_pSectionImpl->Read( pv, cb, pcbRead);
|
||||||
|
};
|
||||||
|
|
||||||
|
HRESULT CEPlotSection::Write( const void *pv, ULONG cb, ULONG *pcbWritten)
|
||||||
|
{
|
||||||
|
return m_pSectionImpl->Write( pv, cb, pcbWritten) ;
|
||||||
|
};
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::Close(void)
|
||||||
|
{
|
||||||
|
return m_pSectionImpl->Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::get_SourceDescription(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CString s;
|
||||||
|
HRESULT res = m_pSectionImpl->get_SourceDescription(s);
|
||||||
|
(*pVal) = s.AllocSysString();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::get_PropertiesXML(BSTR* pVal)
|
||||||
|
{
|
||||||
|
CString s;
|
||||||
|
HRESULT res = m_pSectionImpl->get_PropertiesXML(s);
|
||||||
|
(*pVal) = s.AllocSysString();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::get_EPlotSectionImpl(/* CEPlotSectionImpl ** */ BYTE ** pVal)
|
||||||
|
{
|
||||||
|
(*pVal) = (BYTE *)m_pSectionImpl;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
STDMETHODIMP CEPlotSection::put_EPlotSectionImpl(/* CEPlotSectionImpl * */ BYTE * newVal)
|
||||||
|
{
|
||||||
|
return E_FAIL;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
78
SlnkDWFCom/myEPlotSection.h
Normal file
78
SlnkDWFCom/myEPlotSection.h
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
// EPlotSection.h : Declaration of the CEPlotSection
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
|
||||||
|
#include "myEPlotSectionImpl.h"
|
||||||
|
#include "Whiptk/whip_toolkit.h"
|
||||||
|
|
||||||
|
// CEPlotSection
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CEPlotSection :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CEPlotSection, &CLSID_EPlotSection>,
|
||||||
|
public ISupportErrorInfo,
|
||||||
|
public IDispatchImpl<IEPlotSection, &IID_IEPlotSection, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
// public CEPlotSectionImpl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CEPlotSection()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//REMOVED DECLARE_REGISTRY_RESOURCEID(IDR_EPLOTSECTION)
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CEPlotSection)
|
||||||
|
COM_INTERFACE_ENTRY(IEPlotSection)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
// ISupportsErrorInfo
|
||||||
|
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
IEPlotSections *m_pParent; // Non-addreffed!
|
||||||
|
|
||||||
|
private:
|
||||||
|
CEPlotSectionImpl *m_pSectionImpl;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void SetParent(IEPlotSections *pParent);
|
||||||
|
|
||||||
|
STDMETHODIMP get_Parent(IEPlotSections **ppParent);
|
||||||
|
STDMETHOD(get_Name)(BSTR* pVal);
|
||||||
|
STDMETHOD(get_Title)(BSTR* pVal);
|
||||||
|
|
||||||
|
void InitImpl(CEPlotSectionImpl *epl);
|
||||||
|
|
||||||
|
// IWhipSequentialStream Methods
|
||||||
|
public:
|
||||||
|
STDMETHOD(Open)(BOOL bForWrite);
|
||||||
|
STDMETHOD(Read) ( void *pv, ULONG cb, ULONG *pcbRead);
|
||||||
|
STDMETHOD(Write)( const void *pv, ULONG cb,ULONG *pcbWritten);
|
||||||
|
STDMETHOD(Close)(void);
|
||||||
|
STDMETHOD(get_PaperColor)(ULONG* pVal);
|
||||||
|
STDMETHOD(get_SourceDescription)(BSTR* pVal);
|
||||||
|
#if DESIRED_CODE(WHIP_OUTPUT)
|
||||||
|
STDMETHOD(get_PropertiesXML)(BSTR* pVal);
|
||||||
|
#endif
|
||||||
|
STDMETHOD(get_PaperClipWidth)(DOUBLE* pVal);
|
||||||
|
public:
|
||||||
|
STDMETHOD(get_EPlotSectionImpl)(/* CEPlotSectionImpl ** */ BYTE ** pVal);
|
||||||
|
public:
|
||||||
|
STDMETHOD(put_EPlotSectionImpl)(/* CEPlotSectionImpl * */ BYTE * newVal);
|
||||||
|
};
|
||||||
|
|
||||||
|
//REMOVED OBJECT_ENTRY_AUTO(__uuidof(EPlotSection), CEPlotSection)
|
||||||
38
SlnkDWFCom/resource.h
Normal file
38
SlnkDWFCom/resource.h
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by SLNKdwf.rc
|
||||||
|
//
|
||||||
|
#define IDS_PROJNAME 100
|
||||||
|
#define IDR_SLNKDWF 101
|
||||||
|
#define IDR_DWFFILE 102
|
||||||
|
#define IDR_WHIPFILE 103
|
||||||
|
#define IDR_WHIP2PNG 104
|
||||||
|
#define IDR_ABOUT 105
|
||||||
|
#define IDR_SLNKEPLOTSECTION 106
|
||||||
|
#define IDR_EPLOTSECTION 107
|
||||||
|
#define IDR_EPLOTSECTIONS 108
|
||||||
|
#define IDR_WHIPSEQUENTIALSTREAM 109
|
||||||
|
#define IDR_TEST 110
|
||||||
|
#define IDR_TEST2 111
|
||||||
|
#define IDR_SLNKEVENT 112
|
||||||
|
#define IDR_ASPOBJECT 113
|
||||||
|
#define IDR_WHIP2DC 114
|
||||||
|
#define IDR_DC2PNG 115
|
||||||
|
#define IDB_MYCONTROL 116
|
||||||
|
#define IDR_MYCONTROL 117
|
||||||
|
#define IDR_BOUNDINGBOX 118
|
||||||
|
#define IDR_DWGPOINT 119
|
||||||
|
#define IDR_SLNKCONTOUR 120
|
||||||
|
#define IDR_SLNKSYMBOL 126
|
||||||
|
#define IDR_OPTIONS 127
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 201
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32768
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 201
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 128
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
26
SlnkDWFCom/slnkcont.bin
Normal file
26
SlnkDWFCom/slnkcont.bin
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
HKCR
|
||||||
|
{
|
||||||
|
SLNKDWFCom.SLNKContour.1 = s 'SLNKContour Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{476C0F28-5860-485D-BEBD-D03F68E1C930}'
|
||||||
|
}
|
||||||
|
SLNKDWFCom.SLNKContour = s 'SLNKContour Class'
|
||||||
|
{
|
||||||
|
CLSID = s '{476C0F28-5860-485D-BEBD-D03F68E1C930}'
|
||||||
|
CurVer = s 'SLNKDWFCom.SLNKContour.1'
|
||||||
|
}
|
||||||
|
NoRemove CLSID
|
||||||
|
{
|
||||||
|
ForceRemove {476C0F28-5860-485D-BEBD-D03F68E1C930} = s 'SLNKContour Class'
|
||||||
|
{
|
||||||
|
ProgID = s 'SLNKDWFCom.SLNKContour.1'
|
||||||
|
VersionIndependentProgID = s 'SLNKDWFCom.SLNKContour'
|
||||||
|
ForceRemove 'Programmable'
|
||||||
|
InprocServer32 = s '%MODULE%'
|
||||||
|
{
|
||||||
|
val ThreadingModel = s 'Apartment'
|
||||||
|
}
|
||||||
|
'TypeLib' = s '{B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
74
SlnkDWFCom/slnksymbol.h
Normal file
74
SlnkDWFCom/slnksymbol.h
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
// SLNKSymbol.h : Declaration of the CSLNKSymbol
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
#include "SLNKDWF.h"
|
||||||
|
#include "SLNKSymbolDefImpl.h"
|
||||||
|
#include "SLNKSymbolImpl.h"
|
||||||
|
|
||||||
|
#if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
|
||||||
|
#error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// CSLNKSymbol
|
||||||
|
|
||||||
|
class ATL_NO_VTABLE CSLNKSymbol :
|
||||||
|
public CComObjectRootEx<CComSingleThreadModel>,
|
||||||
|
public CComCoClass<CSLNKSymbol, &CLSID_SLNKSymbol>,
|
||||||
|
public IDispatchImpl<ISLNKSymbol, &IID_ISLNKSymbol, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CSLNKSymbol()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//REMOVED DECLARE_REGISTRY_RESOURCEID(IDR_SLNKSYMBOL)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_COM_MAP(CSLNKSymbol)
|
||||||
|
COM_INTERFACE_ENTRY(ISLNKSymbol)
|
||||||
|
COM_INTERFACE_ENTRY(IDispatch)
|
||||||
|
END_COM_MAP()
|
||||||
|
|
||||||
|
// ISupportsErrorInfo
|
||||||
|
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
|
||||||
|
|
||||||
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||||
|
|
||||||
|
HRESULT FinalConstruct()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FinalRelease()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deze SLNKSymbol wijst naar een CSLNKSymbolImpl in een WhipFile object. We moeten voorkomen
|
||||||
|
// dat deze te snel uit de scope wegvalt. Dat doen we mbv SetParent
|
||||||
|
// Omgekeerd is geen probleem: de WhipFile verwijst niet(!) naar de CSLNKSymbol en heeft er dus
|
||||||
|
// geen last van dat die wegvalt (van zijn SLNKSymbolImpl objecten is hij gewoon eigenaar)
|
||||||
|
|
||||||
|
void SetParent(IWhipFile *pParent)
|
||||||
|
{
|
||||||
|
HRESULT hr = pParent->QueryInterface(IID_IWhipFile, (void **)&m_parent_iWhipFile);
|
||||||
|
};
|
||||||
|
void SetImpl(CSLNKSymbolImpl * pSLNKSymbol);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CSLNKSymbolImpl * m_SLNKSymbol;
|
||||||
|
CComQIPtr<IWhipFile> m_parent_iWhipFile; // Om scope levend te houden
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
STDMETHOD(get_Scale)(DOUBLE* pVal);
|
||||||
|
STDMETHOD(put_Scale)(DOUBLE newVal);
|
||||||
|
STDMETHOD(get_Rotation)(LONG* pVal);
|
||||||
|
STDMETHOD(put_Rotation)(LONG newVal);
|
||||||
|
STDMETHOD(get_Contour)(IUnknown** pVal);
|
||||||
|
};
|
||||||
|
|
||||||
|
//REMOVED OBJECT_ENTRY_AUTO(__uuidof(SLNKSymbol), CSLNKSymbol)
|
||||||
5
SlnkDWFCom/stdafx.cpp
Normal file
5
SlnkDWFCom/stdafx.cpp
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
// stdafx.cpp : source file that includes just the standard includes
|
||||||
|
// SLNKDWF.pch will be the pre-compiled header
|
||||||
|
// stdafx.obj will contain the pre-compiled type information
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
77
SlnkDWFCom/stdafx.h
Normal file
77
SlnkDWFCom/stdafx.h
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
// stdafx.h : include file for standard system include files,
|
||||||
|
// or project specific include files that are used frequently,
|
||||||
|
// but are changed infrequently
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef STRICT
|
||||||
|
#define STRICT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||||
|
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||||
|
#ifndef WINVER // Allow use of features specific to Windows XP or later.
|
||||||
|
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
|
||||||
|
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
|
||||||
|
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
|
||||||
|
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _ATL_APARTMENT_THREADED
|
||||||
|
#define _ATL_NO_AUTOMATIC_NAMESPACE
|
||||||
|
|
||||||
|
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||||
|
|
||||||
|
// turns off ATL's hiding of some common and often safely ignored warning messages
|
||||||
|
#define _ATL_ALL_WARNINGS
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
//#define _ATL_DEBUG_INTERFACES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "resource.h"
|
||||||
|
#include <atlbase.h>
|
||||||
|
#include <atlcom.h>
|
||||||
|
|
||||||
|
using namespace ATL;
|
||||||
|
|
||||||
|
// [JGL] added manually
|
||||||
|
#include <atltypes.h>
|
||||||
|
#include "atlstr.h"
|
||||||
|
#include "atlrx.h"
|
||||||
|
#include "../SLNKDwfImpl/jglutil.h"
|
||||||
|
|
||||||
|
#include "Options.h"
|
||||||
|
|
||||||
|
#include "SLNKDWFStaticRW.h"
|
||||||
|
|
||||||
|
#include "dwfcore/File.h"
|
||||||
|
#include "dwfcore/String.h"
|
||||||
|
|
||||||
|
#include "dwf/package/Constants.h"
|
||||||
|
#include "dwf/package/Manifest.h"
|
||||||
|
#include "dwf/package/EPlotSection.h"
|
||||||
|
#include "dwf/package/reader/PackageReader.h"
|
||||||
|
//#include "dwf/package/writer/PackageWriter.h"
|
||||||
|
#include "dwf/package/xml.h"
|
||||||
|
#include "dwf/package/reader/DuplicateAttributeFilter.h"
|
||||||
|
|
||||||
|
using namespace DWFCore;
|
||||||
|
using namespace DWFToolkit;
|
||||||
|
//using namespace DWFManifest;
|
||||||
|
//using namespace DWFXmlObjects;
|
||||||
|
//using namespace DWFEPlot;
|
||||||
|
//using DWF::DwfResult;
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#include "MemLeakDetect.h"
|
||||||
|
#endif
|
||||||
4
SlnkDWFCom/unloadIIS.bat
Normal file
4
SlnkDWFCom/unloadIIS.bat
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
C:\Inetpub\AdminScripts\adsutil.vbs APPUNLOAD W3SVC/1/Root/SLNKDWF
|
||||||
|
C:\Inetpub\AdminScripts\adsutil.vbs APPUNLOAD W3SVC/1/Root/Vigor
|
||||||
|
C:\Inetpub\AdminScripts\adsutil.vbs APPUNLOAD W3SVC/1/Root/FacilitorWork
|
||||||
|
C:\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/1
|
||||||
13
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageCrtDll.cpp
Normal file
13
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageCrtDll.cpp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
// CxImageCrtDll.cpp : Defines the entry point for the CxImageCrtDll application.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "stdcrt.h"
|
||||||
|
|
||||||
|
BOOL APIENTRY DllMain( HANDLE hModule,
|
||||||
|
DWORD ul_reason_for_call,
|
||||||
|
LPVOID lpReserved
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
346
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageCrtDll.dsp
Normal file
346
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageCrtDll.dsp
Normal file
@@ -0,0 +1,346 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="CxImageCrtDll" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||||
|
|
||||||
|
CFG=CxImageCrtDll - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "CxImageCrtDll.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "CxImageCrtDll.mak" CFG="CxImageCrtDll - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "CxImageCrtDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
|
!MESSAGE "CxImageCrtDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
MTL=midl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "CxImageCrtDll - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release"
|
||||||
|
# PROP Intermediate_Dir "Release"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRCxImageCrtDll" /D "CxImageCrtDll_EXPORTS" /Yu"stdafx.h" /FD /c
|
||||||
|
# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../zlib" /I "../../jasper/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JAS_WIN_MSVC_BUILD" /FD /c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /machine:I386 /CxImageCrtDll
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib /nologo /dll /machine:I386 /out:"../../bin/cximagecrt.dll"
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "CxImageCrtDll - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug"
|
||||||
|
# PROP Intermediate_Dir "Debug"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRCxImageCrtDll" /D "CxImageCrtDll_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../zlib" /I "../../jasper/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JAS_WIN_MSVC_BUILD" /FD /GZ /c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /debug /machine:I386 /pdbtype:sept /CxImageCrtDll
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib /nologo /dll /debug /machine:I386 /out:"../../bin/cximagecrtd.dll" /pdbtype:sept
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "CxImageCrtDll - Win32 Release"
|
||||||
|
# Name "CxImageCrtDll - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\CxImageCrtDll.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\CxImageCrtDll.rc
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\tif_xfile.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximabmp.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximadsp.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaenc.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaexif.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximage.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximagif.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximahist.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaico.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximainfo.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaint.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaj2k.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajas.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajbg.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajpg.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximalpha.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximalyr.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximamng.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapal.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapcx.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapng.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximasel.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatga.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximath.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatif.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatran.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawbmp.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawmf.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawnd.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xmemfile.cpp
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\StdAfx.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xfile.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximabmp.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximadefs.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xImage.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximagif.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaico.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaiter.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaj2k.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajas.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajbg.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajpg.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximamng.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapcx.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapng.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatga.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximath.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatif.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawbmp.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawmf.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xiofile.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xmemfile.h
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
||||||
123
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageCrtDll.rc
Normal file
123
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageCrtDll.rc
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
//Microsoft Developer Studio generated resource script.
|
||||||
|
//
|
||||||
|
#include "resrc1.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "resource.h"
|
||||||
|
#include "afxres.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Neutral resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifndef _MAC
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Version
|
||||||
|
//
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION 5,9,9,3
|
||||||
|
PRODUCTVERSION 5,9,9,3
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x4L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "000004b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Comments", "CxImage 5.99c CRT DLL\0"
|
||||||
|
VALUE "CompanyName", "Pizzolato Davide - www.xdp.it\0"
|
||||||
|
VALUE "FileDescription", "cximage\0"
|
||||||
|
VALUE "FileVersion", "5, 9, 9, c\0"
|
||||||
|
VALUE "InternalName", "cximage\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright <20> 2001 - 2004\0"
|
||||||
|
VALUE "LegalTrademarks", "\0"
|
||||||
|
VALUE "OriginalFilename", "cximagecrt.dll\0"
|
||||||
|
VALUE "PrivateBuild", "\0"
|
||||||
|
VALUE "ProductName", "cximage\0"
|
||||||
|
VALUE "ProductVersion", "5, 9, 9, c\0"
|
||||||
|
VALUE "SpecialBuild", "\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // !_MAC
|
||||||
|
|
||||||
|
#endif // Neutral resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Italian (Italy) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"resrc1.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"#include ""resource.h""\r\n"
|
||||||
|
"#include ""afxres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
#endif // Italian (Italy) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
1017
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageCrtDll.vcproj
Normal file
1017
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageCrtDll.vcproj
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioUserFile
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
ShowAllFiles="false"
|
||||||
|
>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
Command=""
|
||||||
|
WorkingDirectory=""
|
||||||
|
CommandArguments=""
|
||||||
|
Attach="false"
|
||||||
|
DebuggerType="3"
|
||||||
|
Remote="1"
|
||||||
|
RemoteMachine="PC53_JGL"
|
||||||
|
RemoteCommand=""
|
||||||
|
HttpUrl=""
|
||||||
|
PDBPath=""
|
||||||
|
SQLDebugging=""
|
||||||
|
Environment=""
|
||||||
|
EnvironmentMerge="true"
|
||||||
|
DebuggerFlavor=""
|
||||||
|
MPIRunCommand=""
|
||||||
|
MPIRunArguments=""
|
||||||
|
MPIRunWorkingDirectory=""
|
||||||
|
ApplicationCommand=""
|
||||||
|
ApplicationArguments=""
|
||||||
|
ShimCommand=""
|
||||||
|
MPIAcceptMode=""
|
||||||
|
MPIAcceptFilter=""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
Command=""
|
||||||
|
WorkingDirectory=""
|
||||||
|
CommandArguments=""
|
||||||
|
Attach="false"
|
||||||
|
DebuggerType="3"
|
||||||
|
Remote="1"
|
||||||
|
RemoteMachine="PC53_JGL"
|
||||||
|
RemoteCommand=""
|
||||||
|
HttpUrl=""
|
||||||
|
PDBPath=""
|
||||||
|
SQLDebugging=""
|
||||||
|
Environment=""
|
||||||
|
EnvironmentMerge="true"
|
||||||
|
DebuggerFlavor=""
|
||||||
|
MPIRunCommand=""
|
||||||
|
MPIRunArguments=""
|
||||||
|
MPIRunWorkingDirectory=""
|
||||||
|
ApplicationCommand=""
|
||||||
|
ApplicationArguments=""
|
||||||
|
ShimCommand=""
|
||||||
|
MPIAcceptMode=""
|
||||||
|
MPIAcceptFilter=""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
</VisualStudioUserFile>
|
||||||
152
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageDll.dsw
Normal file
152
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageDll.dsw
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||||
|
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "CxImageCrtDll"=.\CxImageCrtDll.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name j2000
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name jbig
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name jpeg
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name png
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name tiff
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name zlib
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name j2k
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "CxImageMfcDll"=.\cximagemfcdll.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name j2k
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name jbig
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name jpeg
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name png
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name tiff
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name zlib
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "j2k"=..\..\j2k\j2k.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "jbig"=..\..\jbig\jbig.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "jpeg"=..\..\jpeg\Jpeg.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "png"=..\..\png\png.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "tiff"=..\..\tiff\Tiff.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "zlib"=..\..\zlib\zlib.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Global:
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<3>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
16
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageMfcDll.clw
Normal file
16
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageMfcDll.clw
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
; CLW file contains information for the MFC ClassWizard
|
||||||
|
|
||||||
|
[General Info]
|
||||||
|
Version=1
|
||||||
|
ClassCount=1
|
||||||
|
Class1=CcximagemfcdllApp
|
||||||
|
LastClass=CcximagemfcdllApp
|
||||||
|
NewFileInclude2=#include "cximagemfcdll.h"
|
||||||
|
ResourceCount=0
|
||||||
|
NewFileInclude1=#include "stdafx.h"
|
||||||
|
|
||||||
|
[CLS:CcximagemfcdllApp]
|
||||||
|
Type=0
|
||||||
|
HeaderFile=cximagemfcdll.h
|
||||||
|
ImplementationFile=cximagemfcdll.cpp
|
||||||
|
Filter=N
|
||||||
62
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageMfcDll.cpp
Normal file
62
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageMfcDll.cpp
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
// cximagemfcdll.cpp : Defines the initialization routines for the DLL.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "cximagemfcdll.h"
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#define new DEBUG_NEW
|
||||||
|
#undef THIS_FILE
|
||||||
|
static char THIS_FILE[] = __FILE__;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// Note!
|
||||||
|
//
|
||||||
|
// If this DLL is dynamically linked against the MFC
|
||||||
|
// DLLs, any functions exported from this DLL which
|
||||||
|
// call into MFC must have the AFX_MANAGE_STATE macro
|
||||||
|
// added at the very beginning of the function.
|
||||||
|
//
|
||||||
|
// For example:
|
||||||
|
//
|
||||||
|
// extern "C" BOOL PASCAL EXPORT ExportedFunction()
|
||||||
|
// {
|
||||||
|
// AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||||
|
// // normal function body here
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// It is very important that this macro appear in each
|
||||||
|
// function, prior to any calls into MFC. This means that
|
||||||
|
// it must appear as the first statement within the
|
||||||
|
// function, even before any object variable declarations
|
||||||
|
// as their constructors may generate calls into the MFC
|
||||||
|
// DLL.
|
||||||
|
//
|
||||||
|
// Please see MFC Technical Notes 33 and 58 for additional
|
||||||
|
// details.
|
||||||
|
//
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CcximagemfcdllApp
|
||||||
|
|
||||||
|
BEGIN_MESSAGE_MAP(CcximagemfcdllApp, CWinApp)
|
||||||
|
//{{AFX_MSG_MAP(CcximagemfcdllApp)
|
||||||
|
// NOTE - the ClassWizard will add and remove mapping macros here.
|
||||||
|
// DO NOT EDIT what you see in these blocks of generated code!
|
||||||
|
//}}AFX_MSG_MAP
|
||||||
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CcximagemfcdllApp construction
|
||||||
|
|
||||||
|
CcximagemfcdllApp::CcximagemfcdllApp()
|
||||||
|
{
|
||||||
|
// TODO: add construction code here,
|
||||||
|
// Place all significant initialization in InitInstance
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// The one and only CcximagemfcdllApp object
|
||||||
|
|
||||||
|
CcximagemfcdllApp theApp;
|
||||||
45
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageMfcDll.h
Normal file
45
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageMfcDll.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
// cximagemfcdll.h : main header file for the cximagemfcdll DLL
|
||||||
|
//
|
||||||
|
|
||||||
|
#if !defined(AFX_cximagemfcdll_H__E98F71A6_B361_11D6_BB83_CAEE2E1CB77B__INCLUDED_)
|
||||||
|
#define AFX_cximagemfcdll_H__E98F71A6_B361_11D6_BB83_CAEE2E1CB77B__INCLUDED_
|
||||||
|
|
||||||
|
#if _MSC_VER > 1000
|
||||||
|
#pragma once
|
||||||
|
#endif // _MSC_VER > 1000
|
||||||
|
|
||||||
|
#ifndef __AFXWIN_H__
|
||||||
|
#error include 'stdafx.h' before including this file for PCH
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "resource.h" // main symbols
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CcximagemfcdllApp
|
||||||
|
// See cximagemfcdll.cpp for the implementation of this class
|
||||||
|
//
|
||||||
|
|
||||||
|
class CcximagemfcdllApp : public CWinApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CcximagemfcdllApp();
|
||||||
|
|
||||||
|
// Overrides
|
||||||
|
// ClassWizard generated virtual function overrides
|
||||||
|
//{{AFX_VIRTUAL(CcximagemfcdllApp)
|
||||||
|
//}}AFX_VIRTUAL
|
||||||
|
|
||||||
|
//{{AFX_MSG(CcximagemfcdllApp)
|
||||||
|
// NOTE - the ClassWizard will add and remove member functions here.
|
||||||
|
// DO NOT EDIT what you see in these blocks of generated code !
|
||||||
|
//}}AFX_MSG
|
||||||
|
DECLARE_MESSAGE_MAP()
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//{{AFX_INSERT_LOCATION}}
|
||||||
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||||
|
|
||||||
|
#endif // !defined(AFX_cximagemfcdll_H__E98F71A6_B361_11D6_BB83_CAEE2E1CB77B__INCLUDED_)
|
||||||
123
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageMfcDll.rc
Normal file
123
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/CxImageMfcDll.rc
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
//Microsoft Developer Studio generated resource script.
|
||||||
|
//
|
||||||
|
#include "resrc1.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
|
//
|
||||||
|
#include "resource.h"
|
||||||
|
#include "afxres.h"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Neutral resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifndef _MAC
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Version
|
||||||
|
//
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION 5,9,9,3
|
||||||
|
PRODUCTVERSION 5,9,9,3
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x4L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "000004b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Comments", "CxImage 5.99c MFC DLL\0"
|
||||||
|
VALUE "CompanyName", "Pizzolato Davide - www.xdp.it\0"
|
||||||
|
VALUE "FileDescription", "cximage\0"
|
||||||
|
VALUE "FileVersion", "5, 9, 9, c\0"
|
||||||
|
VALUE "InternalName", "cximage\0"
|
||||||
|
VALUE "LegalCopyright", "Copyright <20> 2001 - 2004\0"
|
||||||
|
VALUE "LegalTrademarks", "\0"
|
||||||
|
VALUE "OriginalFilename", "cximage.dll\0"
|
||||||
|
VALUE "PrivateBuild", "\0"
|
||||||
|
VALUE "ProductName", "cximage\0"
|
||||||
|
VALUE "ProductVersion", "5, 9, 9, c\0"
|
||||||
|
VALUE "SpecialBuild", "\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // !_MAC
|
||||||
|
|
||||||
|
#endif // Neutral resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Italian (Italy) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"resrc1.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"#include ""resource.h""\r\n"
|
||||||
|
"#include ""afxres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
#endif // Italian (Italy) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
8
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/StdAfx.cpp
Normal file
8
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/StdAfx.cpp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// stdafx.cpp : source file that includes just the standard includes
|
||||||
|
// cximagemfcdll.pch will be the pre-compiled header
|
||||||
|
// stdafx.obj will contain the pre-compiled type information
|
||||||
|
|
||||||
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
42
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/StdAfx.h
Normal file
42
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/StdAfx.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
// stdafx.h : include file for standard system include files,
|
||||||
|
// or project specific include files that are used frequently, but
|
||||||
|
// are changed infrequently
|
||||||
|
//
|
||||||
|
|
||||||
|
#if !defined(AFX_STDAFX_H__E98F71A8_B361_11D6_BB83_CAEE2E1CB77B__INCLUDED_)
|
||||||
|
#define AFX_STDAFX_H__E98F71A8_B361_11D6_BB83_CAEE2E1CB77B__INCLUDED_
|
||||||
|
|
||||||
|
#if _MSC_VER > 1000
|
||||||
|
#pragma once
|
||||||
|
#endif // _MSC_VER > 1000
|
||||||
|
|
||||||
|
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
|
||||||
|
#include <afxwin.h> // MFC core and standard components
|
||||||
|
#include <afxext.h> // MFC extensions
|
||||||
|
|
||||||
|
#ifndef _AFX_NO_OLE_SUPPORT
|
||||||
|
#include <afxole.h> // MFC OLE classes
|
||||||
|
#include <afxodlgs.h> // MFC OLE dialog classes
|
||||||
|
#include <afxdisp.h> // MFC Automation classes
|
||||||
|
#endif // _AFX_NO_OLE_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _AFX_NO_DB_SUPPORT
|
||||||
|
#include <afxdb.h> // MFC ODBC database classes
|
||||||
|
#endif // _AFX_NO_DB_SUPPORT
|
||||||
|
|
||||||
|
#ifndef _AFX_NO_DAO_SUPPORT
|
||||||
|
#include <afxdao.h> // MFC DAO database classes
|
||||||
|
#endif // _AFX_NO_DAO_SUPPORT
|
||||||
|
|
||||||
|
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||||
|
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||||
|
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||||
|
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
|
//{{AFX_INSERT_LOCATION}}
|
||||||
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||||
|
|
||||||
|
#endif // !defined(AFX_STDAFX_H__E98F71A8_B361_11D6_BB83_CAEE2E1CB77B__INCLUDED_)
|
||||||
24
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/StdCrt.h
Normal file
24
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/StdCrt.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// stdafx.h : include file for standard system include files,
|
||||||
|
// or project specific include files that are used frequently, but
|
||||||
|
// are changed infrequently
|
||||||
|
//
|
||||||
|
|
||||||
|
#if !defined(AFX_STDAFX_H__F30A8A60_284F_4DF6_9431_6283105686F6__INCLUDED_)
|
||||||
|
#define AFX_STDAFX_H__F30A8A60_284F_4DF6_9431_6283105686F6__INCLUDED_
|
||||||
|
|
||||||
|
#if _MSC_VER > 1000
|
||||||
|
#pragma once
|
||||||
|
#endif // _MSC_VER > 1000
|
||||||
|
|
||||||
|
|
||||||
|
// Insert your headers here
|
||||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
// TODO: reference additional headers your program requires here
|
||||||
|
|
||||||
|
//{{AFX_INSERT_LOCATION}}
|
||||||
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||||
|
|
||||||
|
#endif // !defined(AFX_STDAFX_H__F30A8A60_284F_4DF6_9431_6283105686F6__INCLUDED_)
|
||||||
330
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/cximagemfcdll.dsp
Normal file
330
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/cximagemfcdll.dsp
Normal file
@@ -0,0 +1,330 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="CxImageMfcDll" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||||
|
|
||||||
|
CFG=CxImageMfcDll - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "cximagemfcdll.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "cximagemfcdll.mak" CFG="CxImageMfcDll - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "CxImageMfcDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
|
!MESSAGE "CxImageMfcDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
MTL=midl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "CxImageMfcDll - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 6
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 6
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release"
|
||||||
|
# PROP Intermediate_Dir "Release"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||||
|
# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../zlib" /I "../../jasper/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /D "JAS_WIN_MSVC_BUILD" /FD /c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
# ADD BASE RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL"
|
||||||
|
# ADD RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386
|
||||||
|
# ADD LINK32 /nologo /subsystem:windows /dll /machine:I386 /out:"../../bin/cximage.dll"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "CxImageMfcDll - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 6
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 6
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug"
|
||||||
|
# PROP Intermediate_Dir "Debug"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../zlib" /I "../../jasper/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /D "JAS_WIN_MSVC_BUILD" /FD /GZ /c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
# ADD BASE RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL"
|
||||||
|
# ADD RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /out:"../../bin/cximaged.dll" /pdbtype:sept
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "CxImageMfcDll - Win32 Release"
|
||||||
|
# Name "CxImageMfcDll - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\cximagemfcdll.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\cximagemfcdll.rc
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\StdAfx.cpp
|
||||||
|
# ADD CPP /Yc"stdafx.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\tif_xfile.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximabmp.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximadsp.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaenc.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaexif.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximage.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximagif.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximahist.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaico.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximainfo.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaint.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaj2k.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajas.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajbg.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajpg.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximalpha.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximalyr.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximamng.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapal.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapcx.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapng.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximasel.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatga.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximath.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatif.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatran.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawbmp.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawmf.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawnd.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xmemfile.cpp
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\cximagemfcdll.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\Resource.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\StdAfx.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xfile.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximabmp.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximadefs.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximage.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximagif.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaico.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaiter.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximaj2k.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajas.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximajpg.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximamng.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapcx.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximapng.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatga.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximath.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximatif.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawbmp.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\ximawmf.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xiofile.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xmemfile.h
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
||||||
1050
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/cximagemfcdll.vcproj
Normal file
1050
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/cximagemfcdll.vcproj
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioUserFile
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
ShowAllFiles="false"
|
||||||
|
>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
Command=""
|
||||||
|
WorkingDirectory=""
|
||||||
|
CommandArguments=""
|
||||||
|
Attach="false"
|
||||||
|
DebuggerType="3"
|
||||||
|
Remote="1"
|
||||||
|
RemoteMachine="PC53_JGL"
|
||||||
|
RemoteCommand=""
|
||||||
|
HttpUrl=""
|
||||||
|
PDBPath=""
|
||||||
|
SQLDebugging=""
|
||||||
|
Environment=""
|
||||||
|
EnvironmentMerge="true"
|
||||||
|
DebuggerFlavor=""
|
||||||
|
MPIRunCommand=""
|
||||||
|
MPIRunArguments=""
|
||||||
|
MPIRunWorkingDirectory=""
|
||||||
|
ApplicationCommand=""
|
||||||
|
ApplicationArguments=""
|
||||||
|
ShimCommand=""
|
||||||
|
MPIAcceptMode=""
|
||||||
|
MPIAcceptFilter=""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
Command=""
|
||||||
|
WorkingDirectory=""
|
||||||
|
CommandArguments=""
|
||||||
|
Attach="false"
|
||||||
|
DebuggerType="3"
|
||||||
|
Remote="1"
|
||||||
|
RemoteMachine="PC53_JGL"
|
||||||
|
RemoteCommand=""
|
||||||
|
HttpUrl=""
|
||||||
|
PDBPath=""
|
||||||
|
SQLDebugging=""
|
||||||
|
Environment=""
|
||||||
|
EnvironmentMerge="true"
|
||||||
|
DebuggerFlavor=""
|
||||||
|
MPIRunCommand=""
|
||||||
|
MPIRunArguments=""
|
||||||
|
MPIRunWorkingDirectory=""
|
||||||
|
ApplicationCommand=""
|
||||||
|
ApplicationArguments=""
|
||||||
|
ShimCommand=""
|
||||||
|
MPIAcceptMode=""
|
||||||
|
MPIAcceptFilter=""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
</VisualStudioUserFile>
|
||||||
15
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/resource.h
Normal file
15
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/resource.h
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Developer Studio generated include file.
|
||||||
|
// Used by CxImageMFCdll.rc
|
||||||
|
//
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 6000
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 6000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 6000
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
15
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/resrc1.h
Normal file
15
SlnkDWFImpl/CxImage/CxImage/CxImageDLL/resrc1.h
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Developer Studio generated include file.
|
||||||
|
// Used by CxImageCrtDll.rc
|
||||||
|
//
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 6000
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 6000
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 6000
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
52
SlnkDWFImpl/CxImage/CxImage/_ximacfg.h
Normal file
52
SlnkDWFImpl/CxImage/CxImage/_ximacfg.h
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#if !defined(__ximaCFG_h)
|
||||||
|
#define __ximaCFG_h
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CxImage supported features
|
||||||
|
#define CXIMAGE_SUPPORT_ALPHA 1
|
||||||
|
#define CXIMAGE_SUPPORT_SELECTION 1
|
||||||
|
#define CXIMAGE_SUPPORT_TRANSFORMATION 1
|
||||||
|
#define CXIMAGE_SUPPORT_DSP 1
|
||||||
|
#define CXIMAGE_SUPPORT_LAYERS 1
|
||||||
|
#define CXIMAGE_SUPPORT_INTERPOLATION 1
|
||||||
|
|
||||||
|
#define CXIMAGE_SUPPORT_DECODE 1
|
||||||
|
#define CXIMAGE_SUPPORT_ENCODE 1 //<vho><T.Peck>
|
||||||
|
#define CXIMAGE_SUPPORT_WINDOWS 1
|
||||||
|
#define CXIMAGE_SUPPORT_WINCE 0 //<T.Peck>
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CxImage supported formats
|
||||||
|
#define CXIMAGE_SUPPORT_BMP 1
|
||||||
|
#define CXIMAGE_SUPPORT_GIF 1
|
||||||
|
#define CXIMAGE_SUPPORT_JPG 1
|
||||||
|
#define CXIMAGE_SUPPORT_PNG 1
|
||||||
|
#define CXIMAGE_SUPPORT_MNG 0
|
||||||
|
#define CXIMAGE_SUPPORT_ICO 1
|
||||||
|
#define CXIMAGE_SUPPORT_TIF 1
|
||||||
|
#define CXIMAGE_SUPPORT_TGA 1
|
||||||
|
#define CXIMAGE_SUPPORT_PCX 1
|
||||||
|
#define CXIMAGE_SUPPORT_WBMP 1
|
||||||
|
#define CXIMAGE_SUPPORT_WMF 1
|
||||||
|
#define CXIMAGE_SUPPORT_J2K 0 // Beta, use JP2
|
||||||
|
#define CXIMAGE_SUPPORT_JBG 0 // GPL'd see ../jbig/copying.txt & ../jbig/patents.htm
|
||||||
|
|
||||||
|
#define CXIMAGE_SUPPORT_JP2 1
|
||||||
|
#define CXIMAGE_SUPPORT_JPC 1
|
||||||
|
#define CXIMAGE_SUPPORT_PGX 1
|
||||||
|
#define CXIMAGE_SUPPORT_PNM 1
|
||||||
|
#define CXIMAGE_SUPPORT_RAS 1
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#define CXIMAGE_MAX_MEMORY 256000000
|
||||||
|
|
||||||
|
#define CXIMAGE_ERR_NOFILE "null file handler"
|
||||||
|
#define CXIMAGE_ERR_NOIMAGE "null image!!!"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//color to grey mapping <H. Muelner> <jurgene>
|
||||||
|
//#define RGB2GRAY(r,g,b) (((b)*114 + (g)*587 + (r)*299)/1000)
|
||||||
|
#define RGB2GRAY(r,g,b) (((b)*117 + (g)*601 + (r)*306) >> 10)
|
||||||
|
|
||||||
|
#endif
|
||||||
302
SlnkDWFImpl/CxImage/CxImage/cximage.dsp
Normal file
302
SlnkDWFImpl/CxImage/CxImage/cximage.dsp
Normal file
@@ -0,0 +1,302 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="CxImage" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||||
|
|
||||||
|
CFG=CxImage - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "cximage.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "cximage.mak" CFG="CxImage - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "CxImage - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE "CxImage - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "CxImage - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 2
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release"
|
||||||
|
# PROP Intermediate_Dir "Release"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\jpeg" /I "..\png" /I "..\zlib" /I "..\mng" /I "..\tiff" /I "..\j2k" /I "..\jasper\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "_AFXDLL" /D "JAS_WIN_MSVC_BUILD" /FD /c
|
||||||
|
# SUBTRACT CPP /YX
|
||||||
|
# ADD BASE RSC /l 0x410 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
# ADD BASE LIB32 /nologo
|
||||||
|
# ADD LIB32 /nologo
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "CxImage - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 2
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug"
|
||||||
|
# PROP Intermediate_Dir "Debug"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\jpeg" /I "..\png" /I "..\zlib" /I "..\mng" /I "..\tiff" /I "..\j2k" /I "..\jasper\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "_AFXDLL" /D "JAS_WIN_MSVC_BUILD" /FD /GZ /c
|
||||||
|
# SUBTRACT CPP /Fr /YX
|
||||||
|
# ADD BASE RSC /l 0x410 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
# ADD BASE LIB32 /nologo
|
||||||
|
# ADD LIB32 /nologo
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "CxImage - Win32 Release"
|
||||||
|
# Name "CxImage - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\tif_xfile.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximabmp.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximadsp.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximaenc.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximaexif.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\xImage.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximagif.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximahist.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximaico.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximainfo.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximaint.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximaj2k.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximajas.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximajbg.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximajpg.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximalpha.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximalyr.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximamng.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximapal.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximapcx.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximapng.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximasel.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximatga.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximath.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximatif.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximatran.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximawbmp.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximawmf.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximawnd.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\xmemfile.cpp
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\xfile.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximabmp.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximacfg.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximadef.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximage.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximagif.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximaico.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximaiter.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximaj2k.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximajas.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximajbg.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximajpg.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximamng.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximapcx.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximapng.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximatga.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximath.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximatif.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximawbmp.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\ximawmf.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\xiofile.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\xmemfile.h
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
||||||
29
SlnkDWFImpl/CxImage/CxImage/cximage.dsw
Normal file
29
SlnkDWFImpl/CxImage/CxImage/cximage.dsw
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||||
|
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "CxImage"=.\CxImage.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Global:
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<3>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
21
SlnkDWFImpl/CxImage/CxImage/cximage.sln
Normal file
21
SlnkDWFImpl/CxImage/CxImage/cximage.sln
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 7.00
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CxImage", "CxImage.vcproj", "{E6F8F128-84D9-48D6-81D6-C427EAFE738D}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfiguration) = preSolution
|
||||||
|
ConfigName.0 = Debug
|
||||||
|
ConfigName.1 = Release
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectDependencies) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfiguration) = postSolution
|
||||||
|
{E6F8F128-84D9-48D6-81D6-C427EAFE738D}.Debug.ActiveCfg = Debug|Win32
|
||||||
|
{E6F8F128-84D9-48D6-81D6-C427EAFE738D}.Debug.Build.0 = Debug|Win32
|
||||||
|
{E6F8F128-84D9-48D6-81D6-C427EAFE738D}.Release.ActiveCfg = Release|Win32
|
||||||
|
{E6F8F128-84D9-48D6-81D6-C427EAFE738D}.Release.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
932
SlnkDWFImpl/CxImage/CxImage/cximage.vcproj
Normal file
932
SlnkDWFImpl/CxImage/CxImage/cximage.vcproj
Normal file
@@ -0,0 +1,932 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
Name="CxImage"
|
||||||
|
ProjectGUID="{C8E16319-530C-47D5-BED8-B18AB41FC01F}"
|
||||||
|
Keyword="MFCProj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory=".\Release"
|
||||||
|
IntermediateDirectory=".\Release"
|
||||||
|
ConfigurationType="4"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||||
|
UseOfMFC="2"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="2"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
AdditionalIncludeDirectories="..\jpeg,..\png,..\zlib,..\mng,..\tiff,..\j2k,..\jasper\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;JAS_WIN_MSVC_BUILD"
|
||||||
|
StringPooling="true"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableFunctionLevelLinking="true"
|
||||||
|
PrecompiledHeaderFile=".\Release/cximage.pch"
|
||||||
|
AssemblerListingLocation=".\Release/"
|
||||||
|
ObjectFile=".\Release/"
|
||||||
|
ProgramDataBaseFileName=".\Release/"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="NDEBUG"
|
||||||
|
Culture="1040"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile=".\Release\cximage.lib"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
OutputFile=".\Release/cximage.bsc"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory=".\Debug"
|
||||||
|
IntermediateDirectory=".\Debug"
|
||||||
|
ConfigurationType="4"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||||
|
UseOfMFC="2"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\jpeg,..\png,..\zlib,..\mng,..\tiff,..\j2k,..\jasper\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;JAS_WIN_MSVC_BUILD"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
PrecompiledHeaderFile=".\Debug/cximage.pch"
|
||||||
|
AssemblerListingLocation=".\Debug/"
|
||||||
|
ObjectFile=".\Debug/"
|
||||||
|
ProgramDataBaseFileName=".\Debug/"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
Culture="1040"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile=".\Debug\cximage.lib"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
OutputFile=".\Debug/cximage.bsc"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="tif_xfile.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximabmp.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximadsp.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximaenc.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximaexif.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="xImage.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximagif.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximahist.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximaico.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximainfo.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximaint.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximaj2k.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximajas.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximajbg.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximajpg.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximalpha.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximalyr.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximamng.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximapal.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximapcx.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximapng.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximasel.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximatga.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximath.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximatif.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximatran.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximawbmp.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximawmf.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximawnd.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="xmemfile.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions=""
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="xfile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximabmp.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximacfg.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximadef.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximage.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximagif.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximaico.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximaiter.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximaj2k.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximajas.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximajbg.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximajpg.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximamng.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximapcx.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximapng.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximatga.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximath.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximatif.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximawbmp.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ximawmf.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="xiofile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="xmemfile.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioUserFile
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8,00"
|
||||||
|
ShowAllFiles="false"
|
||||||
|
>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
Command=""
|
||||||
|
WorkingDirectory=""
|
||||||
|
CommandArguments=""
|
||||||
|
Attach="false"
|
||||||
|
DebuggerType="3"
|
||||||
|
Remote="1"
|
||||||
|
RemoteMachine="PC53_JGL"
|
||||||
|
RemoteCommand=""
|
||||||
|
HttpUrl=""
|
||||||
|
PDBPath=""
|
||||||
|
SQLDebugging=""
|
||||||
|
Environment=""
|
||||||
|
EnvironmentMerge="true"
|
||||||
|
DebuggerFlavor=""
|
||||||
|
MPIRunCommand=""
|
||||||
|
MPIRunArguments=""
|
||||||
|
MPIRunWorkingDirectory=""
|
||||||
|
ApplicationCommand=""
|
||||||
|
ApplicationArguments=""
|
||||||
|
ShimCommand=""
|
||||||
|
MPIAcceptMode=""
|
||||||
|
MPIAcceptFilter=""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<DebugSettings
|
||||||
|
Command=""
|
||||||
|
WorkingDirectory=""
|
||||||
|
CommandArguments=""
|
||||||
|
Attach="false"
|
||||||
|
DebuggerType="3"
|
||||||
|
Remote="1"
|
||||||
|
RemoteMachine="PC53_JGL"
|
||||||
|
RemoteCommand=""
|
||||||
|
HttpUrl=""
|
||||||
|
PDBPath=""
|
||||||
|
SQLDebugging=""
|
||||||
|
Environment=""
|
||||||
|
EnvironmentMerge="true"
|
||||||
|
DebuggerFlavor=""
|
||||||
|
MPIRunCommand=""
|
||||||
|
MPIRunArguments=""
|
||||||
|
MPIRunWorkingDirectory=""
|
||||||
|
ApplicationCommand=""
|
||||||
|
ApplicationArguments=""
|
||||||
|
ShimCommand=""
|
||||||
|
MPIAcceptMode=""
|
||||||
|
MPIAcceptFilter=""
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
</VisualStudioUserFile>
|
||||||
272
SlnkDWFImpl/CxImage/CxImage/cximage2003.vcproj
Normal file
272
SlnkDWFImpl/CxImage/CxImage/cximage2003.vcproj
Normal file
@@ -0,0 +1,272 @@
|
|||||||
|
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="7.00"
|
||||||
|
Name="CxImage2003"
|
||||||
|
ProjectGUID="{8C3365D1-9920-4ACA-8CB2-B85DE4469A9B}"
|
||||||
|
|
||||||
|
|
||||||
|
Keyword="MFCProj">
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"/>
|
||||||
|
</Platforms>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory=".\Release"
|
||||||
|
IntermediateDirectory=".\Release"
|
||||||
|
ConfigurationType="4"
|
||||||
|
UseOfMFC="0"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
InlineFunctionExpansion="1"
|
||||||
|
AdditionalIncludeDirectories="..\jpeg,..\png,..\zlib,..\mng,..\tiff,..\j2k,..\jasper\include"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;JAS_WIN_MSVC_BUILD"
|
||||||
|
StringPooling="TRUE"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
EnableFunctionLevelLinking="TRUE"
|
||||||
|
PrecompiledHeaderFile=".\Release/cximage.pch"
|
||||||
|
AssemblerListingLocation=".\Release/"
|
||||||
|
ObjectFile=".\Release/"
|
||||||
|
ProgramDataBaseFileName=".\Release/"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
CompileAs="0"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile=".\Release\cximage.lib"
|
||||||
|
SuppressStartupBanner="TRUE"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="_AFXDLL;NDEBUG"
|
||||||
|
Culture="1040"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory=".\Debug"
|
||||||
|
IntermediateDirectory=".\Debug"
|
||||||
|
ConfigurationType="4"
|
||||||
|
UseOfMFC="2"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||||
|
CharacterSet="2">
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\jpeg,..\png,..\zlib,..\mng,..\tiff,..\j2k,..\jasper\include"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;JAS_WIN_MSVC_BUILD"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
PrecompiledHeaderFile=".\Debug/cximage.pch"
|
||||||
|
AssemblerListingLocation=".\Debug/"
|
||||||
|
ObjectFile=".\Debug/"
|
||||||
|
ProgramDataBaseFileName=".\Debug/"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="TRUE"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
CompileAs="0"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
OutputFile=".\Debug\cximage.lib"
|
||||||
|
SuppressStartupBanner="TRUE"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="_AFXDLL;_DEBUG"
|
||||||
|
Culture="1040"/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||||
|
<File
|
||||||
|
RelativePath=".\tif_xfile.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\xImage.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximabmp.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximadsp.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximaenc.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximaexif.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximagif.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximahist.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximaico.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximainfo.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximaint.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximaj2k.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximajas.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximajbg.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximajpg.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximalpha.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximalyr.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximamng.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximapal.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximapcx.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximapng.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximasel.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximatga.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximath.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximatif.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximatran.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximawbmp.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximawmf.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximawnd.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\xmemfile.cpp">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl">
|
||||||
|
<File
|
||||||
|
RelativePath=".\xfile.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximabmp.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximacfg.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximadef.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximage.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximagif.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximaico.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximaiter.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximaj2k.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximajas.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximajbg.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximajpg.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximamng.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximapcx.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximapng.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximatga.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximath.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximatif.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximawbmp.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ximawmf.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\xiofile.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\xmemfile.h">
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
48
SlnkDWFImpl/CxImage/CxImage/license.txt
Normal file
48
SlnkDWFImpl/CxImage/CxImage/license.txt
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
This copy of the CxImage notices is provided for your convenience. In case of
|
||||||
|
any discrepancy between this copy and the notices in the file ximage.h that is
|
||||||
|
included in the CxImage distribution, the latter shall prevail.
|
||||||
|
|
||||||
|
If you modify CxImage you may insert additional notices immediately following
|
||||||
|
this sentence.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||||
|
|
||||||
|
CxImage version 5.99c 17/Oct/2004
|
||||||
|
|
||||||
|
CxImage : Copyright (C) 2001 - 2004, Davide Pizzolato
|
||||||
|
|
||||||
|
Original CImage and CImageIterator implementation are:
|
||||||
|
Copyright (C) 1995, Alejandro Aguilar Sierra (asierra(at)servidor(dot)unam(dot)mx)
|
||||||
|
|
||||||
|
Covered code is provided under this license on an "as is" basis, without warranty
|
||||||
|
of any kind, either expressed or implied, including, without limitation, warranties
|
||||||
|
that the covered code is free of defects, merchantable, fit for a particular purpose
|
||||||
|
or non-infringing. The entire risk as to the quality and performance of the covered
|
||||||
|
code is with you. Should any covered code prove defective in any respect, you (not
|
||||||
|
the initial developer or any other contributor) assume the cost of any necessary
|
||||||
|
servicing, repair or correction. This disclaimer of warranty constitutes an essential
|
||||||
|
part of this license. No use of any covered code is authorized hereunder except under
|
||||||
|
this disclaimer.
|
||||||
|
|
||||||
|
Permission is hereby granted to use, copy, modify, and distribute this
|
||||||
|
source code, or portions hereof, for any purpose, including commercial applications,
|
||||||
|
freely and without fee, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Other information: about CxImage, and the latest version, can be found at the
|
||||||
|
CxImage home page: http://www.xdp.it
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
208
SlnkDWFImpl/CxImage/CxImage/tif_xfile.cpp
Normal file
208
SlnkDWFImpl/CxImage/CxImage/tif_xfile.cpp
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
/*
|
||||||
|
* TIFF file IO, using CxFile.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "ximage.h"
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_TIF
|
||||||
|
|
||||||
|
#include "../tiff/tiffiop.h"
|
||||||
|
|
||||||
|
#include "xfile.h"
|
||||||
|
|
||||||
|
static tsize_t
|
||||||
|
_tiffReadProcEx(thandle_t fd, tdata_t buf, tsize_t size)
|
||||||
|
{
|
||||||
|
return ((CxFile*)fd)->Read(buf, 1, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
static tsize_t
|
||||||
|
_tiffWriteProcEx(thandle_t fd, tdata_t buf, tsize_t size)
|
||||||
|
{
|
||||||
|
return ((CxFile*)fd)->Write(buf, 1, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
static toff_t
|
||||||
|
_tiffSeekProcEx(thandle_t fd, toff_t off, int whence)
|
||||||
|
{
|
||||||
|
if ( off == 0xFFFFFFFF )
|
||||||
|
return 0xFFFFFFFF;
|
||||||
|
if (!((CxFile*)fd)->Seek(off, whence))
|
||||||
|
return 0xFFFFFFFF;
|
||||||
|
if (whence == SEEK_SET)
|
||||||
|
return off;
|
||||||
|
|
||||||
|
return (toff_t)((CxFile*)fd)->Tell();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return nonzero if error
|
||||||
|
static int
|
||||||
|
_tiffCloseProcEx(thandle_t fd)
|
||||||
|
{
|
||||||
|
// return !((CxFile*)fd)->Close(); // "//" needed for memory files <DP>
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
static toff_t
|
||||||
|
_tiffSizeProcEx(thandle_t fd)
|
||||||
|
{
|
||||||
|
return ((CxFile*)fd)->Size();
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
_tiffMapProcEx(thandle_t fd, tdata_t* pbase, toff_t* psize)
|
||||||
|
{
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_tiffUnmapProcEx(thandle_t fd, tdata_t base, toff_t size)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Open a TIFF file descriptor for read/writing.
|
||||||
|
/*
|
||||||
|
TIFF*
|
||||||
|
TIFFOpen(const char* name, const char* mode)
|
||||||
|
{
|
||||||
|
static const char module[] = "TIFFOpen";
|
||||||
|
FILE* stream = fopen(name, mode);
|
||||||
|
if (stream == NULL)
|
||||||
|
{
|
||||||
|
TIFFError(module, "%s: Cannot open", name);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return (TIFFFdOpen((int)stream, name, mode));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
TIFF*
|
||||||
|
_TIFFFdOpen(int fd, const char* name, const char* mode)
|
||||||
|
{
|
||||||
|
TIFF* tif;
|
||||||
|
|
||||||
|
tif = TIFFClientOpen(name, mode,
|
||||||
|
(thandle_t) fd,
|
||||||
|
_tiffReadProcEx, _tiffWriteProcEx, _tiffSeekProcEx, _tiffCloseProcEx,
|
||||||
|
_tiffSizeProcEx, _tiffMapProcEx, _tiffUnmapProcEx);
|
||||||
|
if (tif)
|
||||||
|
tif->tif_fd = fd;
|
||||||
|
return (tif);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" TIFF* _TIFFOpenEx(CxFile* stream, const char* mode)
|
||||||
|
{
|
||||||
|
return (_TIFFFdOpen((int)stream, "TIFF IMAGE", mode));
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
extern char* malloc();
|
||||||
|
extern char* realloc();
|
||||||
|
#else
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
tdata_t
|
||||||
|
_TIFFmalloc(tsize_t s)
|
||||||
|
{
|
||||||
|
return (malloc((size_t) s));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_TIFFfree(tdata_t p)
|
||||||
|
{
|
||||||
|
free(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
tdata_t
|
||||||
|
_TIFFrealloc(tdata_t p, tsize_t s)
|
||||||
|
{
|
||||||
|
return (realloc(p, (size_t) s));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_TIFFmemset(tdata_t p, int v, tsize_t c)
|
||||||
|
{
|
||||||
|
memset(p, v, (size_t) c);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
|
||||||
|
{
|
||||||
|
memcpy(d, s, (size_t) c);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
|
||||||
|
{
|
||||||
|
return (memcmp(p1, p2, (size_t) c));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
Win32WarningHandler(const char* module, const char* fmt, va_list ap)
|
||||||
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#if (!defined(_CONSOLE) && defined(WIN32))
|
||||||
|
LPTSTR szTitle;
|
||||||
|
LPTSTR szTmp;
|
||||||
|
LPCTSTR szTitleText = "%s Warning";
|
||||||
|
LPCTSTR szDefaultModule = "TIFFLIB";
|
||||||
|
szTmp = (module == NULL) ? (LPTSTR)szDefaultModule : (LPTSTR)module;
|
||||||
|
if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, (lstrlen(szTmp) +
|
||||||
|
lstrlen(szTitleText) + lstrlen(fmt) + 128)*sizeof(TCHAR))) == NULL)
|
||||||
|
return;
|
||||||
|
wsprintf(szTitle, szTitleText, szTmp);
|
||||||
|
szTmp = szTitle + (lstrlen(szTitle)+2)*sizeof(TCHAR);
|
||||||
|
wvsprintf(szTmp, fmt, ap);
|
||||||
|
MessageBox(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONINFORMATION);
|
||||||
|
LocalFree(szTitle);
|
||||||
|
return;
|
||||||
|
#else
|
||||||
|
if (module != NULL)
|
||||||
|
fprintf(stderr, "%s: ", module);
|
||||||
|
fprintf(stderr, "Warning, ");
|
||||||
|
vfprintf(stderr, fmt, ap);
|
||||||
|
fprintf(stderr, ".\n");
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler;
|
||||||
|
|
||||||
|
static void
|
||||||
|
Win32ErrorHandler(const char* module, const char* fmt, va_list ap)
|
||||||
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#if (!defined(_CONSOLE) && defined(WIN32))
|
||||||
|
LPTSTR szTitle;
|
||||||
|
LPTSTR szTmp;
|
||||||
|
LPCTSTR szTitleText = "%s Error";
|
||||||
|
LPCTSTR szDefaultModule = "TIFFLIB";
|
||||||
|
szTmp = (module == NULL) ? (LPTSTR)szDefaultModule : (LPTSTR)module;
|
||||||
|
if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, (lstrlen(szTmp) +
|
||||||
|
lstrlen(szTitleText) + lstrlen(fmt) + 128)*sizeof(TCHAR))) == NULL)
|
||||||
|
return;
|
||||||
|
wsprintf(szTitle, szTitleText, szTmp);
|
||||||
|
szTmp = szTitle + (lstrlen(szTitle)+2)*sizeof(TCHAR);
|
||||||
|
wvsprintf(szTmp, fmt, ap);
|
||||||
|
MessageBox(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONEXCLAMATION);
|
||||||
|
LocalFree(szTitle);
|
||||||
|
return;
|
||||||
|
#else
|
||||||
|
if (module != NULL)
|
||||||
|
fprintf(stderr, "%s: ", module);
|
||||||
|
vfprintf(stderr, fmt, ap);
|
||||||
|
fprintf(stderr, ".\n");
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
76
SlnkDWFImpl/CxImage/CxImage/xfile.h
Normal file
76
SlnkDWFImpl/CxImage/CxImage/xfile.h
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
* File: xfile.h
|
||||||
|
* Purpose: General Purpose File Class
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
|
||||||
|
|
||||||
|
CxFile (c) 11/May/2002 Davide Pizzolato - www.xdp.it
|
||||||
|
CxFile version 2.00 23/Aug/2002
|
||||||
|
|
||||||
|
Special thanks to Chris Shearer Cooper for new features, enhancements and bugfixes
|
||||||
|
|
||||||
|
Covered code is provided under this license on an "as is" basis, without warranty
|
||||||
|
of any kind, either expressed or implied, including, without limitation, warranties
|
||||||
|
that the covered code is free of defects, merchantable, fit for a particular purpose
|
||||||
|
or non-infringing. The entire risk as to the quality and performance of the covered
|
||||||
|
code is with you. Should any covered code prove defective in any respect, you (not
|
||||||
|
the initial developer or any other contributor) assume the cost of any necessary
|
||||||
|
servicing, repair or correction. This disclaimer of warranty constitutes an essential
|
||||||
|
part of this license. No use of any covered code is authorized hereunder except under
|
||||||
|
this disclaimer.
|
||||||
|
|
||||||
|
Permission is hereby granted to use, copy, modify, and distribute this
|
||||||
|
source code, or portions hereof, for any purpose, including commercial applications,
|
||||||
|
freely and without fee, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
#if !defined(__xfile_h)
|
||||||
|
#define __xfile_h
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "ximadef.h"
|
||||||
|
|
||||||
|
class DLL_EXP CxFile
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CxFile(void) { };
|
||||||
|
virtual ~CxFile() { };
|
||||||
|
|
||||||
|
virtual bool Close() = 0;
|
||||||
|
virtual size_t Read(void *buffer, size_t size, size_t count) = 0;
|
||||||
|
virtual size_t Write(const void *buffer, size_t size, size_t count) = 0;
|
||||||
|
virtual bool Seek(long offset, int origin) = 0;
|
||||||
|
virtual long Tell() = 0;
|
||||||
|
virtual long Size() = 0;
|
||||||
|
virtual bool Flush() = 0;
|
||||||
|
virtual bool Eof() = 0;
|
||||||
|
virtual long Error() = 0;
|
||||||
|
virtual bool PutC(unsigned char c)
|
||||||
|
{
|
||||||
|
// Default implementation
|
||||||
|
size_t nWrote = Write(&c, 1, 1);
|
||||||
|
return (bool)(nWrote == 1);
|
||||||
|
}
|
||||||
|
virtual long GetC() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //__xfile_h
|
||||||
361
SlnkDWFImpl/CxImage/CxImage/ximabmp.cpp
Normal file
361
SlnkDWFImpl/CxImage/CxImage/ximabmp.cpp
Normal file
@@ -0,0 +1,361 @@
|
|||||||
|
/*
|
||||||
|
* File: ximabmp.cpp
|
||||||
|
* Purpose: Platform Independent BMP Image Class Loader and Writer
|
||||||
|
* 07/Aug/2001 Davide Pizzolato - www.xdp.it
|
||||||
|
* CxImage version 5.99c 17/Oct/2004
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ximabmp.h"
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_BMP
|
||||||
|
|
||||||
|
#include "ximaiter.h"
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#if CXIMAGE_SUPPORT_ENCODE
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool CxImageBMP::Encode(CxFile * hFile)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (EncodeSafeCheck(hFile)) return false;
|
||||||
|
|
||||||
|
BITMAPFILEHEADER hdr;
|
||||||
|
|
||||||
|
hdr.bfType = 0x4d42; // 'BM' WINDOWS_BITMAP_SIGNATURE
|
||||||
|
hdr.bfSize = GetSize() + 14 /*sizeof(BITMAPFILEHEADER)*/;
|
||||||
|
hdr.bfReserved1 = hdr.bfReserved2 = 0;
|
||||||
|
hdr.bfOffBits = 14 /*sizeof(BITMAPFILEHEADER)*/ + head.biSize + GetPaletteSize();
|
||||||
|
|
||||||
|
//copy attributes
|
||||||
|
memcpy(pDib,&head,sizeof(BITMAPINFOHEADER));
|
||||||
|
// Write the file header
|
||||||
|
hFile->Write(&hdr,min(14,sizeof(BITMAPFILEHEADER)),1);
|
||||||
|
// Write the DIB header and the pixels
|
||||||
|
hFile->Write(pDib,GetSize(),1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif //CXIMAGE_SUPPORT_ENCODE
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#if CXIMAGE_SUPPORT_DECODE
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool CxImageBMP::Decode(CxFile * hFile)
|
||||||
|
{
|
||||||
|
if (hFile == NULL) return false;
|
||||||
|
|
||||||
|
BITMAPFILEHEADER bf;
|
||||||
|
DWORD off = hFile->Tell(); //<CSC>
|
||||||
|
try {
|
||||||
|
if (hFile->Read(&bf,min(14,sizeof(bf)),1)==0) throw "Not a BMP";
|
||||||
|
if (bf.bfType != BFT_BITMAP) { //do we have a RC HEADER?
|
||||||
|
bf.bfOffBits = 0L;
|
||||||
|
hFile->Seek(off,SEEK_SET);
|
||||||
|
}
|
||||||
|
|
||||||
|
BITMAPINFOHEADER bmpHeader;
|
||||||
|
if (!DibReadBitmapInfo(hFile,&bmpHeader)) throw "Error reading BMP info";
|
||||||
|
DWORD dwCompression=bmpHeader.biCompression;
|
||||||
|
DWORD dwBitCount=bmpHeader.biBitCount; //preserve for BI_BITFIELDS compression <Thomas Ernst>
|
||||||
|
bool bIsOldBmp = bmpHeader.biSize == sizeof(BITMAPCOREHEADER);
|
||||||
|
|
||||||
|
bool bTopDownDib = bmpHeader.biHeight<0; //<Flanders> check if it's a top-down bitmap
|
||||||
|
if (bTopDownDib) bmpHeader.biHeight=-bmpHeader.biHeight;
|
||||||
|
|
||||||
|
if (info.nEscape == -1) {
|
||||||
|
// Return output dimensions only
|
||||||
|
head.biWidth = bmpHeader.biWidth;
|
||||||
|
head.biHeight = bmpHeader.biHeight;
|
||||||
|
throw "output dimensions returned";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Create(bmpHeader.biWidth,bmpHeader.biHeight,bmpHeader.biBitCount,CXIMAGE_FORMAT_BMP))
|
||||||
|
throw "Can't allocate memory";
|
||||||
|
|
||||||
|
head.biXPelsPerMeter = bmpHeader.biXPelsPerMeter;
|
||||||
|
head.biYPelsPerMeter = bmpHeader.biYPelsPerMeter;
|
||||||
|
info.xDPI = (long) floor(bmpHeader.biXPelsPerMeter * 254.0 / 10000.0 + 0.5);
|
||||||
|
info.yDPI = (long) floor(bmpHeader.biYPelsPerMeter * 254.0 / 10000.0 + 0.5);
|
||||||
|
|
||||||
|
if (info.nEscape) throw "Cancelled"; // <vho> - cancel decoding
|
||||||
|
|
||||||
|
RGBQUAD *pRgb = GetPalette();
|
||||||
|
if (pRgb){
|
||||||
|
if (bIsOldBmp){
|
||||||
|
// convert a old color table (3 byte entries) to a new
|
||||||
|
// color table (4 byte entries)
|
||||||
|
hFile->Read((void*)pRgb,DibNumColors(&bmpHeader) * sizeof(RGBTRIPLE),1);
|
||||||
|
for (int i=DibNumColors(&head)-1; i>=0; i--){
|
||||||
|
pRgb[i].rgbRed = ((RGBTRIPLE *)pRgb)[i].rgbtRed;
|
||||||
|
pRgb[i].rgbBlue = ((RGBTRIPLE *)pRgb)[i].rgbtBlue;
|
||||||
|
pRgb[i].rgbGreen = ((RGBTRIPLE *)pRgb)[i].rgbtGreen;
|
||||||
|
pRgb[i].rgbReserved = (BYTE)0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hFile->Read((void*)pRgb,DibNumColors(&bmpHeader) * sizeof(RGBQUAD),1);
|
||||||
|
//force rgbReserved=0, to avoid problems with some WinXp bitmaps
|
||||||
|
for (unsigned int i=0; i<head.biClrUsed; i++) pRgb[i].rgbReserved=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.nEscape) throw "Cancelled"; // <vho> - cancel decoding
|
||||||
|
|
||||||
|
switch (dwBitCount) {
|
||||||
|
case 32 :
|
||||||
|
if (bf.bfOffBits != 0L) hFile->Seek(off + bf.bfOffBits,SEEK_SET);
|
||||||
|
if (dwCompression == BI_BITFIELDS || dwCompression == BI_RGB){
|
||||||
|
long imagesize=4*head.biHeight*head.biWidth;
|
||||||
|
BYTE* buff32=(BYTE*)malloc(imagesize);
|
||||||
|
if (buff32){
|
||||||
|
hFile->Read(buff32, imagesize,1); // read in the pixels
|
||||||
|
Bitfield2RGB(buff32,0,0,0,32);
|
||||||
|
free(buff32);
|
||||||
|
} else throw "can't allocate memory";
|
||||||
|
} else throw "unknown compression";
|
||||||
|
break;
|
||||||
|
case 24 :
|
||||||
|
if (bf.bfOffBits != 0L) hFile->Seek(off + bf.bfOffBits,SEEK_SET);
|
||||||
|
if (dwCompression == BI_RGB){
|
||||||
|
hFile->Read(info.pImage, head.biSizeImage,1); // read in the pixels
|
||||||
|
} else throw "unknown compression";
|
||||||
|
break;
|
||||||
|
case 16 :
|
||||||
|
{
|
||||||
|
DWORD bfmask[3];
|
||||||
|
if (dwCompression == BI_BITFIELDS)
|
||||||
|
{
|
||||||
|
hFile->Read(bfmask, 12, 1);
|
||||||
|
} else {
|
||||||
|
bfmask[0]=0x7C00; bfmask[1]=0x3E0; bfmask[2]=0x1F; //RGB555
|
||||||
|
}
|
||||||
|
// bf.bfOffBits required after the bitfield mask <Cui Ying Jie>
|
||||||
|
if (bf.bfOffBits != 0L) hFile->Seek(off + bf.bfOffBits,SEEK_SET);
|
||||||
|
// read in the pixels
|
||||||
|
hFile->Read(info.pImage, head.biHeight*((head.biWidth+1)/2)*4,1);
|
||||||
|
// transform into RGB
|
||||||
|
Bitfield2RGB(info.pImage,(WORD)bfmask[0],(WORD)bfmask[1],(WORD)bfmask[2],16);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 8 :
|
||||||
|
case 4 :
|
||||||
|
case 1 :
|
||||||
|
if (bf.bfOffBits != 0L) hFile->Seek(off + bf.bfOffBits,SEEK_SET);
|
||||||
|
switch (dwCompression) {
|
||||||
|
case BI_RGB :
|
||||||
|
hFile->Read(info.pImage, head.biSizeImage,1); // read in the pixels
|
||||||
|
break;
|
||||||
|
case BI_RLE4 :
|
||||||
|
{
|
||||||
|
BYTE status_byte = 0;
|
||||||
|
BYTE second_byte = 0;
|
||||||
|
int scanline = 0;
|
||||||
|
int bits = 0;
|
||||||
|
BOOL low_nibble = FALSE;
|
||||||
|
CImageIterator iter(this);
|
||||||
|
|
||||||
|
for (BOOL bContinue = TRUE; bContinue;) {
|
||||||
|
hFile->Read(&status_byte, sizeof(BYTE), 1);
|
||||||
|
switch (status_byte) {
|
||||||
|
case RLE_COMMAND :
|
||||||
|
hFile->Read(&status_byte, sizeof(BYTE), 1);
|
||||||
|
switch (status_byte) {
|
||||||
|
case RLE_ENDOFLINE :
|
||||||
|
bits = 0;
|
||||||
|
scanline++;
|
||||||
|
low_nibble = FALSE;
|
||||||
|
break;
|
||||||
|
case RLE_ENDOFBITMAP :
|
||||||
|
bContinue=FALSE;
|
||||||
|
break;
|
||||||
|
case RLE_DELTA :
|
||||||
|
{
|
||||||
|
// read the delta values
|
||||||
|
BYTE delta_x;
|
||||||
|
BYTE delta_y;
|
||||||
|
hFile->Read(&delta_x, sizeof(BYTE), 1);
|
||||||
|
hFile->Read(&delta_y, sizeof(BYTE), 1);
|
||||||
|
// apply them
|
||||||
|
bits += delta_x / 2;
|
||||||
|
scanline += delta_y;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default :
|
||||||
|
hFile->Read(&second_byte, sizeof(BYTE), 1);
|
||||||
|
BYTE *sline = iter.GetRow(scanline);
|
||||||
|
for (int i = 0; i < status_byte; i++) {
|
||||||
|
if (low_nibble) {
|
||||||
|
if ((DWORD)(sline+bits) < (DWORD)(info.pImage+head.biSizeImage)){
|
||||||
|
*(sline + bits) |= (second_byte & 0x0F);
|
||||||
|
}
|
||||||
|
if (i != status_byte - 1)
|
||||||
|
hFile->Read(&second_byte, sizeof(BYTE), 1);
|
||||||
|
bits++;
|
||||||
|
} else {
|
||||||
|
if ((DWORD)(sline+bits) < (DWORD)(info.pImage+head.biSizeImage)){
|
||||||
|
*(sline + bits) = (BYTE)(second_byte & 0xF0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
low_nibble = !low_nibble;
|
||||||
|
}
|
||||||
|
if ((((status_byte+1) >> 1) & 1 )== 1)
|
||||||
|
hFile->Read(&second_byte, sizeof(BYTE), 1);
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
{
|
||||||
|
BYTE *sline = iter.GetRow(scanline);
|
||||||
|
hFile->Read(&second_byte, sizeof(BYTE), 1);
|
||||||
|
for (unsigned i = 0; i < status_byte; i++) {
|
||||||
|
if (low_nibble) {
|
||||||
|
if ((DWORD)(sline+bits) < (DWORD)(info.pImage+head.biSizeImage)){
|
||||||
|
*(sline + bits) |= (second_byte & 0x0F);
|
||||||
|
}
|
||||||
|
bits++;
|
||||||
|
} else {
|
||||||
|
if ((DWORD)(sline+bits) < (DWORD)(info.pImage+head.biSizeImage)){
|
||||||
|
*(sline + bits) = (BYTE)(second_byte & 0xF0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
low_nibble = !low_nibble;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BI_RLE8 :
|
||||||
|
{
|
||||||
|
BYTE status_byte = 0;
|
||||||
|
BYTE second_byte = 0;
|
||||||
|
int scanline = 0;
|
||||||
|
int bits = 0;
|
||||||
|
CImageIterator iter(this);
|
||||||
|
|
||||||
|
for (BOOL bContinue = TRUE; bContinue; ) {
|
||||||
|
hFile->Read(&status_byte, sizeof(BYTE), 1);
|
||||||
|
switch (status_byte) {
|
||||||
|
case RLE_COMMAND :
|
||||||
|
hFile->Read(&status_byte, sizeof(BYTE), 1);
|
||||||
|
switch (status_byte) {
|
||||||
|
case RLE_ENDOFLINE :
|
||||||
|
bits = 0;
|
||||||
|
scanline++;
|
||||||
|
break;
|
||||||
|
case RLE_ENDOFBITMAP :
|
||||||
|
bContinue=FALSE;
|
||||||
|
break;
|
||||||
|
case RLE_DELTA :
|
||||||
|
{
|
||||||
|
// read the delta values
|
||||||
|
BYTE delta_x;
|
||||||
|
BYTE delta_y;
|
||||||
|
hFile->Read(&delta_x, sizeof(BYTE), 1);
|
||||||
|
hFile->Read(&delta_y, sizeof(BYTE), 1);
|
||||||
|
// apply them
|
||||||
|
bits += delta_x;
|
||||||
|
scanline += delta_y;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default :
|
||||||
|
hFile->Read((void *)(iter.GetRow(scanline) + bits), sizeof(BYTE) * status_byte, 1);
|
||||||
|
// align run length to even number of bytes
|
||||||
|
if ((status_byte & 1) == 1)
|
||||||
|
hFile->Read(&second_byte, sizeof(BYTE), 1);
|
||||||
|
bits += status_byte;
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
BYTE *sline = iter.GetRow(scanline);
|
||||||
|
hFile->Read(&second_byte, sizeof(BYTE), 1);
|
||||||
|
for (unsigned i = 0; i < status_byte; i++) {
|
||||||
|
if ((DWORD)bits<info.dwEffWidth){
|
||||||
|
*(sline + bits) = second_byte;
|
||||||
|
bits++;
|
||||||
|
} else {
|
||||||
|
bContinue = FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default :
|
||||||
|
throw "compression type not supported";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bTopDownDib) Flip(); //<Flanders>
|
||||||
|
|
||||||
|
} catch (char *message) {
|
||||||
|
strncpy(info.szLastError,message,255);
|
||||||
|
if (info.nEscape==-1) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/* ReadDibBitmapInfo()
|
||||||
|
*
|
||||||
|
* Will read a file in DIB format and return a global HANDLE to its
|
||||||
|
* BITMAPINFO. This function will work with both "old" and "new"
|
||||||
|
* bitmap formats, but will always return a "new" BITMAPINFO.
|
||||||
|
*/
|
||||||
|
bool CxImageBMP::DibReadBitmapInfo(CxFile* fh, BITMAPINFOHEADER *pdib)
|
||||||
|
{
|
||||||
|
if ((fh==NULL)||(pdib==NULL)) return false;
|
||||||
|
|
||||||
|
if (fh->Read(pdib,sizeof(BITMAPINFOHEADER),1)==0) return false;
|
||||||
|
|
||||||
|
BITMAPCOREHEADER bc;
|
||||||
|
|
||||||
|
switch (pdib->biSize) // what type of bitmap info is this?
|
||||||
|
{
|
||||||
|
case sizeof(BITMAPINFOHEADER):
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 64: //sizeof(OS2_BMP_HEADER):
|
||||||
|
fh->Seek((long)(64 - sizeof(BITMAPINFOHEADER)),SEEK_CUR);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case sizeof(BITMAPCOREHEADER):
|
||||||
|
bc = *(BITMAPCOREHEADER*)pdib;
|
||||||
|
pdib->biSize = bc.bcSize;
|
||||||
|
pdib->biWidth = (DWORD)bc.bcWidth;
|
||||||
|
pdib->biHeight = (DWORD)bc.bcHeight;
|
||||||
|
pdib->biPlanes = bc.bcPlanes;
|
||||||
|
pdib->biBitCount = bc.bcBitCount;
|
||||||
|
pdib->biCompression = BI_RGB;
|
||||||
|
pdib->biSizeImage = 0;
|
||||||
|
pdib->biXPelsPerMeter = 0;
|
||||||
|
pdib->biYPelsPerMeter = 0;
|
||||||
|
pdib->biClrUsed = 0;
|
||||||
|
pdib->biClrImportant = 0;
|
||||||
|
|
||||||
|
fh->Seek((long)(sizeof(BITMAPCOREHEADER)-sizeof(BITMAPINFOHEADER)), SEEK_CUR);
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//give a last chance
|
||||||
|
if (pdib->biSize>(sizeof(BITMAPINFOHEADER))&&
|
||||||
|
(pdib->biSizeImage==(unsigned long)(pdib->biHeight*((((pdib->biBitCount*pdib->biWidth)+31)/32)*4)))&&
|
||||||
|
(pdib->biPlanes==1)&&(pdib->biCompression==BI_RGB)&&(pdib->biClrUsed==0))
|
||||||
|
{
|
||||||
|
fh->Seek((long)(pdib->biSize - sizeof(BITMAPINFOHEADER)),SEEK_CUR);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
FixBitmapInfo(pdib);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif //CXIMAGE_SUPPORT_DECODE
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // CXIMAGE_SUPPORT_BMP
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
79
SlnkDWFImpl/CxImage/CxImage/ximabmp.h
Normal file
79
SlnkDWFImpl/CxImage/CxImage/ximabmp.h
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* File: ximabmp.h
|
||||||
|
* Purpose: BMP Image Class Loader and Writer
|
||||||
|
*/
|
||||||
|
/* ==========================================================
|
||||||
|
* CxImageBMP (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it
|
||||||
|
* For conditions of distribution and use, see copyright notice in ximage.h
|
||||||
|
*
|
||||||
|
* Special thanks to Troels Knakkergaard for new features, enhancements and bugfixes
|
||||||
|
*
|
||||||
|
* original CImageBMP and CImageIterator implementation are:
|
||||||
|
* Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra(at)servidor(dot)unam(dot)mx>
|
||||||
|
*
|
||||||
|
* ==========================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(__ximaBMP_h)
|
||||||
|
#define __ximaBMP_h
|
||||||
|
|
||||||
|
#include "ximage.h"
|
||||||
|
|
||||||
|
const int RLE_COMMAND = 0;
|
||||||
|
const int RLE_ENDOFLINE = 0;
|
||||||
|
const int RLE_ENDOFBITMAP = 1;
|
||||||
|
const int RLE_DELTA = 2;
|
||||||
|
|
||||||
|
#if !defined(BI_RLE8)
|
||||||
|
#define BI_RLE8 1L
|
||||||
|
#endif
|
||||||
|
#if !defined(BI_RLE4)
|
||||||
|
#define BI_RLE4 2L
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_BMP
|
||||||
|
|
||||||
|
class CxImageBMP: public CxImage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CxImageBMP(): CxImage(CXIMAGE_FORMAT_BMP) {};
|
||||||
|
|
||||||
|
bool Decode(CxFile * hFile);
|
||||||
|
bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_ENCODE
|
||||||
|
bool Encode(CxFile * hFile);
|
||||||
|
bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); }
|
||||||
|
#endif // CXIMAGE_SUPPORT_ENCODE
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool DibReadBitmapInfo(CxFile* fh, BITMAPINFOHEADER *pdib);
|
||||||
|
};
|
||||||
|
|
||||||
|
#define BFT_ICON 0x4349 /* 'IC' */
|
||||||
|
#define BFT_BITMAP 0x4d42 /* 'BM' */
|
||||||
|
#define BFT_CURSOR 0x5450 /* 'PT' */
|
||||||
|
|
||||||
|
#ifndef WIDTHBYTES
|
||||||
|
#define WIDTHBYTES(i) ((unsigned)((i+31)&(~31))/8) /* ULONG aligned ! */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DibWidthBytesN(lpbi, n) (UINT)WIDTHBYTES((UINT)(lpbi)->biWidth * (UINT)(n))
|
||||||
|
#define DibWidthBytes(lpbi) DibWidthBytesN(lpbi, (lpbi)->biBitCount)
|
||||||
|
|
||||||
|
#define DibSizeImage(lpbi) ((lpbi)->biSizeImage == 0 \
|
||||||
|
? ((DWORD)(UINT)DibWidthBytes(lpbi) * (DWORD)(UINT)(lpbi)->biHeight) \
|
||||||
|
: (lpbi)->biSizeImage)
|
||||||
|
|
||||||
|
#define DibNumColors(lpbi) ((lpbi)->biClrUsed == 0 && (lpbi)->biBitCount <= 8 \
|
||||||
|
? (int)(1 << (int)(lpbi)->biBitCount) \
|
||||||
|
: (int)(lpbi)->biClrUsed)
|
||||||
|
|
||||||
|
#define FixBitmapInfo(lpbi) if ((lpbi)->biSizeImage == 0) \
|
||||||
|
(lpbi)->biSizeImage = DibSizeImage(lpbi); \
|
||||||
|
if ((lpbi)->biClrUsed == 0) \
|
||||||
|
(lpbi)->biClrUsed = DibNumColors(lpbi); \
|
||||||
|
|
||||||
|
#endif
|
||||||
52
SlnkDWFImpl/CxImage/CxImage/ximacfg.h
Normal file
52
SlnkDWFImpl/CxImage/CxImage/ximacfg.h
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#if !defined(__ximaCFG_h)
|
||||||
|
#define __ximaCFG_h
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CxImage supported features
|
||||||
|
#define CXIMAGE_SUPPORT_ALPHA 1
|
||||||
|
#define CXIMAGE_SUPPORT_SELECTION 0
|
||||||
|
#define CXIMAGE_SUPPORT_TRANSFORMATION 1
|
||||||
|
#define CXIMAGE_SUPPORT_DSP 0
|
||||||
|
#define CXIMAGE_SUPPORT_LAYERS 0
|
||||||
|
#define CXIMAGE_SUPPORT_INTERPOLATION 0
|
||||||
|
|
||||||
|
#define CXIMAGE_SUPPORT_DECODE 1
|
||||||
|
#define CXIMAGE_SUPPORT_ENCODE 1 //<vho><T.Peck>
|
||||||
|
#define CXIMAGE_SUPPORT_WINDOWS 1
|
||||||
|
#define CXIMAGE_SUPPORT_WINCE 0 //<T.Peck>
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CxImage supported formats
|
||||||
|
#define CXIMAGE_SUPPORT_BMP 0
|
||||||
|
#define CXIMAGE_SUPPORT_GIF 1
|
||||||
|
#define CXIMAGE_SUPPORT_JPG 1
|
||||||
|
#define CXIMAGE_SUPPORT_PNG 1
|
||||||
|
#define CXIMAGE_SUPPORT_MNG 0
|
||||||
|
#define CXIMAGE_SUPPORT_ICO 0
|
||||||
|
#define CXIMAGE_SUPPORT_TIF 1
|
||||||
|
#define CXIMAGE_SUPPORT_TGA 0
|
||||||
|
#define CXIMAGE_SUPPORT_PCX 0
|
||||||
|
#define CXIMAGE_SUPPORT_WBMP 0
|
||||||
|
#define CXIMAGE_SUPPORT_WMF 0
|
||||||
|
#define CXIMAGE_SUPPORT_J2K 0 // Beta, use JP2
|
||||||
|
#define CXIMAGE_SUPPORT_JBG 0 // GPL'd see ../jbig/copying.txt & ../jbig/patents.htm
|
||||||
|
|
||||||
|
#define CXIMAGE_SUPPORT_JP2 0
|
||||||
|
#define CXIMAGE_SUPPORT_JPC 0
|
||||||
|
#define CXIMAGE_SUPPORT_PGX 0
|
||||||
|
#define CXIMAGE_SUPPORT_PNM 0
|
||||||
|
#define CXIMAGE_SUPPORT_RAS 0
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#define CXIMAGE_MAX_MEMORY 256000000
|
||||||
|
|
||||||
|
#define CXIMAGE_ERR_NOFILE "null file handler"
|
||||||
|
#define CXIMAGE_ERR_NOIMAGE "null image!!!"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//color to grey mapping <H. Muelner> <jurgene>
|
||||||
|
//#define RGB2GRAY(r,g,b) (((b)*114 + (g)*587 + (r)*299)/1000)
|
||||||
|
#define RGB2GRAY(r,g,b) (((b)*117 + (g)*601 + (r)*306) >> 10)
|
||||||
|
|
||||||
|
#endif
|
||||||
197
SlnkDWFImpl/CxImage/CxImage/ximadef.h
Normal file
197
SlnkDWFImpl/CxImage/CxImage/ximadef.h
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
#if !defined(__ximadefs_h)
|
||||||
|
#define __ximadefs_h
|
||||||
|
|
||||||
|
#include "ximacfg.h"
|
||||||
|
|
||||||
|
#if defined(_AFXDLL)||defined(_USRDLL)
|
||||||
|
#define DLL_EXP __declspec(dllexport)
|
||||||
|
#elif defined(_MSC_VER)&&(_MSC_VER<1200)
|
||||||
|
#define DLL_EXP __declspec(dllimport)
|
||||||
|
#else
|
||||||
|
#define DLL_EXP
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_JP2 || CXIMAGE_SUPPORT_JPC || CXIMAGE_SUPPORT_PGX || CXIMAGE_SUPPORT_PNM || CXIMAGE_SUPPORT_RAS
|
||||||
|
#define CXIMAGE_SUPPORT_JASPER 1
|
||||||
|
#else
|
||||||
|
#define CXIMAGE_SUPPORT_JASPER 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_DSP
|
||||||
|
#undef CXIMAGE_SUPPORT_TRANSFORMATION
|
||||||
|
#define CXIMAGE_SUPPORT_TRANSFORMATION 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_TRANSFORMATION || CXIMAGE_SUPPORT_TIF || CXIMAGE_SUPPORT_TGA || CXIMAGE_SUPPORT_BMP || CXIMAGE_SUPPORT_WINDOWS
|
||||||
|
#define CXIMAGE_SUPPORT_BASICTRANSFORMATIONS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_DSP || CXIMAGE_SUPPORT_TRANSFORMATION
|
||||||
|
#undef CXIMAGE_SUPPORT_INTERPOLATION
|
||||||
|
#define CXIMAGE_SUPPORT_INTERPOLATION 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CXIMAGE_SUPPORT_WINCE
|
||||||
|
#undef CXIMAGE_SUPPORT_WMF
|
||||||
|
#define CXIMAGE_SUPPORT_WMF 0
|
||||||
|
#undef CXIMAGE_SUPPORT_WINDOWS
|
||||||
|
#define CXIMAGE_SUPPORT_WINDOWS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
#undef CXIMAGE_SUPPORT_WINDOWS
|
||||||
|
#define CXIMAGE_SUPPORT_WINDOWS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef min
|
||||||
|
#define min(a,b) (((a)<(b))?(a):(b))
|
||||||
|
#endif
|
||||||
|
#ifndef max
|
||||||
|
#define max(a,b) (((a)>(b))?(a):(b))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PI
|
||||||
|
#define PI 3.141592653589793f
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
|
||||||
|
#ifndef _COMPLEX_DEFINED
|
||||||
|
|
||||||
|
typedef struct tagcomplex {
|
||||||
|
double x,y;
|
||||||
|
} _complex;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _cabs(c) sqrt(c.x*c.x+c.y*c.y)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
typedef unsigned char BYTE;
|
||||||
|
typedef unsigned short WORD;
|
||||||
|
typedef unsigned long DWORD;
|
||||||
|
typedef unsigned int UINT;
|
||||||
|
|
||||||
|
typedef DWORD COLORREF;
|
||||||
|
typedef unsigned int HANDLE;
|
||||||
|
typedef void* HRGN;
|
||||||
|
|
||||||
|
#ifndef BOOL
|
||||||
|
#define BOOL bool
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef TRUE
|
||||||
|
#define TRUE true
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef FALSE
|
||||||
|
#define FALSE false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef TCHAR
|
||||||
|
#define TCHAR char
|
||||||
|
#define _T
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct tagRECT
|
||||||
|
{
|
||||||
|
long left;
|
||||||
|
long top;
|
||||||
|
long right;
|
||||||
|
long bottom;
|
||||||
|
} RECT;
|
||||||
|
|
||||||
|
typedef struct tagPOINT
|
||||||
|
{
|
||||||
|
long x;
|
||||||
|
long y;
|
||||||
|
} POINT;
|
||||||
|
|
||||||
|
typedef struct tagRGBQUAD {
|
||||||
|
BYTE rgbBlue;
|
||||||
|
BYTE rgbGreen;
|
||||||
|
BYTE rgbRed;
|
||||||
|
BYTE rgbReserved;
|
||||||
|
} RGBQUAD;
|
||||||
|
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
typedef struct tagBITMAPINFOHEADER{
|
||||||
|
DWORD biSize;
|
||||||
|
long biWidth;
|
||||||
|
long biHeight;
|
||||||
|
WORD biPlanes;
|
||||||
|
WORD biBitCount;
|
||||||
|
DWORD biCompression;
|
||||||
|
DWORD biSizeImage;
|
||||||
|
long biXPelsPerMeter;
|
||||||
|
long biYPelsPerMeter;
|
||||||
|
DWORD biClrUsed;
|
||||||
|
DWORD biClrImportant;
|
||||||
|
} BITMAPINFOHEADER;
|
||||||
|
|
||||||
|
typedef struct tagBITMAPFILEHEADER {
|
||||||
|
WORD bfType;
|
||||||
|
DWORD bfSize;
|
||||||
|
WORD bfReserved1;
|
||||||
|
WORD bfReserved2;
|
||||||
|
DWORD bfOffBits;
|
||||||
|
} BITMAPFILEHEADER;
|
||||||
|
|
||||||
|
typedef struct tagBITMAPCOREHEADER {
|
||||||
|
DWORD bcSize;
|
||||||
|
WORD bcWidth;
|
||||||
|
WORD bcHeight;
|
||||||
|
WORD bcPlanes;
|
||||||
|
WORD bcBitCount;
|
||||||
|
} BITMAPCOREHEADER;
|
||||||
|
|
||||||
|
typedef struct tagRGBTRIPLE {
|
||||||
|
BYTE rgbtBlue;
|
||||||
|
BYTE rgbtGreen;
|
||||||
|
BYTE rgbtRed;
|
||||||
|
} RGBTRIPLE;
|
||||||
|
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
|
#define BI_RGB 0L
|
||||||
|
#define BI_RLE8 1L
|
||||||
|
#define BI_RLE4 2L
|
||||||
|
#define BI_BITFIELDS 3L
|
||||||
|
|
||||||
|
#define GetRValue(rgb) ((BYTE)(rgb))
|
||||||
|
#define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8))
|
||||||
|
#define GetBValue(rgb) ((BYTE)((rgb)>>16))
|
||||||
|
#define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
|
||||||
|
|
||||||
|
#ifndef _COMPLEX_DEFINED
|
||||||
|
|
||||||
|
typedef struct tagcomplex {
|
||||||
|
double x,y;
|
||||||
|
} _complex;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _cabs(c) sqrt(c.x*c.x+c.y*c.y)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif //__ximadefs
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user