This class takes the output from Spline and uses that to draw the curve in the graphics window, as a sequence of moves and draws. More...
#include <SplineDrawer.h>
Public Member Functions | |
SplineDrawer (const Transformation &transformation) | |
Single constructor. | |
void | bindToSpline (int numSegments, const Spline &spline) |
Analyze each segment in the Spline. | |
SplineDrawerOperation | segmentOperation (int segment) const |
Indicate if, and how, segment is to be drawn. | |
This class takes the output from Spline and uses that to draw the curve in the graphics window, as a sequence of moves and draws.
The moves and draws by themselves would be trivial (move,draw,draw,draw...) but this actually draws, when needed, differently styled curve segments to indicate each curve segment should be CONNECT_AS_FUNCTION_SMOOTH but actually is not single-valued (=not a function)
This class is aware of the Transformation, unlike the Spline class which is decoupled from that for simplicity. Specifically, this class converts the screen coordinates to graph coordinates to check for single-valuedness.
The algorithm used here has to work in cartesian, polar, linear and/or log coordinates. This requirement, along with the goal of keeping the Spline class simple, pretty much requires using the Transformation and working in graph coordinates.
Definition at line 34 of file SplineDrawer.h.