![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|---|---|---|---|
GwyGraphDataPoint; GwyGraphActiveAreaSpecs; void gwy_graph_draw_point (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, GwyGraphPointType type, gint size, const GwyRGBA *color, gboolean clear); void gwy_graph_draw_line (GdkDrawable *drawable, GdkGC *gc, gint x_from, gint y_from, gint x_to, gint y_to, GdkLineStyle line_style, gint size, const GwyRGBA *color); void gwy_graph_draw_curve (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GObject *curvemodel); void gwy_graph_draw_selection_points (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraphPoint *selection); void gwy_graph_draw_selection_areas (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraphArea *selection); void gwy_graph_draw_selection_lines (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraphLine *selection, GtkOrientation orientation); void gwy_graph_draw_selection_xareas (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraph1DArea *selection); void gwy_graph_draw_selection_yareas (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraph1DArea *selection); void gwy_graph_draw_grid (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GArray *x_grid_data, GArray *y_grid_data); const GwyRGBA* gwy_graph_get_preset_color (guint i); guint gwy_graph_get_n_preset_colors (void);
typedef struct { gint xmin; /*x offset of the active area with respect to drawable left border*/ gint ymin; /*y offset of the active area with respect to drawable top border*/ gint height; /*active area height*/ gint width; /*active area width*/ gdouble real_xmin; /*real units values*/ gdouble real_ymin; /*real units values*/ gdouble real_height; /*real units values*/ gdouble real_width; /*real units values*/ gboolean log_x; /*x axis is logarithmic*/ gboolean log_y; /*y axis is logarithmic*/ } GwyGraphActiveAreaSpecs;
void gwy_graph_draw_point (GdkDrawable *drawable, GdkGC *gc, gint x, gint y, GwyGraphPointType type, gint size, const GwyRGBA *color, gboolean clear);
Draw a point on the graph.
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
x : |
x coordinate of the point |
y : |
y coordinate of the point |
type : |
graph point type |
size : |
point size |
color : |
point color |
clear : |
void gwy_graph_draw_line (GdkDrawable *drawable, GdkGC *gc, gint x_from, gint y_from, gint x_to, gint y_to, GdkLineStyle line_style, gint size, const GwyRGBA *color);
Draw a line on the graph.
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
x_from : |
x coordinate of the start point of the line |
y_from : |
y coordinate of the start point of the line |
x_to : |
x coordinate of the end point of the line |
y_to : |
y coordinate of the end point of the line |
line_style : |
graph line style |
size : |
point size |
color : |
point color |
void gwy_graph_draw_curve (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GObject *curvemodel);
Draw a curve on the graph
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
specs : |
specifications (boundaries) of the active area of the graph |
curvemodel : |
the curve model object |
void gwy_graph_draw_selection_points (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraphPoint *selection);
Draw selection points on the graph
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
specs : |
specifications (boundaries) of the active area of the graph |
selection : |
a GwySelectionGraphPoint structure |
void gwy_graph_draw_selection_areas (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraphArea *selection);
Draw selected area on the graph
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
specs : |
specifications (boundaries) of the active area of the graph |
selection : |
a GwySelectionGraphArea structure |
void gwy_graph_draw_selection_lines (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraphLine *selection, GtkOrientation orientation);
Draw selected lines on the graph
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
specs : |
specifications (boundaries) of the active area of the graph |
selection : |
a GwySelectionGraphLine structure |
orientation : |
horizontal or vertical orientation |
void gwy_graph_draw_selection_xareas (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraph1DArea *selection);
Draw selected x-area on the graph
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
specs : |
specifications (boundaries) of the active area of the graph |
selection : |
a GwySelectionGraph1DArea structure |
void gwy_graph_draw_selection_yareas (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GwySelectionGraph1DArea *selection);
Draw selected y-area on the graph
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
specs : |
specifications (boundaries) of the active area of the graph |
selection : |
a GwySelectionGraph1DArea structure |
void gwy_graph_draw_grid (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GArray *x_grid_data, GArray *y_grid_data);
Draw array of grid lines on the graph
drawable : |
a GdkDrawable |
gc : |
a GdkGC graphics context |
specs : |
specifications (boundaries) of the active area of the graph |
x_grid_data : |
array of grid data for the x-axis |
y_grid_data : |
array of grid data for the y-axis |
const GwyRGBA* gwy_graph_get_preset_color (guint i);
Gets a preset graph color.
Preset colors are a set of selected colors one can use to distingush graph curves when there is no reason to prefer a particular color. Note they can change between version, even their number can change.
i : |
Color number, starting from 0 which is always black. It can be any
number but colors start to repeat after
gwy_graph_get_n_preset_colors() colors.
|
Returns : | A constant color that must not be neither modified nor freed. |
guint gwy_graph_get_n_preset_colors (void);
Gets the number of distinct colors gwy_graph_get_preset_color()
can return.
Returns : | The number of distinct colors. |