Top |
PocDatasetPocDataset — Dataset for PocPlot |
PocDataset * | poc_dataset_new () |
void | poc_dataset_set_nickname () |
const gchar * | poc_dataset_get_nickname () |
void | poc_dataset_set_legend () |
const gchar * | poc_dataset_get_legend () |
void | poc_dataset_get_line_stroke () |
void | poc_dataset_set_line_stroke () |
void | poc_dataset_set_line_style () |
PocLineStyle | poc_dataset_get_line_style () |
void | poc_dataset_set_x_axis () |
PocAxis * | poc_dataset_get_x_axis () |
void | poc_dataset_set_y_axis () |
PocAxis * | poc_dataset_get_y_axis () |
void | poc_dataset_set_points () |
PocPointArray * | poc_dataset_get_points () |
void | poc_dataset_notify_update () |
void | poc_dataset_invalidate () |
void | poc_dataset_draw () |
void | poc_dataset_set_points_array () |
gchar * | legend | Read / Write |
GdkRGBA * | line-stroke | Read / Write |
PocLineStyle | line-style | Read / Write |
gchar * | nickname | Read / Write |
PocPointArray * | points | Read / Write |
PocAxis * | x-axis | Read / Write |
PocAxis * | y-axis | Read / Write |
A PocDataset represents data to be plotted on a PocPlot canvas. Any number of datasets may be added to a plot. Each dataset has X and Y axes which controls the range of data plotted and allow optionally allow the plot to be scrolled.
Although the dataset contains drawing code, drawing always takes place under control of the PocPlot and on its canvas.
The PocDataset base class draws a plot using straight line segments between each of the control points, however it may be subclassed for alternative plotting algorithms.
void poc_dataset_set_nickname (PocDataset *self
,const gchar *nickname
);
Set the name for the dataset.
const gchar *
poc_dataset_get_nickname (PocDataset *self
);
Get the name for the dataset.
void poc_dataset_set_legend (PocDataset *self
,const gchar *legend
);
Set the legend for the dataset item.
const gchar *
poc_dataset_get_legend (PocDataset *self
);
Get the legend for the dataset item.
void poc_dataset_get_line_stroke (PocDataset *self
,GdkRGBA *rgba
);
Get the colour for stroking plot lines.
void poc_dataset_set_line_stroke (PocDataset *self
,const GdkRGBA *rgba
);
Set the colour for stroking plot lines.
void poc_dataset_set_line_style (PocDataset *self
,PocLineStyle line_style
);
Set the line style for stroking dataset plot lines.
PocLineStyle
poc_dataset_get_line_style (PocDataset *self
);
Get the dataset's line style
void poc_dataset_set_x_axis (PocDataset *self
,PocAxis *axis
);
Set the X axis associated with this dataset.
PocAxis *
poc_dataset_get_x_axis (PocDataset *self
);
Get the X axis associated with this dataset.
void poc_dataset_set_y_axis (PocDataset *self
,PocAxis *axis
);
Set the Y axis associated with this dataset.
PocAxis *
poc_dataset_get_y_axis (PocDataset *self
);
Get the X axis associated with this dataset.
void poc_dataset_set_points (PocDataset *self
,PocPointArray *points
);
Set the array of control points for the dataset.
PocPointArray *
poc_dataset_get_points (PocDataset *self
);
Get the array of control points for the dataset.
void
poc_dataset_invalidate (PocDataset *self
);
Notify subclasses cached data is invalid.
void poc_dataset_draw (PocDataset *self
,cairo_t *cr
,guint width
,guint height
);
Draw the dataset in the main plot area. Used by PocPlot.
void poc_dataset_set_points_array (PocDataset *self
,const gdouble *x
,const gdouble *y
,guint points
);
Set the array of control points for the dataset. X and Y coordinates for each control point are specified in two arrays.
struct PocDatasetClass { void (*draw) (PocDataset *self, cairo_t *cr, guint width, guint height); void (*invalidate) (PocDataset *self); };
The class structure for PocDatasetClass.
Method called by PocPlot to draw visible area of plot. |
||
Notify subclasses to invalidate cached data. |
“legend”
property“legend” gchar *
Legend for the item.
Owner: PocDataset
Flags: Read / Write
Default value: NULL
“line-stroke”
property“line-stroke” GdkRGBA *
Colour for stroking lines.
Owner: PocDataset
Flags: Read / Write
“line-style”
property“line-style” PocLineStyle
Line style for plot line.
Owner: PocDataset
Flags: Read / Write
Default value: POC_LINE_STYLE_SOLID
“nickname”
property“nickname” gchar *
Nickname for the dataset ("nickname" since Glade doesn't like "name").
Owner: PocDataset
Flags: Read / Write
Default value: NULL
“points”
property “points” PocPointArray *
Array of (X,Y) coordinates.
Owner: PocDataset
Flags: Read / Write