simplify method
Simplifies the current sketch to the current simplification degree using simplifier.
This will simplify all lines. If addToUndoHistory
is true, this step
will be added to the undo history
Implementation
void simplify({bool addToUndoHistory = true}) {
final newSketch = simplifier.simplifySketch(
value.sketch,
pixelTolerance: value.simplificationTolerance,
);
if (addToUndoHistory) {
value = value.copyWith(sketch: newSketch);
} else {
temporaryValue = value.copyWith(sketch: newSketch);
}
}