1e aanzet labelrotation. Alleen parameter overdracht, heeft nog geen effect

svn path=/Slnkdwf/trunk/; revision=18472
This commit is contained in:
Jos Groot Lipman
2013-07-15 19:21:45 +00:00
parent b3bdedbf54
commit 7f586d9727
6 changed files with 22 additions and 5 deletions

View File

@@ -5,11 +5,6 @@
#include "DWGPoint.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)
@@ -213,6 +208,20 @@ STDMETHODIMP CSLNKContour::put_Labelposition(BYTE newVal)
return S_OK;
}
STDMETHODIMP CSLNKContour::get_LabelRotation(DOUBLE* pVal)
{
(*pVal) = m_SLNKContour->m_LabelRotation;
return S_OK;
}
STDMETHODIMP CSLNKContour::put_LabelRotation(DOUBLE newVal)
{
m_SLNKContour->m_LabelRotation = newVal;
return S_OK;
}
STDMETHODIMP CSLNKContour::AddPoint(DOUBLE pValX, DOUBLE pValY)
{
m_SLNKContour->AddPoint(pValX, pValY);

View File

@@ -109,6 +109,8 @@ public:
STDMETHOD(put_Fontheight)(DOUBLE newVal);
STDMETHOD(get_Labelposition)(BYTE* pVal);
STDMETHOD(put_Labelposition)(BYTE newVal);
STDMETHOD(get_LabelRotation)(DOUBLE* pVal);
STDMETHOD(put_LabelRotation)(DOUBLE newVal);
STDMETHOD(AddPoint)(DOUBLE pValX, DOUBLE pValY);
STDMETHOD(get_PointCount)(LONG* pVal);
STDMETHOD(get_PointItem)(ULONG i, IDWGPoint** pVal);

View File

@@ -252,6 +252,8 @@ interface ISLNKContour : IDispatch{
[id(14), helpstring("property AddPoint")] HRESULT AddPoint([in] DOUBLE pValX, [in] DOUBLE pValY);
[propget, id(15), helpstring("property PointCount")] HRESULT PointCount([out, retval] LONG* pVal);
[propget, id(16), helpstring("property PointItem")] HRESULT PointItem([in] ULONG i, [out, retval] IDWGPoint** pVal);
[propget, id(17), helpstring("property LabelRotation")] HRESULT LabelRotation([out, retval] DOUBLE* pVal);
[propput, id(17), helpstring("property LabelRotation")] HRESULT LabelRotation([in] DOUBLE pVal);
};
[
object,

View File

@@ -86,6 +86,7 @@ CWhipFile::CWhipFile()
m_activeLayerName = "";
// Predefine fixed symbols
// Merk op dat m_contunits hier nog gewoon de default identity matrix is
CSLNKSymbolDefinition * symb = new CSLNKSymbolDefinition(sizeof(star)/sizeof(star[0]), star, m_contunits);
m_SLNKSymbolDefinitions.SetAt("*STAR", symb);

View File

@@ -20,6 +20,7 @@ CSLNKContourImpl::CSLNKContourImpl(void)
m_Lineweight = 10.0; // 10mm default
m_Fontheight = 200.0;
m_Labelpos = LABEL_DEFAULT;
m_LabelRotation = 0.0;
m_isDynamic = false;
}
@@ -38,6 +39,7 @@ CSLNKContourImpl::CSLNKContourImpl(
m_Lineweight = 10.0; // 10 mm default
m_Fontheight = 200.0;
m_Labelpos = LABEL_DEFAULT;
m_LabelRotation = 0.0;
m_Units = units;
m_isDynamic = false;
}

View File

@@ -42,6 +42,7 @@ public:
double m_DWGArea; // As determined, original source drawing units
double m_Lineweight; // DWG coordinaten
LABELPOS m_Labelpos; // Label position
double m_LabelRotation; // Label rotation, around Centroid!
double m_Fontheight; // Font hoogte in mm
WT_Result serialize(WT_File & file, BOOL solidOnly, BOOL forFind, double scale);