This class can be used to display data as a curve in the x-y plane. It supports different display styles and symbols.
Public Member Functions | |
Curve (const Glib::ustring &title="") | |
Curve (const Curve &c) | |
virtual | ~Curve () |
virtual void | set_enabled (bool b) |
virtual bool | enabled () |
const Curve & | operator= (const Curve &c) |
virtual void | set_data (const double *xData, const double *yData, int size) |
virtual void | set_data (const std::vector< double > &xData, const std::vector< double > &yData) |
virtual void | set_data (const Glib::ArrayHandle< DoublePoint > &data) |
virtual int | data_size () const |
double | x (int i) const |
double | y (int i) const |
virtual DoubleRect | bounding_rect () const |
double | min_x_value () const |
double | max_x_value () const |
double | min_y_value () const |
double | max_y_value () const |
virtual void | set_options (CurveOptions t) |
virtual CurveOptions | options () const |
virtual void | set_title (const Glib::ustring &title) |
virtual const Glib::ustring & | title () const |
virtual void | set_baseline (double ref) |
virtual double | baseline () const |
virtual void | set_curve_style (CurveStyleID style, CurveOptions options=CURVE_AUTO) |
virtual CurveStyleID | curve_style () const |
virtual Glib::RefPtr< Paint > | paint () const |
virtual void | set_symbol (const Glib::RefPtr< Symbol > &s) |
virtual Glib::RefPtr< Symbol > | symbol () const |
virtual void | draw (const Glib::RefPtr< Gdk::Drawable > &p, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from=0, int to=-1) |
Public Attributes | |
SigC::Signal0< void > | signal_curve_changed |
Protected Member Functions | |
virtual void | init (const Glib::ustring &title) |
virtual void | copy (const Curve &c) |
virtual void | draw_curve_ (const Glib::RefPtr< Gdk::Drawable > &p, int style, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from, int to) |
virtual void | draw_symbols_ (const Glib::RefPtr< Gdk::Drawable > &p, const Glib::RefPtr< Symbol > &, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from, int to) |
virtual void | draw_lines_ (const Glib::RefPtr< Gdk::Drawable > &p, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from, int to) |
virtual void | draw_sticks_ (const Glib::RefPtr< Gdk::Drawable > &p, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from, int to) |
virtual void | draw_dots_ (const Glib::RefPtr< Gdk::Drawable > &p, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from, int to) |
virtual void | draw_lsteps_ (const Glib::RefPtr< Gdk::Drawable > &p, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from, int to) |
virtual void | draw_csteps_ (const Glib::RefPtr< Gdk::Drawable > &p, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from, int to) |
virtual void | draw_rsteps_ (const Glib::RefPtr< Gdk::Drawable > &p, const DoubleIntMap &xMap, const DoubleIntMap &yMap, int from, int to) |
virtual void | close_polyline_ (const DoubleIntMap &, const DoubleIntMap &, std::vector< Gdk::Point > &) const |
virtual void | curve_changed () |
virtual int | verify_range (int &i1, int &i2) |
|
Ctor.
|
|
Copy Constructor.
|
|
Destructor.
|
|
Return the value of the baseline.
|
|
Returns the bounding rectangle of the curve data. If there is no bounding rect, like for empty data the rectangle is invalid: DoubleRect.is_valid() == FALSE |
|
Complete a polygon to be a closed polygon including the area between the original polygon and the baseline.
|
|
Copy the contents of a curve into another curve.
Reimplemented in PlotMM::ErrorCurve. |
|
Notify a change of attributes. This virtual function is called when an attribute of the curve has changed. It can be redefined by derived classes. The default implementation does nothing.
|
|
Return the current style.
|
|
Return the size of the data arrays |
|
Draw an intervall of the curve.
Reimplemented in PlotMM::ErrorCurve. |
|
Draw step function.
|
|
Draw the line part (without symbols) of a curve interval.
|
|
Draw dots.
|
|
Draw lines.
|
|
Draw step function.
|
|
Draw step function.
|
|
Draw sticks.
|
|
Draw symbols.
|
|
Query if this curve is enabled for drawing.
|
|
Initialize data members.
Reimplemented in PlotMM::ErrorCurve. |
|
Copy Assignment.
|
|
Return the current style options.
|
|
Return a reference to the Paint the curve is drawn with |
|
Set the value of the baseline. The baseline is needed for filling the curve with a brush or the CURVE_STICKS drawing style. The default value is 0.0. The interpretation of the baseline depends on the style options. With CURVE_Y_FX, the baseline is interpreted as a horizontal line at y = baseline(), with Curve::Yfy, it is interpreted as a vertical line at x = baseline().
|
|
Set the curve's drawing style. Valid styles are:
|
|
Initialize data with an array of points (explicitly shared).
Reimplemented in PlotMM::ErrorCurve. |
|
Initialize data with x- and y-arrays (explicitly shared).
Reimplemented in PlotMM::ErrorCurve. |
|
Set data by copying x- and y-values from specified memory blocks Contrary to Plot::set_curveRawData, this function makes a 'deep copy' of the data.
Reimplemented in PlotMM::ErrorCurve. |
|
Enable or disable this curve for drawing.
|
|
Specify options for the drawing style. The options can be used to modify the drawing style. Options can be or-combined. The following options are defined:
|
|
Assign a symbol.
|
|
Assign a title to a curve.
|
|
Return the current symbol.
|
|
Return the title.
|
|
Checks if a range of indices is valid and corrects it if necessary.
|
|
|
|
|
|
Signals that this curve has changed in some way or the other.
|