GwyGraphBasics

GwyGraphBasics — Common graph functions and utilities

Synopsis




            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);

Description

Details

GwyGraphDataPoint

typedef struct {
    gdouble x;
    gdouble y;
} GwyGraphDataPoint;


GwyGraphActiveAreaSpecs

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;


gwy_graph_draw_point ()

void        gwy_graph_draw_point            (GdkDrawable *drawable,
                                             GdkGC *gc,
                                             gint x,
                                             gint y,
                                             GwyGraphPointType type,
                                             gint size,
                                             const GwyRGBA *color,
                                             gboolean clear);

drawable :
gc :
x :
y :
type :
size :
color :
clear :

gwy_graph_draw_line ()

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);

drawable :
gc :
x_from :
y_from :
x_to :
y_to :
line_style :
size :
color :

gwy_graph_draw_curve ()

void        gwy_graph_draw_curve            (GdkDrawable *drawable,
                                             GdkGC *gc,
                                             GwyGraphActiveAreaSpecs *specs,
                                             GObject *curvemodel);

drawable :
gc :
specs :
curvemodel :

gwy_graph_draw_selection_points ()

void        gwy_graph_draw_selection_points (GdkDrawable *drawable,
                                             GdkGC *gc,
                                             GwyGraphActiveAreaSpecs *specs,
                                             GwySelectionGraphPoint *selection);

drawable :
gc :
specs :
selection :

gwy_graph_draw_selection_areas ()

void        gwy_graph_draw_selection_areas  (GdkDrawable *drawable,
                                             GdkGC *gc,
                                             GwyGraphActiveAreaSpecs *specs,
                                             GwySelectionGraphArea *selection);

drawable :
gc :
specs :
selection :

gwy_graph_draw_selection_lines ()

void        gwy_graph_draw_selection_lines  (GdkDrawable *drawable,
                                             GdkGC *gc,
                                             GwyGraphActiveAreaSpecs *specs,
                                             GwySelectionGraphLine *selection,
                                             GtkOrientation orientation);

drawable :
gc :
specs :
selection :
orientation :

gwy_graph_draw_grid ()

void        gwy_graph_draw_grid             (GdkDrawable *drawable,
                                             GdkGC *gc,
                                             GwyGraphActiveAreaSpecs *specs,
                                             GArray *x_grid_data,
                                             GArray *y_grid_data);

drawable :
gc :
specs :
x_grid_data :
y_grid_data :