FSN#18414 symbolen FILL reset

svn path=/Slnkdwf/trunk/; revision=12493
This commit is contained in:
Jos Groot Lipman
2010-08-12 21:52:18 +00:00
parent 6ddcc6bf77
commit a51a02f07e
15 changed files with 125 additions and 59 deletions

View File

@@ -62,6 +62,7 @@ interface IWhipFile : IDispatch{
[propget, id(19), helpstring("property hintScale")] HRESULT hintScale([out, retval] DOUBLE* pVal); [propget, id(19), helpstring("property hintScale")] HRESULT hintScale([out, retval] DOUBLE* pVal);
[propput, id(19), helpstring("property hintScale")] HRESULT hintScale([in] DOUBLE newVal); [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); [propget, id(20), helpstring("property FindInContour")] HRESULT FindInContour([in] DOUBLE dwgX, [in] DOUBLE dwgY, [out, retval] BSTR* pVal);
[propput, id(21), helpstring("property forFind")] HRESULT forFind([in] VARIANT_BOOL newVal);
}; };
[ [
object, object,
@@ -281,6 +282,18 @@ interface IZip : IDispatch{
[id(7), helpstring("method EncryptFromString")] HRESULT EncryptFromString([in] BSTR filepath, [in] BSTR data); [id(7), helpstring("method EncryptFromString")] HRESULT EncryptFromString([in] BSTR filepath, [in] BSTR data);
[id(8), helpstring("method Close")] HRESULT Close(void); [id(8), helpstring("method Close")] HRESULT Close(void);
}; };
[
object,
uuid(82E1A85A-80AD-422D-93E4-683B2E91559A),
dual,
nonextensible,
helpstring("IWhipCleaner Interface"),
pointer_default(unique)
]
interface IWhipCleaner : IDispatch{
[id(1), helpstring("method LoadStream")] HRESULT LoadStream([in] VARIANT EPlotStream);
[id(2), helpstring("method SaveAs")] HRESULT SaveAs([in] BSTR WhipPath);
};
[ [
uuid(B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8), uuid(B6FCDE6E-141C-4601-B3AC-4DF4D5F25DF8),
version(1.0), version(1.0),
@@ -400,4 +413,12 @@ library SLNKDWFLib
{ {
[default] interface IZip; [default] interface IZip;
}; };
[
uuid(C3A30C3C-E550-4518-8306-9AA057F23AFD),
helpstring("WhipCleaner Class")
]
coclass WhipCleaner
{
[default] interface IWhipCleaner;
};
}; };

View File

@@ -5,10 +5,6 @@
Name="SLNKDWFCom" Name="SLNKDWFCom"
ProjectGUID="{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}" ProjectGUID="{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}"
RootNamespace="SLNKDWF" RootNamespace="SLNKDWF"
Keyword="AtlProj" Keyword="AtlProj"
> >
<Platforms> <Platforms>
@@ -85,7 +81,7 @@
Name="VCLinkerTool" Name="VCLinkerTool"
IgnoreImportLibrary="true" IgnoreImportLibrary="true"
AdditionalDependencies="..\SlnkdwfImpl\DebugRW\SLNKDWFStaticRW.lib Secur32.lib" AdditionalDependencies="..\SlnkdwfImpl\DebugRW\SLNKDWFStaticRW.lib Secur32.lib"
OutputFile="c:\SLNKDWF.dll" OutputFile="d:\SLNKDWF.dll"
LinkIncremental="2" LinkIncremental="2"
AdditionalLibraryDirectories="d:\Library\Dwf702\develop\global\lib\static\debug\vc8.0" AdditionalLibraryDirectories="d:\Library\Dwf702\develop\global\lib\static\debug\vc8.0"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
@@ -189,14 +185,14 @@
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
Description="Unloading IIS..." Description="not Unloading IIS..."
CommandLine="unloadIIS.bat" CommandLine="rem unloadIIS.bat"
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
IgnoreImportLibrary="true" IgnoreImportLibrary="true"
AdditionalDependencies="..\SlnkdwfImpl\ReleaseRW\SLNKDWFStaticRW.lib Secur32.lib" AdditionalDependencies="..\SlnkdwfImpl\ReleaseRW\SLNKDWFStaticRW.lib Secur32.lib"
OutputFile="c:\SLNKDWF.dll" OutputFile="D:\SLNKDWF.dll"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="d:\library\Dwf702\develop\global\lib\static\release\vc8.0;.\CxImage\" AdditionalLibraryDirectories="d:\library\Dwf702\develop\global\lib\static\release\vc8.0;.\CxImage\"
ModuleDefinitionFile=".\SLNKDWF.def" ModuleDefinitionFile=".\SLNKDWF.def"
@@ -268,6 +264,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
ForcedIncludeFiles="../SlnkDWFImpl\targetsxs.h"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
@@ -351,6 +348,10 @@
RelativePath="Whip2PNG.cpp" RelativePath="Whip2PNG.cpp"
> >
</File> </File>
<File
RelativePath=".\WhipCleaner.cpp"
>
</File>
<File <File
RelativePath="WhipFile.cpp" RelativePath="WhipFile.cpp"
> >
@@ -472,6 +473,10 @@
RelativePath="Whip2PNG.h" RelativePath="Whip2PNG.h"
> >
</File> </File>
<File
RelativePath=".\WhipCleaner.h"
>
</File>
<File <File
RelativePath="WhipFile.h" RelativePath="WhipFile.h"
> >
@@ -516,6 +521,10 @@
RelativePath="Whip2PNG.rgs" RelativePath="Whip2PNG.rgs"
> >
</File> </File>
<File
RelativePath=".\WhipCleaner.rgs"
>
</File>
<File <File
RelativePath="WhipFile.rgs" RelativePath="WhipFile.rgs"
> >
@@ -547,6 +556,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
ForcedIncludeFiles="../SlnkDWFImpl\targetsxs.h"
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>

View File

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

View File

@@ -378,7 +378,6 @@ WT_Result CSLNKSymbolDefinition::serialize(WT_File & file, WT_Color pColor, BOOL
//TODO: Moet eigenlijk voor alle attributen //TODO: Moet eigenlijk voor alle attributen
WT_Line_Weight().serialize(file); WT_Line_Weight().serialize(file);
WT_Fill().serialize(file);
WT_Result result; WT_Result result;
// Open onze symbool DWF // Open onze symbool DWF

View File

@@ -28,10 +28,10 @@ CSLNKSymbolImpl::CSLNKSymbolImpl(double dwgX, double dwgY, CWhipFileState *State
} }
WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units, WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
CSLNKSymbolDefinition *symbdef, double hintScale) CSLNKSymbolDefinition *symbdef, double hintScale, BOOL forFind)
{ {
ATLASSERT(symbdef != NULL); ATLASSERT(symbdef != NULL);
WT_Point3D insertion(m_dwgX, m_dwgY); WT_Point3D insertion(m_dwgX, m_dwgY);
//m_SLNKContour.m_parentWhipFileState->m_contunits //m_SLNKContour.m_parentWhipFileState->m_contunits
@@ -44,7 +44,7 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
// Onze file had mogelijk al een transform staan. Die moeten we wel blijven ondersteunen // Onze file had mogelijk al een transform staan. Die moeten we wel blijven ondersteunen
// (terugzetten komt wel) // (terugzetten komt wel)
if (wasApplyTransform) if (wasApplyTransform)
{ {
LPInsertion *= wasTransform; LPInsertion *= wasTransform;
} }
// WT_Transform ondersteunt wel rotaties 0,90,180 en 270. Dat gaat echter altijd om DWF 0,0 (oops: die om MAX_INT/2) // WT_Transform ondersteunt wel rotaties 0,90,180 en 270. Dat gaat echter altijd om DWF 0,0 (oops: die om MAX_INT/2)
@@ -60,26 +60,26 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
{ // Cirkel onder het symbool tekenen { // Cirkel onder het symbool tekenen
WT_Logical_Point center = units.transform(insertion); WT_Logical_Point center = units.transform(insertion);
// Binnenkant cirkel // Binnenkant cirkel
file.desired_rendition().color() = WT_Color(128, 128, 128, 0); // doorzichtig werkt (nog) niet voor ellipsen file.desired_rendition().color() = WT_Color(128, 128, 128, 0); // doorzichtig werkt (nog) niet voor ellipsen
WT_Filled_Ellipse(center, 1500, 1500).serialize(file); WT_Filled_Ellipse(center, 1500, 1500).serialize(file);
// Buitenkant cirkel // Buitenkant cirkel
file.desired_rendition().color() = WT_Color(0, 255, 0, 0); // doorzichtig werkt (nog) niet voor ellipsen 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); file.desired_rendition().line_weight() = WT_Line_Weight(100);
WT_Outline_Ellipse(center, 1500, 1500).serialize(file); WT_Outline_Ellipse(center, 1500, 1500).serialize(file);
file.desired_rendition().line_weight() = WT_Line_Weight(0); file.desired_rendition().line_weight() = WT_Line_Weight(0);
} }
#endif #endif
#ifdef _DEBUG #ifdef _DEBUG
{ // klein cirkeltje op insertion { // klein cirkeltje op insertion
WT_Logical_Point center = units.transform(insertion); WT_Logical_Point center = units.transform(insertion);
// Binnenkant cirkel // Binnenkant cirkel
file.desired_rendition().color() = WT_Color(0, 0, 128, 0); // doorzichtig werkt (nog) niet voor ellipsen file.desired_rendition().color() = WT_Color(0, 0, 128, 0); // doorzichtig werkt (nog) niet voor ellipsen
WT_Filled_Ellipse(center, 50, 50).serialize(file); WT_Filled_Ellipse(center, 50, 50).serialize(file);
// Buitenkant cirkel // Buitenkant cirkel
file.desired_rendition().color() = WT_Color(0, 128, 0, 0); // doorzichtig werkt (nog) niet voor ellipsen 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); file.desired_rendition().line_weight() = WT_Line_Weight(10);
WT_Outline_Ellipse(center, 50, 50).serialize(file); WT_Outline_Ellipse(center, 50, 50).serialize(file);
file.desired_rendition().line_weight() = WT_Line_Weight(0); file.desired_rendition().line_weight() = WT_Line_Weight(0);
} }
#endif #endif
@@ -88,7 +88,7 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
dx = dy = m_Scale * dScale / symbdef->m_dwgScale; dx = dy = m_Scale * dScale / symbdef->m_dwgScale;
// PAS OP: (SDU tekening) je kunt hier in overflow problemen komen // 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 // 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 // ofwel als d(rawing)Scale > symbdef->m_dwgScale (en dan heb ik het nog
// niet over verschaalde symbolen). // niet over verschaalde symbolen).
if (dx*symbdef->m_Origin.m_x > INT_MAX || dy*symbdef->m_Origin.m_y > INT_MAX) if (dx*symbdef->m_Origin.m_x > INT_MAX || dy*symbdef->m_Origin.m_y > INT_MAX)
{ {
@@ -119,7 +119,7 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
pixeldx = myRound((bx.maxpt().m_x - bx.minpt().m_x)*m_Scale/symbdef->m_dwgScale/hintScale); 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); 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("\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); //myDoTRACE(" makes (%d,%d) pixels",pixeldx,pixeldy);
} }
if ( 0 && pixeldx < 100 && pixeldy < 100 ) // Heel weinig pixels if ( 0 && pixeldx < 100 && pixeldy < 100 ) // Heel weinig pixels
{ // Bitmap versie van het symbool gebruiken { // Bitmap versie van het symbool gebruiken
@@ -133,7 +133,7 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
#endif #endif
{ //Gewone vector versie { //Gewone vector versie
if (m_ColorSet && m_Color.rgba().m_rgb.a==0) if (m_ColorSet && m_Color.rgba().m_rgb.a==0)
{ {
// Skip want toch onzichtbaar // Skip want toch onzichtbaar
} }
else else
@@ -149,7 +149,7 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
//Cirkeltje op symbool zwaartepunt //Cirkeltje op symbool zwaartepunt
//file.desired_rendition().color() = WT_Color(255, 0, 0, 0); //file.desired_rendition().color() = WT_Color(255, 0, 0, 0);
//WT_Filled_Ellipse(symbdef->m_Center, 50, 50).serialize(file); //WT_Filled_Ellipse(symbdef->m_Center, 50, 50).serialize(file);
// En vervolgens nog een mooi bounding contourtje er om heen. // 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 // Die is essentieel voor het aanwijzen. Doordat hierboven de alpha op 0 is gezet wordt hij wel transparant
@@ -158,10 +158,10 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
// Contour is ook handig voor later teksten bijplaatsen maar pas wel op dat // Contour is ook handig voor later teksten bijplaatsen maar pas wel op dat
// de contour al getransformeerd is naar de definitieve coordinaten ruimte (anders kregen we soms bij // de contour al getransformeerd is naar de definitieve coordinaten ruimte (anders kregen we soms bij
// geroteerde symbolen overflow problemen) // geroteerde symbolen overflow problemen)
// //
#undef BOUNDINGBOX_HERBEREKENEN #undef BOUNDINGBOX_HERBEREKENEN
#ifdef BOUNDINGBOX_HERBEREKENEN #ifdef BOUNDINGBOX_HERBEREKENEN
WT_Polygon pl; WT_Polygon pl;
symbdef->calculateBoundary(pl, &SymbolTrans); symbdef->calculateBoundary(pl, &SymbolTrans);
if (pl.count()>0) if (pl.count()>0)
@@ -176,9 +176,12 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
WT_Color().serialize(file); // Op de default zetten. WT_Color().serialize(file); // Op de default zetten.
file.desired_rendition().color() = file.rendition().color() = WT_Color(); file.desired_rendition().color() = file.rendition().color() = WT_Color();
WT_Fill().serialize(file); // Ook op de default zetten.
file.desired_rendition().fill() = file.rendition().fill() = WT_Fill();
file.heuristics().set_apply_transform(WD_False); // Hebben we al rechtstreeks op de contour gedaan file.heuristics().set_apply_transform(WD_False); // Hebben we al rechtstreeks op de contour gedaan
m_SLNKContour.serialize(file, true); m_SLNKContour.serialize(file, true, forFind);
// En transform weer terug // En transform weer terug
file.heuristics().set_transform(wasTransform); file.heuristics().set_transform(wasTransform);

View File

@@ -12,7 +12,7 @@ public:
WT_Result serialize (WT_File & file, WT_Units & units, WT_Result serialize (WT_File & file, WT_Units & units,
CSLNKSymbolDefinition *symbdef, CSLNKSymbolDefinition *symbdef,
double hintScale); double hintScale, BOOL forFind);
WT_Result calculateBoundary (myWT_File *wtFile); WT_Result calculateBoundary (myWT_File *wtFile);
~CSLNKSymbolImpl(void); ~CSLNKSymbolImpl(void);

View File

@@ -75,7 +75,7 @@ BEGIN
VALUE "FileDescription", "Superlink DWF " VALUE "FileDescription", "Superlink DWF "
VALUE "FileVersion", SLNK_BUILDVERSION "\0" VALUE "FileVersion", SLNK_BUILDVERSION "\0"
VALUE "InternalName", "SLNKDWF.dll" VALUE "InternalName", "SLNKDWF.dll"
VALUE "LegalCopyright", "(c) SG|facilitor 2005-2008. All rights reserved." VALUE "LegalCopyright", "(c) SG|facilitor 2005-2010. All rights reserved."
VALUE "OriginalFilename", "SLNKDWF.dll" VALUE "OriginalFilename", "SLNKDWF.dll"
VALUE "ProductName", "Superlink" VALUE "ProductName", "Superlink"
VALUE "ProductVersion", SLNK_BUILDVERSION "\0" VALUE "ProductVersion", SLNK_BUILDVERSION "\0"
@@ -136,12 +136,7 @@ IDR_SLNKCONTOUR REGISTRY "SLNKContour.rgs"
IDR_SLNKSYMBOL REGISTRY "SLNKSymbol.rgs" IDR_SLNKSYMBOL REGISTRY "SLNKSymbol.rgs"
IDR_OPTIONS REGISTRY "Options.rgs" IDR_OPTIONS REGISTRY "Options.rgs"
IDR_ZIP REGISTRY "Zip.rgs" IDR_ZIP REGISTRY "Zip.rgs"
IDR_WHIPCLEANER REGISTRY "WhipCleaner.rgs"
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
#endif // Dutch (Netherlands) resources #endif // Dutch (Netherlands) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@@ -1,4 +1,22 @@
// WhipFile.cpp : Implementation of CWhipFile /******************************************************************************
* File : WhipFile.cpp (c) 2005-2010, SG|Facilitor
*
* Author : J. Groot Lipman
* Project : SLNKDWF
* Version : 2.xx
*
* Function : Implementeert class CWhipFile
* CWhipfile biedt functionaliteit om een bestaande DWF te
* manipuleren en het resultaat op te slaan als een nieuwe DWF
* - Contouren kunnen herkend worden (polygon op goede laag
* met een label erin op de goede laag)
* - Deze contouren kunnen gemanipuleerd worden (kleuren bijv)
* - Deze labels kunnen gemanipuleerd worden (text, positie)
* - Deze contouren worden bij het wegschrijven 'gewrapped' in
* een node objecten. Deze wordt opgeleverd door Whip2DC bij
* aanwijzen
* - Symbolen kunnen worden toegevoegd
*****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#include "myEPlotSection.h" #include "myEPlotSection.h"
@@ -559,7 +577,7 @@ HRESULT CWhipFile::SerializePlan(WT_File & my_plan_file, myWT_File & my_file, do
// Extra saveas wrapper om met __try een eventuele Win32 exception ook op te vangen // Extra saveas wrapper om met __try een eventuele Win32 exception ook op te vangen
STDMETHODIMP CWhipFile::SaveAs(BSTR WhipPath) STDMETHODIMP CWhipFile::SaveAs(BSTR WhipPath)
{ {
myTRACE("\nAbout to save into %ls with plan", (LPCTSTR)WhipPath); myTRACE("\nAbout to save into %ls", (LPCTSTR)WhipPath);
__try { __try {
return SaveAs2(WhipPath); return SaveAs2(WhipPath);
@@ -635,7 +653,8 @@ bool CWhipFile::GenerateSymbols(myWT_File &my_file)
{ {
CSLNKSymbolImpl *symbol= m_State.m_SLNKSymbols[i]; CSLNKSymbolImpl *symbol= m_State.m_SLNKSymbols[i];
if (symbol->m_symbolName == "" || !m_State.m_SLNKSymbolDefinitions.Lookup(symbol->m_symbolName)) if (symbol->m_symbolName == "" || !m_State.m_SLNKSymbolDefinitions.Lookup(symbol->m_symbolName))
symbol->serialize(my_file, m_State.m_contunits, NULL, m_State.m_hintScale); symbol->serialize(my_file, m_State.m_contunits, NULL,
m_State.m_hintScale, m_State.m_forFind);
else else
{ {
#ifdef _DEBUG #ifdef _DEBUG
@@ -644,7 +663,8 @@ bool CWhipFile::GenerateSymbols(myWT_File &my_file)
cmt.set(s); cmt.set(s);
cmt.serialize(my_file); cmt.serialize(my_file);
#endif #endif
symbol->serialize(my_file, m_State.m_contunits, m_State.m_SLNKSymbolDefinitions[symbol->m_symbolName], m_State.m_hintScale); symbol->serialize(my_file, m_State.m_contunits, m_State.m_SLNKSymbolDefinitions[symbol->m_symbolName],
m_State.m_hintScale, m_State.m_forFind);
} }
} }
return true; return true;
@@ -719,7 +739,7 @@ bool CWhipFile::GenerateContouren(WT_File &my_planfile, myWT_File &my_file,
my_file.desired_rendition().line_weight() = myRound(10 * scale); my_file.desired_rendition().line_weight() = myRound(10 * scale);
if (!m_State.layerMatch("SLNK Contours")) if (!m_State.layerMatch("SLNK Contours"))
contour->m_outlineAlpha=0; // Onzichtbaar maken contour->m_outlineAlpha=0; // Onzichtbaar maken
contour->serialize(my_file, solidOnly); contour->serialize(my_file, solidOnly, m_State.m_forFind);
} }
my_file.desired_rendition().object_node() = current_node; my_file.desired_rendition().object_node() = current_node;
@@ -1125,6 +1145,17 @@ STDMETHODIMP CWhipFile::put_hintScale(DOUBLE newVal)
return S_OK; return S_OK;
} }
STDMETHODIMP CWhipFile::put_forFind(VARIANT_BOOL newVal)
{
m_State.m_forFind = newVal;
return S_OK;
}
// Levert aan de hand van een coordinaat op in welke ruimte deze valt
// Gebruikt door Facilitor Graphics om bijvoorbeeld te controleren of
// de XY van een symbool (nog) wel binnen een ruimte valt.
// mei 2010: Had dit niet ook opgelost kunnen worden met Whip2PNG.Find
// -->Neen, die hebben we daar in de code nog niet?
STDMETHODIMP CWhipFile::get_FindInContour(DOUBLE dwgX, DOUBLE dwgY, BSTR* pVal) STDMETHODIMP CWhipFile::get_FindInContour(DOUBLE dwgX, DOUBLE dwgY, BSTR* pVal)
{ {
CString result; CString result;

View File

@@ -22,6 +22,7 @@ public:
m_reLabels.Parse(".*", FALSE); m_reLabels.Parse(".*", FALSE);
m_reLayers.Parse(".*", FALSE); m_reLayers.Parse(".*", FALSE);
m_hintScale = -1.0; m_hintScale = -1.0;
m_forFind = TRUE; // backward compatible
}; };
BOOL SetLayers(BSTR reContouren, BSTR reLabels) BOOL SetLayers(BSTR reContouren, BSTR reLabels)
{ {
@@ -98,6 +99,7 @@ public:
BOOL contLayerActive; BOOL contLayerActive;
BOOL labelLayerActive; BOOL labelLayerActive;
double m_hintScale; // Kunnen we gebruiken om symbolen te 'geeken' double m_hintScale; // Kunnen we gebruiken om symbolen te 'geeken'
BOOL m_forFind; // Extra info die we kunnen misbruiken
private: private:
CAtlRegExp<> m_reContouren; CAtlRegExp<> m_reContouren;
@@ -189,6 +191,7 @@ private:
public: public:
STDMETHOD(get_hintScale)(DOUBLE* pVal); STDMETHOD(get_hintScale)(DOUBLE* pVal);
STDMETHOD(put_hintScale)(DOUBLE newVal); STDMETHOD(put_hintScale)(DOUBLE newVal);
STDMETHOD(put_forFind)(VARIANT_BOOL newVal);
}; };
OBJECT_ENTRY_AUTO(__uuidof(WhipFile), CWhipFile) OBJECT_ENTRY_AUTO(__uuidof(WhipFile), CWhipFile)

View File

@@ -26,6 +26,7 @@
#define IDR_SLNKSYMBOL 126 #define IDR_SLNKSYMBOL 126
#define IDR_OPTIONS 127 #define IDR_OPTIONS 127
#define IDR_ZIP 128 #define IDR_ZIP 128
#define IDR_WHIPCLEANER 129
// Next default values for new objects // Next default values for new objects
// //
@@ -34,6 +35,6 @@
#define _APS_NEXT_RESOURCE_VALUE 201 #define _APS_NEXT_RESOURCE_VALUE 201
#define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201 #define _APS_NEXT_CONTROL_VALUE 201
#define _APS_NEXT_SYMED_VALUE 129 #define _APS_NEXT_SYMED_VALUE 130
#endif #endif
#endif #endif

View File

@@ -4,6 +4,8 @@
#pragma once #pragma once
#include "../SLNKDwfImpl/targetsxs.h"
#ifndef STRICT #ifndef STRICT
#define STRICT #define STRICT
#endif #endif
@@ -14,9 +16,9 @@
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif #endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #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. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif #endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #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. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
@@ -35,7 +37,7 @@
#define _ATL_ALL_WARNINGS #define _ATL_ALL_WARNINGS
#ifdef _DEBUG #ifdef _DEBUG
//#define _ATL_DEBUG_INTERFACES //#define _ATL_DEBUG_INTERFACES
#endif #endif
#include "resource.h" #include "resource.h"

View File

@@ -1,4 +1,3 @@
C:\Inetpub\AdminScripts\adsutil.vbs APPUNLOAD W3SVC/1/Root/SLNKDWF ::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 APPUNLOAD W3SVC/1/Root/FacilitorWork ::C:\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/1
C:\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/1

View File

@@ -583,7 +583,7 @@ WT_Logical_Point CSLNKContourImpl::DrawOneLabel(WT_File &my_file,
Als solidOnly dan alleen als alpha==255 en een label (wel herkend) Als solidOnly dan alleen als alpha==255 en een label (wel herkend)
****************************************************************************/ ****************************************************************************/
WT_Result CSLNKContourImpl::serialize(WT_File & file, BOOL solidOnly) WT_Result CSLNKContourImpl::serialize(WT_File & file, BOOL solidOnly, BOOL forFind)
{ {
if (!m_fromSymbol && m_contLabel == "" && !solidOnly) // Alleen bij tweede slag if (!m_fromSymbol && m_contLabel == "" && !solidOnly) // Alleen bij tweede slag
{ // May very well be a textobject itself, just emit it { // May very well be a textobject itself, just emit it

View File

@@ -45,7 +45,7 @@ public:
WT_URL_Item m_Url; // Can be defined WT_URL_Item m_Url; // Can be defined
double m_DWGArea; // As determined, original source drawing units double m_DWGArea; // As determined, original source drawing units
WT_Result serialize(WT_File & file, BOOL solidOnly); WT_Result serialize(WT_File & file, BOOL solidOnly, BOOL forFind);
static BOOL PointInPolygon(const WT_Logical_Point pt, const WT_Point_Set &ps); static BOOL PointInPolygon(const WT_Logical_Point pt, const WT_Point_Set &ps);
static BOOL PointInPolygon(const CPoint pt, const CPoint *ps, int size); static BOOL PointInPolygon(const CPoint pt, const CPoint *ps, int size);
static void EdgeAngle(const WT_Logical_Point pt, const WT_Point_Set &ps, double &EdgeAngle, double &EdgeDistance); static void EdgeAngle(const WT_Logical_Point pt, const WT_Point_Set &ps, double &EdgeAngle, double &EdgeDistance);

View File

@@ -4,6 +4,8 @@
#pragma once #pragma once
#include "targetsxs.h"
#ifndef STRICT #ifndef STRICT
#define STRICT #define STRICT
#endif #endif
@@ -14,9 +16,9 @@
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif #endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. #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. #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif #endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. #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. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.