/**
* @file
* LPE effect for extruding paths (making them "3D").
*
*/
/* Authors:
* Johan Engelen <j.b.c.engelen@utwente.nl>
*
* Copyright (C) 2009 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/lpe-extrude.h"
#include <algorithm>
#include "sp-item.h"
namespace Inkscape {
namespace LivePathEffect {
extrude_vector(_("Direction"), _("Defines the direction and magnitude of the extrusion"), "extrude_vector", &wr, this, Geom::Point(-10,10))
{
show_orig_path = true;
concatenate_before_pwd2 = false;
}
LPEExtrude::~LPEExtrude()
{
}
}
// this should be factored out later.
using namespace Geom;
// cusps are spots where the derivative jumps.
// there is a jump in the derivative, so add it to the cusps list
}
}
return cusps;
}
{
using namespace Geom;
// generate connecting lines (the 'sides' of the extrusion)
switch( 1 ) {
case 0: {
/* This one results in the following subpaths: the original, a displaced copy, and connector lines between the two
*/
// generate extrusion bottom: (just a copy of original path, displaced a bit)
// connecting lines should be put at start and end of path if it is not closed
// it is not possible to check whether a piecewise<T> path is closed,
// so we check whether start and end are close
}
// connecting lines should be put at cusps
}
// connecting lines should be put where the tangent of the path equals the extrude_vector in direction
}
return pwd2_out;
}
default:
case 1: {
/* This one creates separate closed subpaths that correspond to the faces of the extruded shape.
* When the LPE is complete, one can convert the shape to a normal path, then break subpaths apart and start coloring them.
*/
// split input path in pieces between points where deriv == vector
// see if we should treat the path as being closed.
bool closed_path = false;
// the path is closed, however if there is a cusp at the closing point, we should treat it as being an open path.
// there is no jump in the derivative, so treat path as being closed
closed_path = true;
}
}
connector_pts = rts;
} else {
connector_pts = rts;
}
double portion_t = 0.;
for (unsigned i = 0; i < connector_pts.size() ; ++i) {
portion_t = connector_pts[i];
if (closed_path && i == 0) {
// if the path is closed, skip the first cut and add it to the last cut later
continue;
}
}
if (closed_path) {
}
return pwd2_out;
}
}
}
void
{
using namespace Geom;
if (bbox) {
extrude_vector.set_and_write_new_values( Geom::Point(boundingbox_X.middle(), boundingbox_Y.middle()),
}
}
} //namespace LivePathEffect
} /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :