index 1cb14fb58bd6522f0b7ed8b34af0ffb3610a4cc7..a130b692354142786208ac3b1bd8fcfe97aa75bd 100644 (file)
*
* Authors:
* Bob Jamison <ishmal@inkscape.org>
+ * Abhishek Sharma
*
* Copyright (C) 2004-2008 Authors
*
povShapes.push_back(shapeInfo); //passed all tests. save the info
// convert the path to only lineto's and cubic curveto's:
- Geom::Matrix tf = sp_item_i2d_affine(item);
+ Geom::Matrix tf = item->i2d_affine();
Geom::PathVector pathv = pathv_to_linear_and_cubic_beziers( curve->get_pathvector() * tf );
/*
int segmentCount = 0;
/**
* For all Subpaths in the <path>
- */
+ */
for (Geom::PathVector::const_iterator pit = pathv.begin(); pit != pathv.end(); ++pit)
{
/**
* For all segments in the subpath, including extra closing segment defined by 2geom
- */
+ */
for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_closed(); ++cit)
{
nrSegments += segmentCount;
/**
- * at moment of writing, 2geom lacks proper initialization of empty intervals in rect...
- */
- Geom::Rect cminmax( pathv.front().initialPoint(), pathv.front().initialPoint() );
-
-
+ * at moment of writing, 2geom lacks proper initialization of empty intervals in rect...
+ */
+ Geom::Rect cminmax( pathv.front().initialPoint(), pathv.front().initialPoint() );
+
+
/**
* For all Subpaths in the <path>
- */
+ */
for (Geom::PathVector::const_iterator pit = pathv.begin(); pit != pathv.end(); ++pit)
{
/**
* For all segments in the subpath, including extra closing segment defined by 2geom
- */
+ */
for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_closed(); ++cit)
{
nrNodes += 8;
}
else if(Geom::CubicBezier const *cubic = dynamic_cast<Geom::CubicBezier const*>(&*cit))
- {
+ {
std::vector<Geom::Point> points = cubic->points();
Geom::Point p0 = points[0];
Geom::Point p1 = points[1];
nrNodes += 8;
}
else
- {
+ {
err("logical error, because pathv_to_linear_and_cubic_beziers was used");
return false;
}
{
String id;
- if (!obj->id)
+ if (!obj->getId())
{
char buf[16];
sprintf(buf, "id%d", idIndex++);
}
else
{
- id = obj->id;
+ id = obj->getId();
}
if (SP_IS_ITEM(obj))
*/
for (SPObject *child = obj->firstChild() ; child ; child = child->next)
{
- if (!doTreeRecursive(doc, child))
- return false;
- }
+ if (!doTreeRecursive(doc, child))
+ return false;
+ }
return true;
}
err("Could not output curves for %s", filename_utf8);
return;
}
-
+
String curveBuf = outbuf;
outbuf.clear();
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :