20#include "vflattencmd.h"
23#include <core/vpath.h>
24#include <core/vsegment.h>
54VFlattenCmd::VFlattenCmd( VDocument *doc, double flatness )
57 m_flatness = flatness > 0.0 ? flatness : 1.0;
61VFlattenCmd::visitVSubpath( VSubpath& path )
68 while( !path.current()-> isFlat( m_flatness ) )
72 path.current()-> splitAt( 0.5 ) );
All non-visual, static doc info is in here.
VReplacingCmd is a generic command.
bool isFlat(double flatness=VGlobal::flatnessTolerance) const Returns true if the segment is flat.
void setDegree(unsigned short deg) Sets the segment's degree and thus resizes the array of node data.
VSegment * splitAt(double t) Splits the segment at parameter 0 <= t <= 1.
VSubpath provides a sophisticated list of VSegment.
|