Gtkmm-PLplot 3.0
A scientific plotting library for Gtkmm
|
Line object for 2D plots. More...
#include <gtkmm-plplot/plotobject2dline.h>
Public Member Functions | |
PlotObject2DLine (double coord_x_begin, double coord_y_begin, double coord_x_end, double coord_y_end, Gdk::RGBA color=Gdk::RGBA("black"), LineStyle line_style=LineStyle::CONTINUOUS, double line_width=1.0) | |
PlotObject2DLine (Gtk::Orientation orientation, double offset, Gdk::RGBA color=Gdk::RGBA("black"), LineStyle line_style=LineStyle::CONTINUOUS, double line_width=1.0) | |
virtual | ~PlotObject2DLine () |
void | set_line_style (LineStyle line_style) |
LineStyle | get_line_style () |
void | set_line_width (double line_width) |
double | get_line_width () |
virtual bool | is_logarithmic_x_compatible () override |
virtual bool | is_logarithmic_y_compatible () override |
virtual void | draw_plot_object (const Cairo::RefPtr< Cairo::Context > &cr, plstream *pls, PlotObjectAuxData &data) override |
Public Member Functions inherited from Gtk::PLplot::PlotObject2D | |
virtual | ~PlotObject2D () |
void | set_color (Gdk::RGBA color) |
Gdk::RGBA | get_color () |
Public Member Functions inherited from Gtk::PLplot::PlotObject | |
virtual | ~PlotObject () |
void | show () |
void | hide () |
bool | is_showing () const |
sigc::signal< void(void)> | signal_changed () |
Public Member Functions inherited from Gtk::PLplot::Object | |
virtual void | set_manage () |
Protected Attributes | |
LineStyle | line_style |
The linestyle that will be used to draw this line object in the plot. | |
double | line_width |
The line width of the line object. Default is 1.0. | |
double | coords_begin [2] |
coordinates of starting point (WORLD coordinates!) | |
double | coords_end [2] |
coordinates of end point (WORLD coordinates!) | |
Protected Attributes inherited from Gtk::PLplot::PlotObject2D | |
Gdk::RGBA | color |
The color the dataset will be drawn in. | |
Protected Attributes inherited from Gtk::PLplot::PlotObject | |
sigc::signal< void(void)> | _signal_changed |
signal that gets emitted whenever any of the plot object properties is changed. | |
Private Member Functions | |
PlotObject2DLine ()=delete | |
no default constructor | |
PlotObject2DLine & | operator= (const PlotObject2DLine &)=delete |
no assignment operator | |
PlotObject2DLine (const PlotObject2DLine &source)=delete | |
no default copy constructor; | |
Additional Inherited Members | |
Protected Member Functions inherited from Gtk::PLplot::PlotObject2D | |
PlotObject2D (Gdk::RGBA color) | |
Protected Member Functions inherited from Gtk::PLplot::PlotObject | |
virtual void | on_changed () |
PlotObject () | |
Protected Member Functions inherited from Gtk::PLplot::Object | |
Object () | |
Line object for 2D plots.
|
privatedelete |
no default constructor
|
privatedelete |
no default copy constructor;
Gtk::PLplot::PlotObject2DLine::PlotObject2DLine | ( | double | coord_x_begin, |
double | coord_y_begin, | ||
double | coord_x_end, | ||
double | coord_y_end, | ||
Gdk::RGBA | color = Gdk::RGBA("black") , |
||
LineStyle | line_style = LineStyle::CONTINUOUS , |
||
double | line_width = 1.0 |
||
) |
Constructor
This constructor initializes a new PlotObject2DLine instance, by setting the properties that will determine its appearance when rendered onto a plot
coord_x_begin | X coordinate of the starting point |
coord_y_begin | Y coordinate of the starting point |
coord_x_end | X coordinate of the end point |
coord_y_end | Y coordinate of the end point |
color | the line color |
line_style | the line style |
line_width | the line width |
Gtk::PLplot::Exception |
Gtk::PLplot::PlotObject2DLine::PlotObject2DLine | ( | Gtk::Orientation | orientation, |
double | offset, | ||
Gdk::RGBA | color = Gdk::RGBA("black") , |
||
LineStyle | line_style = LineStyle::CONTINUOUS , |
||
double | line_width = 1.0 |
||
) |
Constructor
This constructor initializes a new PlotObject2DLine instance, with either a horizontal or vertical orientation, by setting the properties that will determine its appearance when rendered onto a plot
orientation | Must be either Gtk::Orientation::HORIZONTAL or Gtk::Orientation::VERTICAL |
offset | For horizontal lines, the vertical offset and vice-versa for vertical lines |
color | the line color |
line_style | the line style |
line_width | the line width |
Gtk::PLplot::Exception |
|
virtual |
Destructor
|
overridevirtual |
Method to draw the object
This method is virtual allowing inheriting classes to implement their own method with the same signature.
cr | the cairo context to draw to. |
pls | the PLplot plstream object that will do the actual plotting on the Cairo context |
data | additional data sent from the Plot to influence drawing |
Implements Gtk::PLplot::PlotObject.
LineStyle Gtk::PLplot::PlotObject2DLine::get_line_style | ( | ) |
Get the current line style
double Gtk::PLplot::PlotObject2DLine::get_line_width | ( | ) |
Get the current line width
|
overridevirtual |
Check if the object can be used in a plot with a logarithmic X-axis
true
if compatible, false
if not Implements Gtk::PLplot::PlotObject2D.
|
overridevirtual |
Check if the object can be used in a plot with a logarithmic Y-axis
true
if compatible, false
if not Implements Gtk::PLplot::PlotObject2D.
|
privatedelete |
no assignment operator
void Gtk::PLplot::PlotObject2DLine::set_line_style | ( | LineStyle | line_style | ) |
Changes the line style
line_style | The new line style |
void Gtk::PLplot::PlotObject2DLine::set_line_width | ( | double | line_width | ) |
|
protected |
coordinates of starting point (WORLD coordinates!)
|
protected |
coordinates of end point (WORLD coordinates!)
|
protected |
The linestyle that will be used to draw this line object in the plot.
|
protected |
The line width of the line object. Default is 1.0.