CBezierChartRenderer



This class implements chart renderer which draws chart data as bezier spline connected points.

You can find more information in comments below. Overrided methods can be found in corresponding base class.

class CBezierChartRenderer :public virtual IChartRenderer
{
public:
    enum POINT_STATE // Point states 
    {
        psNormal, // Normal 
        psActive // Mouse pointer is over the point 
    };
public:
    void Release() override;
    void Render(IRenderer *renderer, ITexture *texture, IChartData *data, const PointF &xrange, const PointF &yrange) override;

    CBezierChartRenderer();
    virtual ~CBezierChartRenderer() = default;

    bool isDrawPoints() const; // Return whether points should be drawn 
    bool isDrawLine() const; // Return whether lines should be drawn 
    bool isDrawBackground() const; // Return whether background should be drawn 
    float getPointSize(const POINT_STATE state) const; // Return point size depending on state 
    float getPointHole(const POINT_STATE state) const; // Return point hole size depending on state 
    Color getPointColor(const POINT_STATE state) const; // Return point color depending on state 
    Color getPointHoleColor(const POINT_STATE state) const; // Return point hole color depending on state 
    float getLineWidth() const; // Return line width 
    Color getLineColor() const; // Return line color 
    Color getBackgroundColor() const; // Return background color 
    float getTension() const; // Return tension 
    int getActivePoint() const; // Return index of active(hovered) point 
    bool isVertical() const; // Return whether drawing should be vertical 
    int getCurveRecursionLimit() const; // Return curve recursion limit 
    float getDistanceTolerance() const; // Return distance tolerance 
    float getAngleTolerance() const; // Return angle tolerance 
    float getCuspLimit() const; // Return cusp limit 
    float getCurveAngleTolerance() const; // Return curve angle tolerance 
    float getCurveCollinearityTolerance() const; // Return curve collinearity tolerance 

    bool setDrawPoints(const bool value); // Set whether points should be drawn 
    bool setDrawLine(const bool value); // Set whether lines should be drawn 
    bool setDrawBackground(const bool value); // Set whether background should be drawn 
    bool setPointSize(const POINT_STATE state, const float value); // Set point size depending on state 
    bool setPointHole(const POINT_STATE state, const float value); // Set point hole size depending on state 
    bool setPointColor(const POINT_STATE state, const Color &value); // Set point color depending on state 
    bool setPointHoleColor(const POINT_STATE state, const Color &value); // Set point hole color depending on state 
    bool setLineWidth(const float value); // Set line width 
    bool setLineColor(const Color &value); // Set line color 
    bool setBackgroundColor(const Color &value); // Set background color 
    bool setTension(const float value); // Set tension 
    bool setActivePoint(const int value); // Set index of active(hovered) point 
    bool setVertical(const bool value); // Set whether drawing should be vertical 
    bool setCurveRecursionLimit(const int value); // Set curve recursion limit 
    bool setDistanceTolerance(const float value); // Set distance tolerance 
    bool setAngleTolerance(const float value); // Set angle tolerance 
    bool setCuspLimit(const float value); // Set cusp limit 
    bool setCurveAngleTolerance(const float value); // Set curve angle tolerance 
    bool setCurveCollinearityTolerance(const float value); // Set curve collinearity tolerance 
};
Namespace: nitisa::charts
Include: Charts/Core/BezierChartRenderer.h