v3.00 want divers deprecated spul verwijderd
whipfile.AddContour en contour.AddPoint toegevoegd svn path=/Slnkdwf/trunk/; revision=18350
This commit is contained in:
@@ -689,34 +689,26 @@ WT_Result CSLNKContourImpl::serialize(WT_File & file, BOOL solidOnly, BOOL forFi
|
||||
return WT_Result::Success;
|
||||
};
|
||||
|
||||
|
||||
#ifndef DWFTK_READ_ONLY
|
||||
void CSLNKContourImpl::serializeXML( DWFToolkit::DWFXMLSerializer& rSerializer,
|
||||
WT_Units units )
|
||||
throw( DWFException )
|
||||
void CSLNKContourImpl::AddPoint(double pValX, double pValY, WT_Units units)
|
||||
{
|
||||
rSerializer.startElement( L"Contour ", L"SLNKDWF" );
|
||||
|
||||
rSerializer.addAttribute( L"Label", DWFString(m_contLabel) );
|
||||
wchar_t zTempBuffer[32];
|
||||
_DWFCORE_SWPRINTF( zTempBuffer, 32, L"%.2f", m_DWGArea );
|
||||
rSerializer.addAttribute( "Area", zTempBuffer );
|
||||
|
||||
CString builder;
|
||||
for (int i=0; i < count(); i++)
|
||||
bool wasEmpty = (points()[0].m_x == INT_MAX &&
|
||||
points()[0].m_y == INT_MAX);
|
||||
WT_Logical_Point *pts = new WT_Logical_Point[count()+1];
|
||||
int i;
|
||||
for (i = 0; i < count(); i++)
|
||||
{
|
||||
WT_Point3D dwgPt = units.transform(points()[i]);
|
||||
CString pts;
|
||||
pts.Format("%.1f,%.1f", dwgPt.m_x,dwgPt.m_y);
|
||||
if (builder.GetLength()>0) builder += " ";
|
||||
builder = builder + pts;
|
||||
pts[i] = points()[i];
|
||||
}
|
||||
rSerializer.addAttribute( "Points", (LPCSTR)builder );
|
||||
//rSerializer.addAttribute( DWFXML::kzAttribute_Category, _zCategory );
|
||||
//rSerializer.addAttribute( DWFXML::kzAttribute_Type, _zType );
|
||||
//rSerializer.addAttribute( DWFXML::kzAttribute_Units, _zUnits );
|
||||
// Het nieuwe punt
|
||||
pts[i] = units.transform(WT_Point3D(pValX, pValY));
|
||||
|
||||
// Bij wasEmpty het eerste dummy punt overslaan
|
||||
set(wasEmpty?1:(count() + 1), &pts[wasEmpty?1:0], true);
|
||||
|
||||
rSerializer.endElement();
|
||||
// Na elk punt voor de zekerheid area opnieuw?
|
||||
if (wasEmpty)
|
||||
m_ptLabel = points()[0];
|
||||
|
||||
}
|
||||
#endif
|
||||
delete[] pts;
|
||||
|
||||
}
|
||||
@@ -66,11 +66,6 @@ public:
|
||||
int l_fontheight,
|
||||
double scale,
|
||||
HDC myDC, int width=-2);
|
||||
|
||||
void AddPoint(double pValX, double pValY, WT_Units units);
|
||||
static WT_Integer32 m_next_node_num;
|
||||
#ifndef DWFTK_READ_ONLY
|
||||
void serializeXML( DWFToolkit::DWFXMLSerializer& rSerializer,
|
||||
WT_Units units )
|
||||
throw( DWFException );
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -1024,25 +1024,31 @@ CString CWhip2DCImpl::PolyToMap(WT_Polygon & polygon,
|
||||
if (firstURL->address().length() == 0)
|
||||
Href = "";
|
||||
else
|
||||
Href.Format("href=\"%s\"", CString(firstURL->address().ascii()));
|
||||
Href.Format(" href=\"%s\"", CString(firstURL->address().ascii()));
|
||||
if (firstURL->friendly_name().is_ascii())
|
||||
ttl = firstURL->friendly_name().ascii();
|
||||
else
|
||||
ttl = CStringW(firstURL->friendly_name().unicode());
|
||||
}
|
||||
else
|
||||
ttl = objKey; // Is dit wel zo logisch/wenselijk?
|
||||
//else
|
||||
// ttl = objKey; // Is dit wel zo logisch/wenselijk?
|
||||
|
||||
ttl.Replace("\\n", "\n");
|
||||
Title.Format("title=\"%s\"", ttl);
|
||||
|
||||
CString smbl = "";
|
||||
if (m_State->bIsSymbolLayer && objKey != "")
|
||||
smbl.Format("\nSLNKSymbolKey=\"%s\"", objKey);
|
||||
if (objKey != "")
|
||||
{
|
||||
// SLNKSymbolKey voor FACILITOR 5.3.1 backward compatible
|
||||
if (m_State->bIsSymbolLayer)
|
||||
smbl.Format(" SLNKSymbolKey=\"%s\" SLNKKey=\"%s\"", objKey, objKey);
|
||||
else
|
||||
smbl.Format(" SLNKKey=\"%s\"", objKey);
|
||||
}
|
||||
|
||||
CString Builder;
|
||||
Builder.Format("\n<area shape=\"%s\"\n%s\n%s\n%s%s>",
|
||||
shape, Coords, Title, Href, smbl);
|
||||
Builder.Format("\n<area%s %s shape=\"%s\" %s%s>",
|
||||
smbl, Title, shape, Coords, Href);
|
||||
return Builder;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user