UWVA#66175 Via SymbolOrigin de berekende (centroid) origin kunnen overrulen
svn path=/Slnkdwf/trunk/; revision=50389
This commit is contained in:
@@ -68,6 +68,7 @@ interface IWhipFile : IDispatch{
|
||||
[propget, id(25), helpstring("property AddContour")] HRESULT AddContour([out, retval] ISLNKContour** pVal);
|
||||
[propget, id(27), helpstring("property vectorDpi")] HRESULT vectorDpi([out, retval] LONG* pVal);
|
||||
[propget, id(28), helpstring("property DwgLimits")] HRESULT DwgLimits([out, retval] IBoundingBox** pVal);
|
||||
[id(29), helpstring("method SymbolOrigin")] HRESULT SymbolOrigin([in] BSTR symbolName, [in] DOUBLE dwgX, [in] DOUBLE dwgY);
|
||||
};
|
||||
[
|
||||
object,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Zorg dat versies alfabetisch altijd op elkaar volgen!
|
||||
#define SLNK_MAJOR_VERSION 4
|
||||
#define SLNK_MINOR_VERSION 22
|
||||
#define SLNK_MINOR_VERSION 24
|
||||
#define SLNK_BUILD_VERSION 0
|
||||
|
||||
// Define resource strings
|
||||
|
||||
@@ -830,7 +830,7 @@ bool CWhipFile::GenerateSymbols(myWT_File &my_file)
|
||||
symbol->serialize(my_file, m_contunits, NULL,
|
||||
m_next_node_num,
|
||||
m_hintScale, m_forFind, scale);
|
||||
else
|
||||
else
|
||||
{
|
||||
CString s; s.Format("About to insert symbol %d %s (%s)", m_next_node_num, symbol->m_SLNKContour.m_Key, symbol->m_symbolName);
|
||||
comment(my_file, s);
|
||||
@@ -1010,7 +1010,7 @@ STDMETHODIMP CWhipFile::Generate(myWT_File &my_file)
|
||||
WT_Result result;
|
||||
|
||||
my_file.set_file_mode(WT_File::File_Write);
|
||||
|
||||
|
||||
WT_Boolean binary = !my_file.m_ascii;
|
||||
my_file.heuristics().set_allow_binary_data(binary);
|
||||
// Zal niet zo snel meer gebeuren maar we willen het zeker niet
|
||||
@@ -1256,6 +1256,24 @@ STDMETHODIMP CWhipFile::DefineBitmapSymbol(BSTR symbolName, BSTR symbolPath, dou
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CWhipFile::SymbolOrigin(BSTR symbolName, DOUBLE dwgX, DOUBLE dwgY)
|
||||
{
|
||||
CString name(symbolName);
|
||||
|
||||
myTRACE("\nMoving symbol %s to %.2f,%.2f", name, dwgX, dwgY);
|
||||
|
||||
if (!m_SLNKSymbolDefinitions.Lookup(name))
|
||||
return E_INVALIDARG;
|
||||
|
||||
CSLNKSymbolDefinition * symb = m_SLNKSymbolDefinitions[name];
|
||||
myTRACE("\nOld origin %d, %d", symb->m_Origin.m_x, symb->m_Origin.m_y);
|
||||
symb->m_Origin = symb->m_BoundingContour.m_Units.transform(WT_Point3D(dwgX, dwgY));
|
||||
myTRACE("\nNew origin %d, %d", symb->m_Origin.m_x, symb->m_Origin.m_y);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
// Merk op: als iemand twee keer dezelfde contour opvraagt maken we twee onafhankelijke
|
||||
// SLNKContour objecten aan die beide naar dezelfde CSLNKContourImpl wijzen
|
||||
// Het maakt verder weinig uit en is wel gemakkelijker (toch?)
|
||||
|
||||
@@ -72,6 +72,7 @@ public:
|
||||
STDMETHOD(DefineSymbol)(BSTR symbolName, VARIANT EPlotStream, ISLNKContour** pContour);
|
||||
STDMETHOD(DefineW2DSymbol)(BSTR symbolName, BSTR WhipPath, ISLNKContour** pContour);
|
||||
STDMETHOD(DefineBitmapSymbol)(BSTR symbolName, BSTR symbolPath, DOUBLE height);
|
||||
STDMETHOD(SymbolOrigin)(BSTR symbolName, DOUBLE dwgX, DOUBLE dwgY);
|
||||
STDMETHOD(get_Contour)(BSTR IdentLabel, ISLNKContour** pVal);
|
||||
STDMETHOD(SetFilterLayers)(BSTR reLayers);
|
||||
STDMETHOD(get_FindInContour)(DOUBLE dwgX, DOUBLE dwgY, BSTR* pVal);
|
||||
@@ -83,7 +84,7 @@ private:
|
||||
double m_FontHeight, m_FontHeightSymbols;
|
||||
|
||||
CComQIPtr<IEPlotSection> m_iEPlotSection; // Om scope levend te houden
|
||||
CComQIPtr<IBoundingBox> m_dwgLimits;
|
||||
CComQIPtr<IBoundingBox> m_dwgLimits;
|
||||
myWT_File m_W2DFile;
|
||||
long m_vdpi;
|
||||
WT_View m_view; // Initial view
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
V4.24 13-03-2021
|
||||
- Via SymbolOrigin de berekende (centroid) origin kunnen overrulen
|
||||
|
||||
V4.23 22-10-2020
|
||||
(let op: vergeten versienummer in SLNKDWFVersion.h op te hogen)
|
||||
- Win32 Exceptions bij omgeldig plaatje iets beter afvangen
|
||||
- Bij roteren over vaste hoek (0/90/180/27) dat ook rond 0,0 doen
|
||||
voorkomt overflows.
|
||||
- Betere co<63>rdinaten markers in fac_verify
|
||||
- Font ook resetten voor allereerste symbool
|
||||
- Symbolen commentaar iets duidelijker in ASCII dwf
|
||||
|
||||
V4.22 24-06-2020
|
||||
- DWFExceptions iets beter afvangen
|
||||
|
||||
Reference in New Issue
Block a user