Engauge Digitizer  2
 All Classes Functions Variables Typedefs Enumerations Friends Pages
Public Member Functions | Friends | List of all members
SplineDrawer Class Reference

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 (const LineStyle &lineStyle, int numSegments, const Spline &spline)
 Analyze each segment in the Spline.
 
bool segmentIsMultiValued (const Spline &spline, int numSegments, int segment) const
 Return true if specified segment is multi-valued, else false.
 
SplineDrawerOperation segmentOperation (int segment) const
 Indicate if, and how, segment is to be drawn.
 

Friends

class TestSplineDrawer
 

Detailed Description

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 35 of file SplineDrawer.h.


The documentation for this class was generated from the following files: