![]() |
![]() |
![]() |
Gwyddion Widgets Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <libgwydgets/gwydgets.h> GwyGraphActiveAreaSpecs; void gwy_graph_draw_point (GdkDrawable *drawable
,GdkGC *gc
,gint x
,gint y
,GwyGraphPointType type
,gint size
,const GwyRGBA *color
); 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
,GwyGraphCurveModel *gcmodel
); 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
,guint nxdata
,const gdouble *x_grid_data
,guint nydata
,const gdouble *y_grid_data
); const GwyRGBA * gwy_graph_get_preset_color (guint i
); guint gwy_graph_get_n_preset_colors (void
);
typedef struct { gint xmin; gint ymin; gint height; gint width; gdouble real_xmin; gdouble real_ymin; gdouble real_height; gdouble real_width; gboolean log_x; gboolean log_y; } GwyGraphActiveAreaSpecs;
Graph area specification (for graph drawing primitives).
gint |
X offset of the active area with respect to drawable left border. |
gint |
Y offset of the active area with respect to drawable top border. |
gint |
Active area height in pixels. |
gint |
Active area width pixels. |
gdouble |
Minimum x value in real units. |
gdouble |
Minimum y value in real units. |
gdouble |
Area height in real units. |
gdouble |
Area width in real units. |
gboolean |
TRUE if x-axis is logarithmic. |
gboolean |
TRUE if y-axis is logarithmic. |
void gwy_graph_draw_point (GdkDrawable *drawable
,GdkGC *gc
,gint x
,gint y
,GwyGraphPointType type
,gint size
,const GwyRGBA *color
);
Draws a point on a drawable.
|
A drawable. |
|
Graphics context. It is modified by this function unpredictably. |
|
X coordinate of the point. |
|
Y coordinate of the point. |
|
graph point type |
|
point size |
|
point color |
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
);
Draws a line segment on a drawable.
|
A drawable. |
|
Graphics context. It is modified by this function unpredictably. |
|
x coordinate of the start point of the line |
|
y coordinate of the start point of the line |
|
x coordinate of the end point of the line |
|
y coordinate of the end point of the line |
|
graph line style |
|
point size |
|
point color |
void gwy_graph_draw_curve (GdkDrawable *drawable
,GdkGC *gc
,GwyGraphActiveAreaSpecs *specs
,GwyGraphCurveModel *gcmodel
);
Draws a single graph curve on a drawable.
|
A drawable. |
|
Graphics context. It is modified by this function unpredictably. |
|
Specifications (boundaries) of the active area of the graph. |
|
Curve model of the curve to draw. |
void gwy_graph_draw_selection_points (GdkDrawable *drawable
,GdkGC *gc
,GwyGraphActiveAreaSpecs *specs
,GwySelectionGraphPoint *selection
);
Draws selection points on a drawable.
|
A drawable. |
|
Graphics context. |
|
Specifications (boundaries) of the active area of the graph. |
|
A selection of type GwySelectionGraphPoint. |
void gwy_graph_draw_selection_areas (GdkDrawable *drawable
,GdkGC *gc
,GwyGraphActiveAreaSpecs *specs
,GwySelectionGraphArea *selection
);
Draws selected area on a drawable.
|
A drawable. |
|
Graphics context. It is modified by this function unpredictably. |
|
Specifications (boundaries) of the active area of the graph. |
|
A selection of type GwySelectionGraphArea. |
void gwy_graph_draw_selection_lines (GdkDrawable *drawable
,GdkGC *gc
,GwyGraphActiveAreaSpecs *specs
,GwySelectionGraphLine *selection
,GtkOrientation orientation
);
Draws selected lines on a drawable.
|
A drawable. |
|
Graphics context. It is modified by this function unpredictably. |
|
Specifications (boundaries) of the active area of the graph. |
|
a GwySelectionGraphLine structure |
|
horizontal or vertical orientation |
void gwy_graph_draw_selection_xareas (GdkDrawable *drawable
,GdkGC *gc
,GwyGraphActiveAreaSpecs *specs
,GwySelectionGraph1DArea *selection
);
Draws selected x-area on a drawable.
|
A drawable. |
|
Graphics context. It is modified by this function unpredictably. |
|
Specifications (boundaries) of the active area of the graph. |
|
A selection of type GwySelectionGraph1DArea. |
void gwy_graph_draw_selection_yareas (GdkDrawable *drawable
,GdkGC *gc
,GwyGraphActiveAreaSpecs *specs
,GwySelectionGraph1DArea *selection
);
Drawss selected y-area on a drawable.
|
A drawable. |
|
Graphics context. It is modified by this function unpredictably. |
|
Specifications (boundaries) of the active area of the graph. |
|
A selection of type GwySelectionGraph1DArea. |
void gwy_graph_draw_grid (GdkDrawable *drawable
,GdkGC *gc
,GwyGraphActiveAreaSpecs *specs
,guint nxdata
,const gdouble *x_grid_data
,guint nydata
,const gdouble *y_grid_data
);
Draws an array of grid lines on a drawable.
|
A drawable. |
|
Graphics context. It is modified by this function unpredictably. |
|
Specifications (boundaries) of the active area of the graph. |
|
Number of x grid positions. |
|
Array of grid data for the x-axis, it can be NULL if
nxdata is zero. |
|
Number of y grid positions. |
|
Array of grid data for the y-axis, it can be NULL if
nydata is zero. |
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 occasionally change between version, even their number can change.
|
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. |