If enabled in the preferences menu, pen and marker strokes will be
replaced by a simplified stroke after they are drawn.
The algorithm is very basic (for now): if three points are almost lined
up (the threshold angle can be specified in the config file), then the
middle one is removed. This is repeated over the whole stroke; new
polygons are then generated based on the simplified stroke points.
This typically cuts down on number of points and polygons by a factor of
about 10, while having minimal visual impact.
- UBGraphicsScene calls UBGraphicsStroke::addPoint, which returns a list
of points that can be drawn. It may be none (e.g we discard very small
segments), one (if we do no interpolation) or several.
- Added a UBInterpolator base, abstract class. Various interpolation
methods can be added easily.
- Current methods: Basic spline (custom), Catmull-Rom spline (based on
alglib), and Bézier
- Added a setting to toggle interpolation. Added this to the UI as well