![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|
GwyGraphBasicsGwyGraphBasics — Common graph functions and utilities |
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_grid (GdkDrawable *drawable, GdkGC *gc, GwyGraphActiveAreaSpecs *specs, GArray *x_grid_data, GArray *y_grid_data);
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_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 |
<< GwyGraphData | GwyGraphSelections >> |