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);
[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);
[propput, id(21), helpstring("property forFind")] HRESULT forFind([in] VARIANT_BOOL newVal);
};
[
object,
@@ -281,6 +282,18 @@ interface IZip : IDispatch{
[id(7), helpstring("method EncryptFromString")] HRESULT EncryptFromString([in] BSTR filepath, [in] BSTR data);
[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),
version(1.0),
@@ -400,4 +413,12 @@ library SLNKDWFLib
{
[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"
ProjectGUID="{7F9F1060-C14D-4DD5-91D3-FA7263FECF5E}"
RootNamespace="SLNKDWF"
Keyword="AtlProj"
>
<Platforms>
@@ -85,7 +81,7 @@
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="..\SlnkdwfImpl\DebugRW\SLNKDWFStaticRW.lib Secur32.lib"
OutputFile="c:\SLNKDWF.dll"
OutputFile="d:\SLNKDWF.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="d:\Library\Dwf702\develop\global\lib\static\debug\vc8.0"
IgnoreDefaultLibraryNames=""
@@ -189,14 +185,14 @@
/>
<Tool
Name="VCPreLinkEventTool"
Description="Unloading IIS..."
CommandLine="unloadIIS.bat"
Description="not Unloading IIS..."
CommandLine="rem unloadIIS.bat"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="..\SlnkdwfImpl\ReleaseRW\SLNKDWFStaticRW.lib Secur32.lib"
OutputFile="c:\SLNKDWF.dll"
OutputFile="D:\SLNKDWF.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="d:\library\Dwf702\develop\global\lib\static\release\vc8.0;.\CxImage\"
ModuleDefinitionFile=".\SLNKDWF.def"
@@ -268,6 +264,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
ForcedIncludeFiles="../SlnkDWFImpl\targetsxs.h"
/>
</FileConfiguration>
</File>
@@ -351,6 +348,10 @@
RelativePath="Whip2PNG.cpp"
>
</File>
<File
RelativePath=".\WhipCleaner.cpp"
>
</File>
<File
RelativePath="WhipFile.cpp"
>
@@ -472,6 +473,10 @@
RelativePath="Whip2PNG.h"
>
</File>
<File
RelativePath=".\WhipCleaner.h"
>
</File>
<File
RelativePath="WhipFile.h"
>
@@ -516,6 +521,10 @@
RelativePath="Whip2PNG.rgs"
>
</File>
<File
RelativePath=".\WhipCleaner.rgs"
>
</File>
<File
RelativePath="WhipFile.rgs"
>
@@ -547,6 +556,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
ForcedIncludeFiles="../SlnkDWFImpl\targetsxs.h"
/>
</FileConfiguration>
</File>

View File

@@ -1,6 +1,6 @@
// Zorg dat versies alfabetisch altijd op elkaar volgen!
#define SLNK_MAJOR_VERSION 2
#define SLNK_MINOR_VERSION 20
#define SLNK_MINOR_VERSION 30
#define SLNK_BUILD_VERSION 0
// 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
WT_Line_Weight().serialize(file);
WT_Fill().serialize(file);
WT_Result result;
// Open onze symbool DWF

View File

@@ -28,7 +28,7 @@ CSLNKSymbolImpl::CSLNKSymbolImpl(double dwgX, double dwgY, CWhipFileState *State
}
WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
CSLNKSymbolDefinition *symbdef, double hintScale)
CSLNKSymbolDefinition *symbdef, double hintScale, BOOL forFind)
{
ATLASSERT(symbdef != NULL);
@@ -177,8 +177,11 @@ WT_Result CSLNKSymbolImpl::serialize (WT_File & file, WT_Units & units,
WT_Color().serialize(file); // Op de default zetten.
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
m_SLNKContour.serialize(file, true);
m_SLNKContour.serialize(file, true, forFind);
// En transform weer terug
file.heuristics().set_transform(wasTransform);

View File

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

View File

@@ -75,7 +75,7 @@ BEGIN
VALUE "FileDescription", "Superlink DWF "
VALUE "FileVersion", SLNK_BUILDVERSION "\0"
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 "ProductName", "Superlink"
VALUE "ProductVersion", SLNK_BUILDVERSION "\0"
@@ -136,12 +136,7 @@ IDR_SLNKCONTOUR REGISTRY "SLNKContour.rgs"
IDR_SLNKSYMBOL REGISTRY "SLNKSymbol.rgs"
IDR_OPTIONS REGISTRY "Options.rgs"
IDR_ZIP REGISTRY "Zip.rgs"
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDR_WHIPCLEANER REGISTRY "WhipCleaner.rgs"
#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 "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
STDMETHODIMP CWhipFile::SaveAs(BSTR WhipPath)
{
myTRACE("\nAbout to save into %ls with plan", (LPCTSTR)WhipPath);
myTRACE("\nAbout to save into %ls", (LPCTSTR)WhipPath);
__try {
return SaveAs2(WhipPath);
@@ -635,7 +653,8 @@ bool CWhipFile::GenerateSymbols(myWT_File &my_file)
{
CSLNKSymbolImpl *symbol= m_State.m_SLNKSymbols[i];
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
{
#ifdef _DEBUG
@@ -644,7 +663,8 @@ bool CWhipFile::GenerateSymbols(myWT_File &my_file)
cmt.set(s);
cmt.serialize(my_file);
#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;
@@ -719,7 +739,7 @@ bool CWhipFile::GenerateContouren(WT_File &my_planfile, myWT_File &my_file,
my_file.desired_rendition().line_weight() = myRound(10 * scale);
if (!m_State.layerMatch("SLNK Contours"))
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;
@@ -1125,6 +1145,17 @@ STDMETHODIMP CWhipFile::put_hintScale(DOUBLE newVal)
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)
{
CString result;

View File

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

View File

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

View File

@@ -4,6 +4,8 @@
#pragma once
#include "../SLNKDwfImpl/targetsxs.h"
#ifndef STRICT
#define STRICT
#endif

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/Vigor
C:\Inetpub\AdminScripts\adsutil.vbs APPUNLOAD W3SVC/1/Root/FacilitorWork
C:\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/1
::C:\Inetpub\AdminScripts\adsutil.vbs APPUNLOAD W3SVC/1/Root/SLNKDWF
::C:\Inetpub\AdminScripts\adsutil.vbs APPUNLOAD W3SVC/1/Root/FacilitorWork
::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)
****************************************************************************/
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
{ // 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
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 CPoint pt, const CPoint *ps, int size);
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
#include "targetsxs.h"
#ifndef STRICT
#define STRICT
#endif